aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2025-11-19 02:13:15 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2025-12-08 15:43:50 +0000
commit4dde7d280a5f2a0218632b995d916fb1ae10cd7f (patch)
treed8a5451cd68c45e245036c377efa0ebde833e8db
parentd389d1ac1699aea517a18cf73486e7077cfbda46 (diff)
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)
-rw-r--r--sys/contrib/dev/iwlwifi/mld/agg.c8
1 files changed, 8 insertions, 0 deletions
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 ||