diff options
author | Miri Korenblit <miriam.rachel.korenblit@intel.com> | 2024-04-16 12:54:06 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2024-04-19 10:16:33 +0200 |
commit | 48ac6c8ed719478ab8b3035406319c7c98a8f134 (patch) | |
tree | 9b3345032aace9bd0950233c260932d060623fe5 /drivers/net/wireless/intel/iwlwifi/mvm/link.c | |
parent | wifi: iwlwifi: mvm: init vif works only once (diff) | |
download | linux-48ac6c8ed719478ab8b3035406319c7c98a8f134.tar.xz linux-48ac6c8ed719478ab8b3035406319c7c98a8f134.zip |
wifi: iwlwifi: mvm: exit EMLSR upon missed beacon
In case of more than 6 missed beacons on one of the links,
exit EMLSR by deactivating that link.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240416134215.f9111c79cb53.Ie95ea60149a9bc4367f6b338b37c8635051351ba@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/link.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/link.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/link.c b/drivers/net/wireless/intel/iwlwifi/mvm/link.c index 8a4b1b89791c..acbe8e6f14c8 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/link.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/link.c @@ -527,6 +527,7 @@ u8 iwl_mvm_set_link_selection_data(struct ieee80211_vif *vif, u16 max_grade = 0; unsigned long link_id; + /* TODO: don't select links that weren't discovered in the last scan */ for_each_set_bit(link_id, &usable_links, IEEE80211_MLD_MAX_NUM_LINKS) { struct ieee80211_bss_conf *link_conf = link_conf_dereference_protected(vif, link_id); @@ -692,6 +693,25 @@ u8 iwl_mvm_get_primary_link(struct ieee80211_vif *vif) return __ffs(vif->active_links); } +/* + * For non-MLO/single link, this will return the deflink/single active link, + * respectively + */ +u8 iwl_mvm_get_other_link(struct ieee80211_vif *vif, u8 link_id) +{ + switch (hweight16(vif->active_links)) { + case 0: + return 0; + default: + WARN_ON(1); + fallthrough; + case 1: + return __ffs(vif->active_links); + case 2: + return __ffs(vif->active_links & ~BIT(link_id)); + } +} + /* API to exit eSR mode */ void iwl_mvm_exit_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif, enum iwl_mvm_esr_state reason, @@ -720,8 +740,6 @@ void iwl_mvm_exit_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif, ieee80211_set_active_links_async(vif, new_active_links); } -#define IWL_MVM_BLOCK_ESR_REASONS IWL_MVM_ESR_BLOCKED_COEX - void iwl_mvm_block_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif, enum iwl_mvm_esr_state reason, u8 link_to_keep) |