summaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2015-04-13 16:58:25 +0200
committerJohannes Berg <johannes.berg@intel.com>2015-04-22 11:25:30 +0200
commit680a0daba74fed0bf30530c9b3e7e706cf29855f (patch)
tree3022c5e0e3a3ec738c9d4f4ab6be50d152cc0fad /net/mac80211/tx.c
parentmac80211: allow checksum offload only in fast-xmit (diff)
downloadlinux-680a0daba74fed0bf30530c9b3e7e706cf29855f.tar.xz
linux-680a0daba74fed0bf30530c9b3e7e706cf29855f.zip
mac80211: allow drivers to support S/G
If drivers want to support S/G (really just gather DMA on TX) then we can now easily support this on the fast-xmit path since it just needs to write to the ethernet header (and already has a check for that being possible.) However, disallow this on the regular TX path (which has to handle fragmentation, software crypto, etc.) by calling skb_linearize(). Also allow the related HIGHDMA since that's not interesting to the code in mac80211 at all anyway. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to '')
-rw-r--r--net/mac80211/tx.c6
1 files changed, 6 insertions, 0 deletions
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.