Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Dec 2025 15:44:09 +0000
From:      Bjoern A. Zeeb <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 4dde7d280a5f - stable/15 - iwlwifi/mld: only get tid after checking that it is a dataqos frame
Message-ID:  <6936f249.38759.9e849a8@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help

The branch stable/15 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=4dde7d280a5f2a0218632b995d916fb1ae10cd7f

commit 4dde7d280a5f2a0218632b995d916fb1ae10cd7f
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2025-11-19 02:13:15 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2025-12-08 15:43:50 +0000

    iwlwifi/mld: only get tid after checking that it is a dataqos frame
    
    Like we did for mvm, only get the tid after all the other checks are
    done by the function in order to not trigger an assert.  Linux will
    likely return a random value there which later is not used as the
    driver does an early return.  In LinuxKPI we do check that the frame
    assumptions hold up, which does not go so well for a random frame.
    
    Sponsored by:   The FreeBSD Foundation
    PR:             290808
    
    (cherry picked from commit 9040277864ab28cabfc53f238e900bc19ac75d7e)
---
 sys/contrib/dev/iwlwifi/mld/agg.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sys/contrib/dev/iwlwifi/mld/agg.c b/sys/contrib/dev/iwlwifi/mld/agg.c
index 3a346bcd6665..e3bc8767297a 100644
--- a/sys/contrib/dev/iwlwifi/mld/agg.c
+++ b/sys/contrib/dev/iwlwifi/mld/agg.c
@@ -201,7 +201,11 @@ iwl_mld_reorder(struct iwl_mld *mld, struct napi_struct *napi,
 	struct iwl_mld_link_sta *mld_link_sta;
 	u32 reorder = le32_to_cpu(desc->reorder_data);
 	bool amsdu, last_subframe, is_old_sn, is_dup;
+#if defined(__linux__)
 	u8 tid = ieee80211_get_tid(hdr);
+#elif defined(__FreeBSD__)
+	u8 tid;
+#endif
 	u8 baid;
 	u16 nssn, sn;
 	u32 sta_mask = 0;
@@ -243,6 +247,10 @@ iwl_mld_reorder(struct iwl_mld *mld, struct napi_struct *napi,
 	for_each_mld_link_sta(mld_sta, mld_link_sta, link_id)
 		sta_mask |= BIT(mld_link_sta->fw_id);
 
+#if defined(__FreeBSD__)
+	tid = ieee80211_get_tid(hdr);
+#endif
+
 	/* verify the BAID is correctly mapped to the sta and tid */
 	if (IWL_FW_CHECK(mld,
 			 tid != baid_data->tid ||



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6936f249.38759.9e849a8>