]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
mac80211: fix an off-by-one issue in A-MSDU max_subframe computation
authorLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Thu, 30 Aug 2018 23:04:13 +0000 (01:04 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 3 Sep 2018 08:29:14 +0000 (10:29 +0200)
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>
net/mac80211/tx.c

index 6ca0865de94518cb3f313657d37beda16dc39e08..9b3b069e418abe25639f25e6568bc0fafee0d8d6 100644 (file)
@@ -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))