aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/link.c
diff options
context:
space:
mode:
authorJohannes Berg <[email protected]>2024-07-03 09:58:51 +0000
committerJohannes Berg <[email protected]>2024-07-04 11:50:04 +0000
commitf27579ff8b9344226db63a902dc9e9cbddf07b74 (patch)
treeba8ffe49bae4401d450f59823e55701915a82878 /drivers/net/wireless/intel/iwlwifi/mvm/link.c
parentwifi: iwlwifi: mvm: align reorder buffer entries to cacheline (diff)
downloadkernel-f27579ff8b9344226db63a902dc9e9cbddf07b74.tar.gz
kernel-f27579ff8b9344226db63a902dc9e9cbddf07b74.zip
wifi: iwlwifi: mvm: simplify EMLSR blocking
If EMLSR is already blocked for the same reason that it's blocked for again, there's no need to actually do any work, so exit early from the function. Also, print the state after modifying it, so it's clearer. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20240703125541.6995464f0bac.Iac9fe3546ca0a0d6bc6666c822a667ab257419a9@changeid Signed-off-by: Johannes Berg <[email protected]>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/link.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/link.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/link.c b/drivers/net/wireless/intel/iwlwifi/mvm/link.c
index 73527781f89a..4e702e7a4b82 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/link.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/link.c
@@ -1033,15 +1033,17 @@ void iwl_mvm_block_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
if (WARN_ON(!(reason & IWL_MVM_BLOCK_ESR_REASONS)))
return;
- if (!(mvmvif->esr_disable_reason & reason)) {
- IWL_DEBUG_INFO(mvm,
- "Blocking EMLSR mode. reason = %s (0x%x)\n",
- iwl_get_esr_state_string(reason), reason);
- iwl_mvm_print_esr_state(mvm, mvmvif->esr_disable_reason);
- }
+ if (mvmvif->esr_disable_reason & reason)
+ return;
+
+ IWL_DEBUG_INFO(mvm,
+ "Blocking EMLSR mode. reason = %s (0x%x)\n",
+ iwl_get_esr_state_string(reason), reason);
mvmvif->esr_disable_reason |= reason;
+ iwl_mvm_print_esr_state(mvm, mvmvif->esr_disable_reason);
+
iwl_mvm_exit_esr(mvm, vif, reason, link_to_keep);
}