Commit 73111efa authored by Felix Fietkau's avatar Felix Fietkau Committed by Johannes Berg

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: 31d8bb4e ("mac80211: agg-tx: refactor sending addba")
Reported-by: default avatarEneas U de Queiroz <cotequeiroz@gmail.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
Link: https://lore.kernel.org/r/20211124094024.43222-1-nbd@nbd.nameSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 18688c80
...@@ -480,8 +480,7 @@ static void ieee80211_send_addba_with_timeout(struct sta_info *sta, ...@@ -480,8 +480,7 @@ static void ieee80211_send_addba_with_timeout(struct sta_info *sta,
/* send AddBA request */ /* send AddBA request */
ieee80211_send_addba_request(sdata, sta->sta.addr, tid, ieee80211_send_addba_request(sdata, sta->sta.addr, tid,
tid_tx->dialog_token, tid_tx->dialog_token, tid_tx->ssn,
sta->tid_seq[tid] >> 4,
buf_size, tid_tx->timeout); buf_size, tid_tx->timeout);
WARN_ON(test_and_set_bit(HT_AGG_STATE_SENT_ADDBA, &tid_tx->state)); 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) ...@@ -523,6 +522,7 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
params.ssn = sta->tid_seq[tid] >> 4; params.ssn = sta->tid_seq[tid] >> 4;
ret = drv_ampdu_action(local, sdata, &params); ret = drv_ampdu_action(local, sdata, &params);
tid_tx->ssn = params.ssn;
if (ret == IEEE80211_AMPDU_TX_START_DELAY_ADDBA) { if (ret == IEEE80211_AMPDU_TX_START_DELAY_ADDBA) {
return; return;
} else if (ret == IEEE80211_AMPDU_TX_START_IMMEDIATE) { } else if (ret == IEEE80211_AMPDU_TX_START_IMMEDIATE) {
......
...@@ -199,6 +199,7 @@ struct tid_ampdu_tx { ...@@ -199,6 +199,7 @@ struct tid_ampdu_tx {
u8 stop_initiator; u8 stop_initiator;
bool tx_stop; bool tx_stop;
u16 buf_size; u16 buf_size;
u16 ssn;
u16 failed_bar_ssn; u16 failed_bar_ssn;
bool bar_pending; bool bar_pending;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment