mac80211: move A-MSDU skb_linearize call to ieee80211_amsdu_to_8023s
authorFelix Fietkau <nbd@openwrt.org>
Tue, 2 Feb 2016 13:39:08 +0000 (14:39 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 24 Feb 2016 08:04:33 +0000 (09:04 +0100)
Prepararation for zero-copy A-MSDU support with page fragment SKBs

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/rx.c
net/wireless/util.c

index 9fb7074f0280692639a0932e7ff42b52edb6bef4..44192143ebdf0c3fe7b257e033931998aa671292 100644 (file)
@@ -2223,9 +2223,6 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx_data *rx)
        skb->dev = dev;
        __skb_queue_head_init(&frame_list);
 
-       if (skb_linearize(skb))
-               return RX_DROP_UNUSABLE;
-
        ieee80211_amsdu_to_8023s(skb, &frame_list, dev->dev_addr,
                                 rx->sdata->vif.type,
                                 rx->local->hw.extra_tx_headroom, true);
index 92770427b211f559be4735584d74043ec6301802..6a407699a900878e98ddc1aa5da94b8884c1683f 100644 (file)
@@ -657,6 +657,9 @@ void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list,
        int remaining, err;
        u8 dst[ETH_ALEN], src[ETH_ALEN];
 
+       if (skb_linearize(skb))
+               goto out;
+
        if (has_80211_header) {
                err = ieee80211_data_to_8023(skb, addr, iftype);
                if (err)