Skip to content

Commit 1820944

Browse files
committed
wifi: iwlwifi: mvm: check own capabilities for EMLSR
There may be different hardware or configurations supported, so check for our own EMLSR capability before allowing it to be used, in addition to checking the AP's. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240208185302.036443611696.If33caabd7cf372834287863b40b2d6d1ef1ca3f7@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent d34637a commit 1820944

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,6 +1275,7 @@ static bool iwl_mvm_can_enter_esr(struct iwl_mvm *mvm,
12751275
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
12761276
int primary_link = iwl_mvm_mld_get_primary_link(mvm, vif,
12771277
desired_links);
1278+
const struct wiphy_iftype_ext_capab *ext_capa;
12781279
bool ret = true;
12791280
int link_id;
12801281

@@ -1284,6 +1285,12 @@ static bool iwl_mvm_can_enter_esr(struct iwl_mvm *mvm,
12841285
if (!(vif->cfg.eml_cap & IEEE80211_EML_CAP_EMLSR_SUPP))
12851286
return false;
12861287

1288+
ext_capa = cfg80211_get_iftype_ext_capa(mvm->hw->wiphy,
1289+
ieee80211_vif_type_p2p(vif));
1290+
if (!ext_capa ||
1291+
!(ext_capa->eml_capabilities & IEEE80211_EML_CAP_EMLSR_SUPP))
1292+
return false;
1293+
12871294
for_each_set_bit(link_id, &desired_links, IEEE80211_MLD_MAX_NUM_LINKS) {
12881295
struct ieee80211_bss_conf *link_conf =
12891296
link_conf_dereference_protected(vif, link_id);

0 commit comments

Comments
 (0)