git: 522455887078 - main - iwx: re-add sequence numbers for non-AMPDU, preserving previous behaviour

From: Adrian Chadd <adrian_at_FreeBSD.org>
Date: Sun, 21 Sep 2025 17:47:39 UTC
The branch main has been updated by adrian:

URL: https://cgit.FreeBSD.org/src/commit/?id=52245588707851f3175551bf3934e206ca2b6ad7

commit 52245588707851f3175551bf3934e206ca2b6ad7
Author:     Adrian Chadd <adrian@FreeBSD.org>
AuthorDate: 2025-09-21 01:55:00 +0000
Commit:     Adrian Chadd <adrian@FreeBSD.org>
CommitDate: 2025-09-21 17:47:18 +0000

    iwx: re-add sequence numbers for non-AMPDU, preserving previous behaviour
    
    I received a report on freebsd-wireless@ that traffic stopped working.
    It seems that although my AX210 is fine with this change, the AX201/22000
    hardware/firmware seems to require it.
    
    There's a bit to set in the TX command to force the FW to set the
    sequence control.  We only set a few flags, and we don't set that.
    
    So, add the sequence number allocation where encryption is performed.
    
    Locally tested:
    
    * AX210, STA mode
    * AX201, STA mode
    
    Differential Revision:  https://reviews.freebsd.org/D52652
    Reviewed by:    kevans
    Tested by:      kevans
---
 sys/dev/iwx/if_iwx.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sys/dev/iwx/if_iwx.c b/sys/dev/iwx/if_iwx.c
index 3b29c8e78b97..8422fcb787c3 100644
--- a/sys/dev/iwx/if_iwx.c
+++ b/sys/dev/iwx/if_iwx.c
@@ -5673,8 +5673,9 @@ iwx_tx(struct iwx_softc *sc, struct mbuf *m, struct ieee80211_node *ni)
 	if (rinfo == NULL)
 		return EINVAL;
 
-	/* Offloaded sequence number assignment */
-	/* Note: Should be done in firmware on all supported devices */
+	/* Offloaded sequence number assignment; non-AMPDU case */
+	if ((m->m_flags & M_AMPDU_MPDU) == 0)
+		ieee80211_output_seqno_assign(ni, -1, m);
 
 	/* Radiotap */
 	if (ieee80211_radiotap_active_vap(vap)) {