diff options
author | Miri Korenblit <miriam.rachel.korenblit@intel.com> | 2024-04-16 13:54:03 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2024-04-19 11:16:33 +0300 |
commit | 07bf5297d392069021055800ef48a1106a5c85b5 (patch) | |
tree | 930587b0ae3182f2fc03053258e3fbac03432825 /drivers/net/wireless/intel/iwlwifi/mvm/coex.c | |
parent | 1b9b7d37c87c17b98d293e1317238373f296ebab (diff) | |
download | linux-07bf5297d392069021055800ef48a1106a5c85b5.tar.xz |
wifi: iwlwifi: mvm: Implement new link selection algorithm
Replaces the current logic with a new algorithm based on the link
grading introduced in a previous patch.
The new selection algorithm will be invoked upon successful scan to ensure
it has the necessary updated data it needs.
This update delegates the selection logic as the primary link
determiner in EMLSR mode, storing it in mvmvif to avoid repeated
calculations, as the result may vary.
Additionally, includes tests for iwl_mvm_valid_link_pair to validate
link pairs for EMLSR.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://msgid.link/20240416134215.309fb1b3fe44.I5baf0c293c89a5a28bd1a6386bf9ca6d2bf61ab8@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/coex.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/coex.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/coex.c b/drivers/net/wireless/intel/iwlwifi/mvm/coex.c index f31752bcd2a2..54f086d9457f 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/coex.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/coex.c @@ -282,7 +282,7 @@ static void iwl_mvm_bt_coex_enable_esr(struct iwl_mvm *mvm, static bool iwl_mvm_bt_coex_calculate_esr_mode(struct iwl_mvm *mvm, struct ieee80211_vif *vif, - int link_id, int primary_link) + int link_id) { struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); struct iwl_mvm_vif_link_info *link_info = mvmvif->link[link_id]; @@ -298,7 +298,7 @@ iwl_mvm_bt_coex_calculate_esr_mode(struct iwl_mvm *mvm, return true; /* If LB link is the primary one we should always disable eSR */ - if (link_id == primary_link) + if (link_id == iwl_mvm_get_primary_link(vif)) return false; /* The feature is not supported */ @@ -340,17 +340,13 @@ void iwl_mvm_bt_coex_update_link_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif, int link_id) { - unsigned long usable_links = ieee80211_vif_usable_links(vif); - int primary_link = iwl_mvm_mld_get_primary_link(mvm, vif, - usable_links); bool enable; - /* Not assoc, not MLD vif or only one usable link */ - if (primary_link < 0) + if (!ieee80211_vif_is_mld(vif) || + !iwl_mvm_vif_from_mac80211(vif)->authorized) return; - enable = iwl_mvm_bt_coex_calculate_esr_mode(mvm, vif, link_id, - primary_link); + enable = iwl_mvm_bt_coex_calculate_esr_mode(mvm, vif, link_id); iwl_mvm_bt_coex_enable_esr(mvm, vif, enable); } |