[openwrt/openwrt] mac80211: fix regression in SSN handling of addba tx

LEDE Commits lede-commits at lists.infradead.org
Wed Nov 24 06:39:41 PST 2021


nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/ddd977fcc5838eb6bfb6cb9dad99dfe09a8ff67e

commit ddd977fcc5838eb6bfb6cb9dad99dfe09a8ff67e
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Nov 24 10:45:28 2021 +0100

    mac80211: fix regression in SSN handling of addba tx
    
    Some drivers that do their own sequence number allocation (e.g. ath9k, mwlwifi) rely
    on being able to modify params->ssn on starting tx ampdu sessions.
    This was broken by a change that modified it to use sta->tid_seq[tid] instead.
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...ix-regression-in-SSN-handling-of-addba-tx.patch | 44 ++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/package/kernel/mac80211/patches/subsys/305-mac80211-fix-regression-in-SSN-handling-of-addba-tx.patch b/package/kernel/mac80211/patches/subsys/305-mac80211-fix-regression-in-SSN-handling-of-addba-tx.patch
new file mode 100644
index 0000000000..dc8afb9186
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/305-mac80211-fix-regression-in-SSN-handling-of-addba-tx.patch
@@ -0,0 +1,44 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Wed, 24 Nov 2021 10:30:41 +0100
+Subject: [PATCH] mac80211: fix regression in SSN handling of addba tx
+
+Some drivers that do their own sequence number allocation (e.g. ath9k) rely
+on being able to modify params->ssn on starting tx ampdu sessions.
+This was broken by a change that modified it to use sta->tid_seq[tid] instead.
+
+Cc: stable at vger.kernel.org
+Fixes: 31d8bb4e07f8 ("mac80211: agg-tx: refactor sending addba")
+Reported-by: Eneas U de Queiroz <cotequeiroz at gmail.com>
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/net/mac80211/agg-tx.c
++++ b/net/mac80211/agg-tx.c
+@@ -480,8 +480,7 @@ static void ieee80211_send_addba_with_ti
+ 
+ 	/* send AddBA request */
+ 	ieee80211_send_addba_request(sdata, sta->sta.addr, tid,
+-				     tid_tx->dialog_token,
+-				     sta->tid_seq[tid] >> 4,
++				     tid_tx->dialog_token, tid_tx->ssn,
+ 				     buf_size, tid_tx->timeout);
+ 
+ 	WARN_ON(test_and_set_bit(HT_AGG_STATE_SENT_ADDBA, &tid_tx->state));
+@@ -523,6 +522,7 @@ void ieee80211_tx_ba_session_handle_star
+ 
+ 	params.ssn = sta->tid_seq[tid] >> 4;
+ 	ret = drv_ampdu_action(local, sdata, &params);
++	tid_tx->ssn = params.ssn;
+ 	if (ret == IEEE80211_AMPDU_TX_START_DELAY_ADDBA) {
+ 		return;
+ 	} else if (ret == IEEE80211_AMPDU_TX_START_IMMEDIATE) {
+--- a/net/mac80211/sta_info.h
++++ b/net/mac80211/sta_info.h
+@@ -199,6 +199,7 @@ struct tid_ampdu_tx {
+ 	u8 stop_initiator;
+ 	bool tx_stop;
+ 	u16 buf_size;
++	u16 ssn;
+ 
+ 	u16 failed_bar_ssn;
+ 	bool bar_pending;



More information about the lede-commits mailing list