wifi: iwlwifi: mvm: check AP supports EMLSR
authorJohannes Berg <johannes.berg@intel.com>
Wed, 31 Jan 2024 08:24:36 +0000 (10:24 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 2 Feb 2024 13:15:14 +0000 (14:15 +0100)
Before using EMLSR check the AP actually advertises
support for it, otherwise reject the link activation.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240131091413.edaac352488d.Ic3533afc6848591e8977391ae39c144d5e794d26@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c

index 5bac39b..d3c6eb8 100644 (file)
@@ -1280,6 +1280,9 @@ static bool iwl_mvm_can_enter_esr(struct iwl_mvm *mvm,
        if (primary_link < 0)
                return false;
 
+       if (!(vif->cfg.eml_cap & IEEE80211_EML_CAP_EMLSR_SUPP))
+               return false;
+
        for_each_set_bit(link_id, &desired_links, IEEE80211_MLD_MAX_NUM_LINKS) {
                struct ieee80211_bss_conf *link_conf =
                        link_conf_dereference_protected(vif, link_id);