Search Linux Wireless

[PATCH 05/15] wifi: iwlwifi: mvm: don't always unblock EMLSR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When an event occurs to unblock EMLSR, the code attempts to re-enable
EMLSR. However, the current implementation always tries to activate
EMLSR, regardless of whether the blocker was set before the unblocking
event or not. If EMLSR was already unblocked, there is no need to
re-activate it.

Fixes: 6cf7df9f013f ("wifi: iwlwifi: mvm: Add helper functions to update EMLSR status")
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@xxxxxxxxx>
Reviewed-by: Johannes Berg <johannes.berg@xxxxxxxxx>
---
 drivers/net/wireless/intel/iwlwifi/mvm/link.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/link.c b/drivers/net/wireless/intel/iwlwifi/mvm/link.c
index 1ce52adf3173..79f048f54a21 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/link.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/link.c
@@ -956,9 +956,11 @@ void iwl_mvm_unblock_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, "Unblocking EMSLR mode. reason = 0x%x\n",
-			       reason);
+	/* No Change */
+	if (!(mvmvif->esr_disable_reason & reason))
+		return;
+
+	IWL_DEBUG_INFO(mvm, "Unblocking EMSLR mode. reason = 0x%x\n", reason);
 
 	mvmvif->esr_disable_reason &= ~reason;
 
-- 
2.34.1





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux