summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>2024-03-02 21:05:54 +0200
committeriwlwifi publisher <>2024-04-17 13:04:13 +0000
commita3aeb06e80d721bf834bd1f03a22218a3e8b43cb (patch)
treef546e3fa9772cceea7dc0f457caa844c7e30919f
parent28056601d24af8915e953f506f1baeefb4d9cfac (diff)
downloadbackport-iwlwifi-a3aeb06e80d721bf834bd1f03a22218a3e8b43cb.tar.gz
wifi: iwlwifi: mvm: Always allow entering EMLSR from debugfs
EMLSR can't be activated from mac80211. Except for the debugfs, which is intended for testing purposes. Currently we don't allow entering EMLSR from debugfs if EMLSR is blocked, i.e. if mvmvif::esr_disable_reason is not 0. But we need a way to activate EMLSR regardless of the vif being blocked, for testing. Remove the check of esr_disable_reason type=feature ticket=none Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Change-Id: Iad60e22a0d7e2b2b989051e1140b6dc98bef7bcc Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/97030 tested: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM> automatic-review: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM> Reviewed-by: Johannes Berg <johannes.berg@intel.com> x-iwlwifi-stack-dev: 1a0a3cee47f28c0973baeba82e2d8a073c1831c0
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/link.c6
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c13
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/mvm.h3
-rw-r--r--versions2
4 files changed, 9 insertions, 15 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/link.c b/drivers/net/wireless/intel/iwlwifi/mvm/link.c
index d031744971..cdb4b84fa0 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/link.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/link.c
@@ -702,9 +702,9 @@ void iwl_mvm_select_links(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
primary_link = best_link->link_id;
new_active_links = BIT(best_link->link_id);
- /* eSR is not supported/allowed, or only one usable link */
- if (max_active_links == 1 || !iwl_mvm_esr_allowed_on_vif(mvm, vif) ||
- n_data == 1)
+ /* eSR is not supported/blocked, or only one usable link */
+ if (max_active_links == 1 || !iwl_mvm_vif_has_esr_cap(mvm, vif) ||
+ mvmvif->esr_disable_reason || n_data == 1)
goto set_active;
for (u8 a = 0; a < n_data; a++)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
index 391b05cd59..407d0741bf 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
@@ -1191,10 +1191,8 @@ iwl_mvm_mld_change_sta_links(struct ieee80211_hw *hw,
return ret;
}
-bool iwl_mvm_esr_allowed_on_vif(struct iwl_mvm *mvm,
- struct ieee80211_vif *vif)
+bool iwl_mvm_vif_has_esr_cap(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
{
- struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
const struct wiphy_iftype_ext_capab *ext_capa;
lockdep_assert_held(&mvm->mutex);
@@ -1208,11 +1206,8 @@ bool iwl_mvm_esr_allowed_on_vif(struct iwl_mvm *mvm,
ext_capa = cfg80211_get_iftype_ext_capa(mvm->hw->wiphy,
ieee80211_vif_type_p2p(vif));
- if (!ext_capa ||
- !(ext_capa->eml_capabilities & IEEE80211_EML_CAP_EMLSR_SUPP))
- return false;
-
- return !mvmvif->esr_disable_reason;
+ return (ext_capa &&
+ (ext_capa->eml_capabilities & IEEE80211_EML_CAP_EMLSR_SUPP));
}
static bool iwl_mvm_mld_can_activate_links(struct ieee80211_hw *hw,
@@ -1236,7 +1231,7 @@ static bool iwl_mvm_mld_can_activate_links(struct ieee80211_hw *hw,
/* If it is an eSR device, check that we can enter eSR */
ret = iwl_mvm_is_esr_supported(mvm->fwrt.trans) &&
- iwl_mvm_esr_allowed_on_vif(mvm, vif);
+ iwl_mvm_vif_has_esr_cap(mvm, vif);
unlock:
mutex_unlock(&mvm->mutex);
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
index 393eb70951..64632fcc3e 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
@@ -2927,8 +2927,7 @@ int iwl_mvm_roc_add_cmd(struct iwl_mvm *mvm,
int duration, u32 activity);
/* EMLSR */
-bool iwl_mvm_esr_allowed_on_vif(struct iwl_mvm *mvm,
- struct ieee80211_vif *vif);
+bool iwl_mvm_vif_has_esr_cap(struct iwl_mvm *mvm, struct ieee80211_vif *vif);
void iwl_mvm_block_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
enum iwl_mvm_esr_state reason,
u8 link_to_keep);
diff --git a/versions b/versions
index 37900c1a42..999320988e 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:11969:405585e8"
+BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:master:11970:1a0a3cee"