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-11-19 02:25:38 +0000
commit9040277864ab28cabfc53f238e900bc19ac75d7e (patch)
tree94c314090244b7283022e532bc5d9ff1fb8cb407
parent0628400590e025b7db1c0905e6ee488a24ef3f60 (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 MFC after: 3 days PR: 290808
-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 ||