Skip to contentSkip to conversation

mac80211: fix an off-by-one issue in A-MSDU max_subframe computation

PATCH New Lorenzo Bianconi 1 participant 1 message Aug 31, 2018 1 message not in the archive mac80211

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 mac80211: fix an off-by-one issue in A-MSDU max_subframe computation

In reply to a message not in the archive

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")
---
 net/mac80211/tx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/mac80211/tx.c +1 -1
index 6ca0865de945..9b3b069e418a 100644
@@ -3174,7 +3174,7 @@ static bool ieee80211_amsdu_aggregate(struct ieee80211_sub_if_data *sdata,
 	void *data;
 	bool ret = false;
 	unsigned int orig_len;
-	int n = 1, nfrags, pad = 0;
+	int n = 2, nfrags, pad = 0;
 	u16 hdrlen;
 
 	if (!ieee80211_hw_check(&local->hw, TX_AMSDU))
Signature · 1 line
2.17.1