diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-02-07 06:05:00 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-02-07 16:02:14 -0500 |
commit | fc7c976dc7a565213393ce700d4a6105f037bf20 (patch) | |
tree | ab7b069f25f0d6ddce88be4a1c898d3101ed1c09 /net | |
parent | 3dd823e6b86407aed1a025041d8f1df77e43a9c8 (diff) |
mac80211: fix the skb cloned check in the tx path
Using skb_header_cloned to check if it's safe to write to the skb is not
enough - mac80211 also touches the tailroom of the skb.
Initially this check was only used to increase a counter, however this
commit changed the code to also skip skb data reallocation if no extra
head/tailroom was needed:
commit 4cd06a344db752f513437138953af191cbe9a691
mac80211: skip unnecessary pskb_expand_head calls
It added a regression at least with iwl3945, which is fixed by this patch.
Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Tested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/tx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index b64b42bc774b..b0beaa58246b 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1547,7 +1547,7 @@ static int ieee80211_skb_resize(struct ieee80211_local *local, | |||
1547 | skb_orphan(skb); | 1547 | skb_orphan(skb); |
1548 | } | 1548 | } |
1549 | 1549 | ||
1550 | if (skb_header_cloned(skb)) | 1550 | if (skb_cloned(skb)) |
1551 | I802_DEBUG_INC(local->tx_expand_skb_head_cloned); | 1551 | I802_DEBUG_INC(local->tx_expand_skb_head_cloned); |
1552 | else if (head_need || tail_need) | 1552 | else if (head_need || tail_need) |
1553 | I802_DEBUG_INC(local->tx_expand_skb_head); | 1553 | I802_DEBUG_INC(local->tx_expand_skb_head); |