mac80211: update to version based on 4.19-rc4
[openwrt/staging/wigyori.git] / package / kernel / mac80211 / patches / 388-mac80211-fix-an-off-by-one-issue-in-A-MSDU-max_subfr.patch
1 From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
2 Date: Fri, 31 Aug 2018 01:04:13 +0200
3 Subject: [PATCH] mac80211: fix an off-by-one issue in A-MSDU
4 max_subframe computation
5
6 Initialize 'n' to 2 in order to take into account also the first
7 packet in the estimation of max_subframe limit for a given A-MSDU
8 since frag_tail pointer is NULL when ieee80211_amsdu_aggregate
9 routine analyzes the second frame.
10
11 Fixes: 6e0456b54545 ("mac80211: add A-MSDU tx support")
12 Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
13 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
14 ---
15
16 --- a/net/mac80211/tx.c
17 +++ b/net/mac80211/tx.c
18 @@ -3166,7 +3166,7 @@ static bool ieee80211_amsdu_aggregate(st
19 void *data;
20 bool ret = false;
21 unsigned int orig_len;
22 - int n = 1, nfrags, pad = 0;
23 + int n = 2, nfrags, pad = 0;
24 u16 hdrlen;
25
26 if (!ieee80211_hw_check(&local->hw, TX_AMSDU))