]> git.ipfire.org Git - thirdparty/linux.git/commit
wifi: iwlwifi: mld: correctly set wifi generation data
authorJohannes Berg <johannes.berg@intel.com>
Tue, 24 Mar 2026 09:33:26 +0000 (11:33 +0200)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Tue, 24 Mar 2026 11:55:53 +0000 (13:55 +0200)
commit687a95d204e72e52f2e6bc7a994cc82f76b2678f
tree5f6734038595db08c85d0122130cc02784e60930
parent323156c3541e23da7e582008a7ac30cd51b60acd
wifi: iwlwifi: mld: correctly set wifi generation data

In each MAC context, the firmware expects the wifi generation
data, i.e. whether or not HE/EHT (and in the future UHR) is
enabled on that MAC.

However, this is currently handled wrong in two ways:
 - EHT is only enabled when the interface is also an MLD, but
   we currently allow (despite the spec) connecting with EHT
   but without MLO.
 - when HE or EHT are used by TDLS peers, the firmware needs
   to have them enabled regardless of the AP

Fix this by iterating setting up the data depending on the
interface type:
 - for AP, just set it according to the BSS configuration
 - for monitor, set it according to HW capabilities
 - otherwise, particularly for client, iterate all stations
   and then their links on the interface in question and set
   according to their capabilities, this handles the AP and
   TDLS peers. Re-calculate this whenever a TDLS station is
   marked associated or removed so that it's kept updated,
   for the AP it's already updated on assoc/disassoc.

Fixes: d1e879ec600f ("wifi: iwlwifi: add iwlmld sub-driver")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260319110722.404713b22177.Ic972b5e557d011a5438f8f97c1e793cc829e2ea9@changeid
Link: https://patch.msgid.link/20260324093333.2953495-1-miriam.rachel.korenblit@intel.com
drivers/net/wireless/intel/iwlwifi/mld/iface.c
drivers/net/wireless/intel/iwlwifi/mld/mac80211.c