summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/mac80211.h4
-rw-r--r--net/mac80211/main.c2
-rw-r--r--net/mac80211/tx.c6
3 files changed, 9 insertions, 3 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 9001bd685b1e..0af7464ef57b 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1942,8 +1942,8 @@ enum ieee80211_hw_flags {
* Use the %IEEE80211_RADIOTAP_VHT_KNOWN_* values.
*
* @netdev_features: netdev features to be set in each netdev created
- * from this HW. Note only HW checksum features are currently
- * compatible with mac80211. Other feature bits will be rejected.
+ * from this HW. Note that not all features are usable with mac80211,
+ * other features will be rejected during HW registration.
*
* @uapsd_queues: This bitmap is included in (re)association frame to indicate
* for each access category if it is uAPSD trigger-enabled and delivery-
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index df3051d96aff..6dd6dd47a9df 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -840,7 +840,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
/* Only HW csum features are currently compatible with mac80211 */
feature_whitelist = NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
- NETIF_F_HW_CSUM;
+ NETIF_F_HW_CSUM | NETIF_F_SG | NETIF_F_HIGHDMA;
if (WARN_ON(hw->netdev_features & ~feature_whitelist))
return -EINVAL;
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 20a90b16eb4d..3a421a04cbec 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2864,6 +2864,12 @@ void __ieee80211_subif_start_xmit(struct sk_buff *skb,
goto out;
}
+ /* we cannot process non-linear frames on this path */
+ if (skb_linearize(skb)) {
+ kfree_skb(skb);
+ goto out;
+ }
+
/* the frame could be fragmented, software-encrypted, and other things
* so we cannot really handle checksum offload with it - fix it up in
* software before we handle anything else.