]> www.infradead.org Git - nvme.git/commit
wifi: iwlwifi: mvm: fix re-enabling EMLSR
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>
Wed, 5 Jun 2024 11:05:06 +0000 (14:05 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 12 Jun 2024 11:04:27 +0000 (13:04 +0200)
commitbd40215b19d255b433a91a8bb8088937e5db4284
tree2cfcd7d58b1d59b7c691cbf21a8a43831e8934af
parent0d91a2bfc3dcae0a586e67c904abef002c848e6c
wifi: iwlwifi: mvm: fix re-enabling EMLSR

When EMLSR gets unblocked, the current code checks if the last exit was
due to an EXIT reason (as opposed to a BLOCKING one), and if so, it
does nothing, as in this case a MLO scan was scheduled to run in 30
seconds.

But the code doesn't consider the time that passed from the last exit,
so if immediately after the exit a blocker occurred (e.g. non-BSS
interface), and lasts for more than 30 seconds, then the MLO scan and the
following link selection will decide not to enter EMLSR, and when the
unblocking event finally happens, the reason is still set to the EXIT one,
so it will do nothing, and we will not have the chance to re-enable EMLSR.

Fix this by checking also the time that has passed since the last exit,
only if it is less than 30 seconds, we can count on the scheduled MLO
scan.

Note that clearing the reason itself can't be done since it is needed
for the EMLSR prevention mechanism.

Fixes: 2f33561ea8f9 ("wifi: iwlwifi: mvm: trigger link selection after exiting EMLSR")
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://msgid.link/20240605140327.58556fc4cfa9.I4c55b3cd9f20b21b37f28258d0fb6842ba413966@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/link.c