Skip to contentSkip to conversation

mac80211: fix regression in SSN handling of addba tx

PATCH New Felix Fietkau 1 participant 1 message Nov 24, 2021 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Fixes 31d8bb4e07f8 ("mac80211: agg-tx: refactor sending addba")
---
 net/mac80211/agg-tx.c   | 4 ++--
 net/mac80211/sta_info.h | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
net/mac80211/agg-tx.c +2 -2
index 430a58587538..c1558dd2d244 100644
@@ -480,8 +480,7 @@ static void ieee80211_send_addba_with_timeout(struct sta_info *sta,
 
 	/* 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_start(struct sta_info *sta, int tid)
 
 	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) {
net/mac80211/sta_info.h +1 -0
index ba2796782008..e7443fc4669c 100644
@@ -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;
Signature · 1 line
2.30.1