summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>2024-02-26 19:21:40 +0200
committeriwlwifi publisher <>2024-04-17 13:00:11 +0000
commitc66174206dc9c5f85e94f4c6b0b43580897d95d8 (patch)
tree38cb3ad5d30c0067f38c5f30bf1a1a0cc3daba1c
parent5fa937814762fd4a8ed59772d9436cadab41b73d (diff)
downloadbackport-iwlwifi-c66174206dc9c5f85e94f4c6b0b43580897d95d8.tar.gz
wifi: iwlwifi: mvm: don't recompute EMLSR mode in can_activate_links
mac80211 invokes the driver callback drv_can_activate_links() from ieee80211_set_active_links to verify it can activate the desired link combination. However, ieee80211_set_active_links is called with more than one link in 2 cases: - After driver's link selection decided to enter EMLSR - From debugfs, for testing purposes. For both cases there is no need to recompute all the considerations determining whether to activate EMLSR. Instead, only check if the vif is not blocked for EMLSR. type=cleanup ticket=none Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Change-Id: I65e4698b730a8652ad8d1c01420aabb41a1d04fd Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/96322 tested: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM> Reviewed-by: Johannes Berg <johannes.berg@intel.com> x-iwlwifi-stack-dev: 55e8ad51c34afb67b5df2cc28bfe3b645f00766a
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/link.c1
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c29
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/mvm.h11
-rw-r--r--versions2
4 files changed, 8 insertions, 35 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/link.c b/drivers/net/wireless/intel/iwlwifi/mvm/link.c
index 8e1f90268c..cc6c2305c5 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/link.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/link.c
@@ -518,6 +518,7 @@ unsigned int iwl_mvm_get_link_grade(struct ieee80211_bss_conf *link_conf)
}
EXPORT_SYMBOL_IF_IWLWIFI_KUNIT(iwl_mvm_get_link_grade);
+static
u8 iwl_mvm_set_link_selection_data(struct ieee80211_vif *vif,
struct iwl_mvm_link_sel_data *data,
unsigned long usable_links,
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
index 3ce376b007..db9fefb935 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
@@ -1193,30 +1193,6 @@ bool iwl_mvm_esr_allowed_on_vif(struct iwl_mvm *mvm,
return !(mvmvif->esr_disable_reason & ~IWL_MVM_ESR_BLOCKED_COEX);
}
-/*
- * This function receives a bitmap of usable links and check if we can enter
- * eSR on those links.
- */
-static bool iwl_mvm_can_enter_esr(struct iwl_mvm *mvm,
- struct ieee80211_vif *vif,
- unsigned long desired_links)
-{
- struct iwl_mvm_link_sel_data data[IEEE80211_MLD_MAX_NUM_LINKS];
- u8 best_link, n_data;
-
- if (!iwl_mvm_esr_allowed_on_vif(mvm, vif))
- return false;
-
- n_data = iwl_mvm_set_link_selection_data(vif, data, desired_links,
- &best_link);
-
- if (n_data != 2)
- return false;
-
-
- return iwl_mvm_mld_valid_link_pair(vif, &data[0], &data[1]);
-}
-
static bool iwl_mvm_mld_can_activate_links(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
u16 desired_links)
@@ -1237,8 +1213,9 @@ static bool iwl_mvm_mld_can_activate_links(struct ieee80211_hw *hw,
}
/* If it is an eSR device, check that we can enter eSR */
- if (iwl_mvm_is_esr_supported(mvm->fwrt.trans))
- ret = iwl_mvm_can_enter_esr(mvm, vif, desired_links);
+ ret = iwl_mvm_is_esr_supported(mvm->fwrt.trans) &&
+ iwl_mvm_esr_allowed_on_vif(mvm, vif);
+
unlock:
mutex_unlock(&mvm->mutex);
return ret;
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
index 5e8b047380..e6de51cd60 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
@@ -2031,23 +2031,18 @@ void iwl_mvm_select_links(struct iwl_mvm *mvm, struct ieee80211_vif *vif);
u8 iwl_mvm_get_primary_link(struct ieee80211_vif *vif);
u8 iwl_mvm_get_other_link(struct ieee80211_vif *vif, u8 link_id);
-#if IS_ENABLED(CPTCFG_IWLWIFI_KUNIT_TESTS)
-unsigned int iwl_mvm_get_link_grade(struct ieee80211_bss_conf *link_conf);
-#endif
-
struct iwl_mvm_link_sel_data {
u8 link_id;
enum nl80211_band band;
u16 grade;
};
-u8 iwl_mvm_set_link_selection_data(struct ieee80211_vif *vif,
- struct iwl_mvm_link_sel_data *data,
- unsigned long usable_links,
- u8 *best_link_idx);
+#if IS_ENABLED(CPTCFG_IWLWIFI_KUNIT_TESTS)
+unsigned int iwl_mvm_get_link_grade(struct ieee80211_bss_conf *link_conf);
bool iwl_mvm_mld_valid_link_pair(struct ieee80211_vif *vif,
const struct iwl_mvm_link_sel_data *a,
const struct iwl_mvm_link_sel_data *b);
+#endif
/* AP and IBSS */
bool iwl_mvm_start_ap_ibss_common(struct ieee80211_hw *hw,
diff --git a/versions b/versions
index 92499f6835..2964f94f92 100644
--- a/versions
+++ b/versions
@@ -2,4 +2,4 @@ BACKPORTS_VERSION="(see git)"
BACKPORTED_KERNEL_VERSION="(see git)"
BACKPORTED_KERNEL_NAME="iwlwifi"
BACKPORTS_BUILD_TSTAMP=__DATE__ \" \" __TIME__
-BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:master:11950:4c897125"
+BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:master:11951:55e8ad51"