aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2026-03-05 09:47:10 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2026-03-05 13:44:01 +0000
commit760e0a18d3033152899fbd0e3f587dfe3c28d6bf (patch)
treeef149711d7504d81c7620698e4b36798454f411f
parent9b03cc2a70e4b6354c5f5b90e4c51b850b6b1dd2 (diff)
iwlwifi: fixup link_id for certain cases
In iwl_mvm_mld_vif_cfg_changed_station() if we do not do MLO (which we do not do yet at all), dtim_period is not yet set but asssoc is (our common case) the link_id can become -1 as active_links is always 0 for the non-MLO case. This leads to logging of a WARN; Invalid link ID for session protection: 4294967295 Fixup the link_id if it is -1 to be 0. This is the deflink link_id so that should always be fine in this case. For Linux 7.0-rc2 that code is already gone so this is a local temporary stopgap measure for the mvm-mld devices (e.g., some AX210). Sponosred by: The FreeBSD Foundation MFC after: 3 days
-rw-r--r--sys/contrib/dev/iwlwifi/mvm/mld-mac80211.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/contrib/dev/iwlwifi/mvm/mld-mac80211.c b/sys/contrib/dev/iwlwifi/mvm/mld-mac80211.c
index bf24f8cb673e..8b88f211066d 100644
--- a/sys/contrib/dev/iwlwifi/mvm/mld-mac80211.c
+++ b/sys/contrib/dev/iwlwifi/mvm/mld-mac80211.c
@@ -838,6 +838,14 @@ static void iwl_mvm_mld_vif_cfg_changed_station(struct iwl_mvm *mvm,
*/
unsigned int link_id =
ffs(vif->active_links) - 1;
+#if defined(__FreeBSD__)
+ /* link_id is gone in Linux v7.0.
+ * For us it can become -1 if this is non-MLO
+ * and dtim_period is still 0.
+ */
+ if (link_id == -1)
+ link_id = 0;
+#endif
/* If we're not restarting and still haven't
* heard a beacon (dtim period unknown) then