summaryrefslogtreecommitdiff
path: root/net/mac80211
diff options
context:
space:
mode:
authorChih-Kang Chang <gary.chang@realtek.com>2021-08-16 11:51:28 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-22 12:47:54 +0300
commitdce4b0050c31a9a7fcaeb00d71145d1cbe0bd2ac (patch)
tree7905ac07ad95b3b339ae1e9e14130490da3c4e4f /net/mac80211
parent5e2d2f05204f7ab9c645a1fb9f10a3f6393dd2fa (diff)
downloadlinux-dce4b0050c31a9a7fcaeb00d71145d1cbe0bd2ac.tar.xz
mac80211: Fix insufficient headroom issue for AMSDU
[ Upstream commit f50d2ff8f016b79a2ff4acd5943a1eda40c545d4 ] ieee80211_amsdu_realloc_pad() fails to account for extra_tx_headroom, the original reserved headroom might be eaten. Add the necessary extra_tx_headroom. Fixes: 6e0456b54545 ("mac80211: add A-MSDU tx support") Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://lore.kernel.org/r/20210816085128.10931-2-pkshih@realtek.com [fix indentation] Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/tx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 3530d1a5fc98..5c5908127fcb 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3142,7 +3142,9 @@ static bool ieee80211_amsdu_prepare_head(struct ieee80211_sub_if_data *sdata,
if (info->control.flags & IEEE80211_TX_CTRL_AMSDU)
return true;
- if (!ieee80211_amsdu_realloc_pad(local, skb, sizeof(*amsdu_hdr)))
+ if (!ieee80211_amsdu_realloc_pad(local, skb,
+ sizeof(*amsdu_hdr) +
+ local->hw.extra_tx_headroom))
return false;
data = skb_push(skb, sizeof(*amsdu_hdr));