blob: 455fa298311ff4bcb404d6c1515dc4cd50bb5309 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Date: Fri, 31 Aug 2018 01:04:13 +0200
Subject: [PATCH] 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>
---
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3166,7 +3166,7 @@ static bool ieee80211_amsdu_aggregate(st
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))
|