diff options
author | Lorenzo Bianconi <lorenzo.bianconi@redhat.com> | 2018-08-30 19:04:13 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2018-09-03 04:29:14 -0400 |
commit | 66eb02d839e8495ae6b612e2d09ff599374b80e2 (patch) | |
tree | 9fc32849fb94447584abcb69fff0622d26a969f0 | |
parent | aa58acf325b4aadeecae2bfc90658273b47dbace (diff) |
mac80211: fix an off-by-one issue in A-MSDU max_subframe computation
Initialize 'n' to 2 in order to take into account also the first
packet in the estimation of max_subframe limit for a given A-MSDU
since frag_tail pointer is NULL when ieee80211_amsdu_aggregate
routine analyzes the second frame.
Fixes: 6e0456b54545 ("mac80211: add A-MSDU tx support")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-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 6ca0865de945..9b3b069e418a 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -3174,7 +3174,7 @@ static bool ieee80211_amsdu_aggregate(struct ieee80211_sub_if_data *sdata, | |||
3174 | void *data; | 3174 | void *data; |
3175 | bool ret = false; | 3175 | bool ret = false; |
3176 | unsigned int orig_len; | 3176 | unsigned int orig_len; |
3177 | int n = 1, nfrags, pad = 0; | 3177 | int n = 2, nfrags, pad = 0; |
3178 | u16 hdrlen; | 3178 | u16 hdrlen; |
3179 | 3179 | ||
3180 | if (!ieee80211_hw_check(&local->hw, TX_AMSDU)) | 3180 | if (!ieee80211_hw_check(&local->hw, TX_AMSDU)) |