public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH wireless] wifi: mac80211: Fix ADDBA update when HW supports reordering
@ 2026-02-17 10:36 Remi Pommarel
  2026-02-17 11:30 ` Johannes Berg
  0 siblings, 1 reply; 12+ messages in thread
From: Remi Pommarel @ 2026-02-17 10:36 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, linux-kernel, Remi Pommarel

Commit f89e07d4cf26 ("mac80211: agg-rx: refuse ADDBA Request with timeout
update") added a check to fail when ADDBA update would change the
timeout param.

This param is kept in tid_ampdu_rx context which is only allocated on HW
that do not set SUPPORTS_REORDERING_BUFFER. Because the timeout check
was done regardless of this param, ADDBA update always failed on those
HW.

Fix this by only checking tid_ampdu_rx->timeout only when
SUPPORTS_REORDERING_BUFFER is not set.

Fixes: f89e07d4cf26 ("mac80211: agg-rx: refuse ADDBA Request with timeout update")
Signed-off-by: Remi Pommarel <repk@triplefau.lt>
---
 net/mac80211/agg-rx.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c
index 7da909d78c68..099a291723e6 100644
--- a/net/mac80211/agg-rx.c
+++ b/net/mac80211/agg-rx.c
@@ -353,7 +353,16 @@ void __ieee80211_start_rx_ba_session(struct sta_info *sta,
 	       buf_size, sta->sta.addr);
 
 	if (test_bit(tid, sta->ampdu_mlme.agg_session_valid)) {
-		if (sta->ampdu_mlme.tid_rx_token[tid] == dialog_token) {
+		if (sta->ampdu_mlme.tid_rx_token[tid] != dialog_token) {
+			ht_dbg_ratelimited(sta->sdata,
+					   "unexpected AddBA Req from %pM on tid %u\n",
+					   sta->sta.addr, tid);
+
+			/* delete existing Rx BA session on the same tid */
+			__ieee80211_stop_rx_ba_session(sta, tid, WLAN_BACK_RECIPIENT,
+						       WLAN_STATUS_UNSPECIFIED_QOS,
+						       false);
+		} else if (!ieee80211_hw_check(&local->hw, SUPPORTS_REORDERING_BUFFER)) {
 			struct tid_ampdu_rx *tid_rx;
 
 			ht_dbg_ratelimited(sta->sdata,
@@ -374,14 +383,6 @@ void __ieee80211_start_rx_ba_session(struct sta_info *sta,
 			goto end;
 		}
 
-		ht_dbg_ratelimited(sta->sdata,
-				   "unexpected AddBA Req from %pM on tid %u\n",
-				   sta->sta.addr, tid);
-
-		/* delete existing Rx BA session on the same tid */
-		__ieee80211_stop_rx_ba_session(sta, tid, WLAN_BACK_RECIPIENT,
-					       WLAN_STATUS_UNSPECIFIED_QOS,
-					       false);
 	}
 
 	if (ieee80211_hw_check(&local->hw, SUPPORTS_REORDERING_BUFFER)) {
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-02-26 16:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-17 10:36 [PATCH wireless] wifi: mac80211: Fix ADDBA update when HW supports reordering Remi Pommarel
2026-02-17 11:30 ` Johannes Berg
2026-02-17 13:05   ` Remi Pommarel
2026-02-17 13:59     ` Johannes Berg
2026-02-17 14:38       ` Remi Pommarel
2026-02-17 16:00         ` Johannes Berg
2026-02-22 16:06           ` Remi Pommarel
2026-02-23 11:50             ` Johannes Berg
2026-02-23 13:25               ` Pablo MARTIN-GOMEZ
2026-02-26 15:49                 ` Remi Pommarel
2026-02-26 16:28                   ` Johannes Berg
2026-02-17 15:30       ` Pablo MARTIN-GOMEZ

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox