wifi: iwlwifi: mvm: implement EMLSR prevention mechanism.
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>
Tue, 16 Apr 2024 10:54:07 +0000 (13:54 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 19 Apr 2024 08:16:33 +0000 (10:16 +0200)
commit492bc4e49facfdacfebbe39eead37ac54713670d
tree3be9bb7324f8dc8cd3fa5c587736fbecc7606a8a
parent48ac6c8ed719478ab8b3035406319c7c98a8f134
wifi: iwlwifi: mvm: implement EMLSR prevention mechanism.

Address scenarios where repeated entry and exit from EMLSR occur, such as
encountering missed beacons on a specific link,
while still discovering that link during a scan.

To mitigate this, introduce the EMLSR prevention mechanism, which operates
as follows:
- On each exit from EMLSR event, record the timestamp and the exit
  reason.
- If two consecutive exits happen for the same reason within a
  400-second window, enforce a 300-second EMLSR prevention.
- If a third exit for the same reason occurs within 400 seconds from the
  second exit, enforce an extended EMLSR prevention of 600 seconds.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://msgid.link/20240416134215.d820ee98b300.I6406db40cf25eabdba602afd783466473b909216@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/link.c
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h