318-mac80211-move-A-MSDU-skb_linearize-call-to-ieee80211.patch 999 B

1234567891011121314151617181920212223242526272829303132333435
  1. From: Felix Fietkau <nbd@openwrt.org>
  2. Date: Tue, 2 Feb 2016 14:39:08 +0100
  3. Subject: [PATCH] mac80211: move A-MSDU skb_linearize call to
  4. ieee80211_amsdu_to_8023s
  5. Prepararation for zero-copy A-MSDU support with page fragment SKBs
  6. Signed-off-by: Felix Fietkau <nbd@openwrt.org>
  7. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  8. ---
  9. --- a/net/mac80211/rx.c
  10. +++ b/net/mac80211/rx.c
  11. @@ -2203,9 +2203,6 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx
  12. skb->dev = dev;
  13. __skb_queue_head_init(&frame_list);
  14. - if (skb_linearize(skb))
  15. - return RX_DROP_UNUSABLE;
  16. -
  17. ieee80211_amsdu_to_8023s(skb, &frame_list, dev->dev_addr,
  18. rx->sdata->vif.type,
  19. rx->local->hw.extra_tx_headroom, true);
  20. --- a/net/wireless/util.c
  21. +++ b/net/wireless/util.c
  22. @@ -657,6 +657,9 @@ void ieee80211_amsdu_to_8023s(struct sk_
  23. int remaining, err;
  24. u8 dst[ETH_ALEN], src[ETH_ALEN];
  25. + if (skb_linearize(skb))
  26. + goto out;
  27. +
  28. if (has_80211_header) {
  29. err = ieee80211_data_to_8023(skb, addr, iftype);
  30. if (err)