Skip to content

Commit 73111ef

Browse files
nbd168jmberg-intel
authored andcommitted
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@vger.kernel.org Fixes: 31d8bb4 ("mac80211: agg-tx: refactor sending addba") Reported-by: Eneas U de Queiroz <cotequeiroz@gmail.com> Signed-off-by: Felix Fietkau <nbd@nbd.name> Link: https://lore.kernel.org/r/20211124094024.43222-1-nbd@nbd.name Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 18688c8 commit 73111ef

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

net/mac80211/agg-tx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,7 @@ static void ieee80211_send_addba_with_timeout(struct sta_info *sta,
480480

481481
/* send AddBA request */
482482
ieee80211_send_addba_request(sdata, sta->sta.addr, tid,
483-
tid_tx->dialog_token,
484-
sta->tid_seq[tid] >> 4,
483+
tid_tx->dialog_token, tid_tx->ssn,
485484
buf_size, tid_tx->timeout);
486485

487486
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)
523522

524523
params.ssn = sta->tid_seq[tid] >> 4;
525524
ret = drv_ampdu_action(local, sdata, &params);
525+
tid_tx->ssn = params.ssn;
526526
if (ret == IEEE80211_AMPDU_TX_START_DELAY_ADDBA) {
527527
return;
528528
} else if (ret == IEEE80211_AMPDU_TX_START_IMMEDIATE) {

net/mac80211/sta_info.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ struct tid_ampdu_tx {
199199
u8 stop_initiator;
200200
bool tx_stop;
201201
u16 buf_size;
202+
u16 ssn;
202203

203204
u16 failed_bar_ssn;
204205
bool bar_pending;

0 commit comments

Comments
 (0)