From nobody Fri Nov 21 07:11:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dCRG11f3kz6Gjp6 for ; Fri, 21 Nov 2025 07:11:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dCRG10zzkz3rmW for ; Fri, 21 Nov 2025 07:11:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763709065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g207pMdF8sAVtzbndqMJyoLpyTu0Cc3ITpAu5yhn8u8=; b=AEPYrr2vwiBQwXqfUt+mFL2O0QiFo6QPzHrM2sMeslnA4+N4YNwYiy+Yi42j23bnuDQE0a 28nvnbn1k+yXcWr7QB0HSd77tHCQduKnekdsJFICWXvq/jrBQYzmaNlnZU/wSYWTzszV8B +mwloIroJTa8DALhJEXz+9XRqfE66bGLTdoZf2+xV66GsnckJSTplRRHZSo9V8JUFyOCJy QH2a7m8bVnAHEDbnZM+EJJ1PwzUUjnZWalMo/2VhFVoTXEiLwI09g2tosjQs7MFFs39kr2 RzQZG2YvpRioyBG3ZklPBfdJvGtlaJEB5rG7+sSJUyo4gBkCe+1WB4lHLHe9Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763709065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g207pMdF8sAVtzbndqMJyoLpyTu0Cc3ITpAu5yhn8u8=; b=FcFlU7It3G7bui1gUwcuI9WNZCB3m309JEkpLDvg9Bay2h57+1bQ7TSYSkmZ2/7I6Byps6 Q+kxaltxKm/+BUjCKjoHC+SAcFXooCF90j/nX/vMQQukk6y91zQb2HHj5v2t/o+gxGb2ui 2f8u5ksI8AkPLbJG8hchxLEeLjBIWqCh26sQTFVc5Ojb5UV5/MXpNQYQlAypllXbQtiE4j puww80nUuv336l4PW2OZUNpCH8e+oMF9mTIFQS9JVYyvVGFq4QMKSkg/o7MQtMmnjb8KCL dQlp27jlSAZU4XcOOAtATs/QvOx3SSp6coKJ2QTniYV+TfzFFLhZjuGNGAGyMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763709065; a=rsa-sha256; cv=none; b=t8om1au+0PoSt6xUbw/9J8uQiGfmgfeT7ie4IdaoRILechIa0lNzGUJa0nW8wAHfa6Y+LX 8izMf3SDlFaNUKi0g58lPO9ZRrXRcf6filrjoApwZnaZcBDmYy4pUTSIOIrQ1yNjS7fpN9 Ag/gJVAsKyrCQWmDuh6Pl3uZ4nphat3tU+jEdncr0Mm84Qexg2F8JPYNYVDWvyjdbCNXWE y/XEttS+N94KreT+uCkzuf82FoG8PpFQXUY+LtHnC6ixqsBI/4NRMzbDxCgyuUnb1dsbuJ Z6QNmyG9WEVTJvvPGGxk3coSRwSLgdKtFPnPxyk4zpvKYc1JOH9uIyvd0XjACQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dCRG10Rk2z12gD for ; Fri, 21 Nov 2025 07:11:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 282fe by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 21 Nov 2025 07:11:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 4d29178e7154 - main - iwx: tag RX frames as A_MPDU RX; tag A-MSDU frames appropriately List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4d29178e715449c25b94f115946dc4e021f41cdb Auto-Submitted: auto-generated Date: Fri, 21 Nov 2025 07:11:05 +0000 Message-Id: <69201089.282fe.733d52dc@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=4d29178e715449c25b94f115946dc4e021f41cdb commit 4d29178e715449c25b94f115946dc4e021f41cdb Author: Adrian Chadd AuthorDate: 2025-11-16 04:26:22 +0000 Commit: Adrian Chadd CommitDate: 2025-11-21 07:09:47 +0000 iwx: tag RX frames as A_MPDU RX; tag A-MSDU frames appropriately * tag packets for 11n/11ac associated nodes with A_MPDU so they get passed into the reordering logic * tag A-MSDU frames with AMSDU and AMSDU_MORE so they don't get dropped due to duplicate sequence numbers. Note: I haven't yet elicited A-MSDU in A-MPDU to fully test this, but I do see the net80211 reordering logic kick in (which you can see via wlanstats -i wlan0 -o ampdu 1). I've checked with Johannes Berg at Intel (who maintains the linux iwlwifi stuff); he replied saying none of the firmware versions are doing AMPDU reorder offloading. Differential Revision: https://reviews.freebsd.org/D53781 Locally tested: * AX210, STA mode, > 200mbit bidirectional traffic testing on 5GHz VHT/40. --- sys/dev/iwx/if_iwx.c | 62 +++++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/sys/dev/iwx/if_iwx.c b/sys/dev/iwx/if_iwx.c index e317ff9e271c..3c953e522973 100644 --- a/sys/dev/iwx/if_iwx.c +++ b/sys/dev/iwx/if_iwx.c @@ -4607,37 +4607,39 @@ iwx_rx_mpdu_mq(struct iwx_softc *sc, struct mbuf *m, void *pktdata, pad = 1; } -// /* -// * Hardware de-aggregates A-MSDUs and copies the same MAC header -// * in place for each subframe. But it leaves the 'A-MSDU present' -// * bit set in the frame header. We need to clear this bit ourselves. -// * (XXX This workaround is not required on AX200/AX201 devices that -// * have been tested by me, but it's unclear when this problem was -// * fixed in the hardware. It definitely affects the 9k generation. -// * Leaving this in place for now since some 9k/AX200 hybrids seem -// * to exist that we may eventually add support for.) -// * -// * And we must allow the same CCMP PN for subframes following the -// * first subframe. Otherwise they would be discarded as replays. -// */ + /* If it's a HT node then perform re-order processing */ + if (ni->ni_flags & IEEE80211_NODE_HT) + m->m_flags |= M_AMPDU; + + /* + * Hardware de-aggregates A-MSDUs and copies the same MAC header + * in place for each subframe. But it leaves the 'A-MSDU present' + * bit set in the frame header. We need to clear this bit ourselves. + * (XXX This workaround is not required on AX200/AX201 devices that + * have been tested by me, but it's unclear when this problem was + * fixed in the hardware. It definitely affects the 9k generation. + * Leaving this in place for now since some 9k/AX200 hybrids seem + * to exist that we may eventually add support for.) + * + * And we must allow the same CCMP PN for subframes following the + * first subframe. Otherwise they would be discarded as replays. + */ if (desc->mac_flags2 & IWX_RX_MPDU_MFLG2_AMSDU) { - DPRINTF(("%s: === IWX_RX_MPDU_MFLG2_AMSDU\n", __func__)); -// struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *); -// uint8_t subframe_idx = (desc->amsdu_info & -// IWX_RX_MPDU_AMSDU_SUBFRAME_IDX_MASK); -// if (subframe_idx > 0) -// rxi.rxi_flags |= IEEE80211_RXI_HWDEC_SAME_PN; -// if (ieee80211_has_qos(wh) && ieee80211_has_addr4(wh) && -// m->m_len >= sizeof(struct ieee80211_qosframe_addr4)) { -// struct ieee80211_qosframe_addr4 *qwh4 = mtod(m, -// struct ieee80211_qosframe_addr4 *); -// qwh4->i_qos[0] &= htole16(~IEEE80211_QOS_AMSDU); -// } else if (ieee80211_has_qos(wh) && -// m->m_len >= sizeof(struct ieee80211_qosframe)) { -// struct ieee80211_qosframe *qwh = mtod(m, -// struct ieee80211_qosframe *); -// qwh->i_qos[0] &= htole16(~IEEE80211_QOS_AMSDU); -// } + struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *); + uint8_t subframe_idx = (desc->amsdu_info & + IWX_RX_MPDU_AMSDU_SUBFRAME_IDX_MASK); + uint8_t *qos; + + rxs.c_pktflags |= IEEE80211_RX_F_AMSDU; + if (subframe_idx > 0) + rxs.c_pktflags |= IEEE80211_RX_F_AMSDU_MORE; + + /* XXX should keep driver statistics about this */ + IWX_DPRINTF(sc, IWX_DEBUG_AMPDU_MGMT, + "%s: === IWX_RX_MPDU_MFLG2_AMSDU\n", __func__); + + qos = ieee80211_getqos(wh); + qos[0] &= ~IEEE80211_QOS_AMSDU; } /*