From b9be67fb4207592eed3880725fa51648ef2f538d Mon Sep 17 00:00:00 2001 From: Ilan Peer Date: Wed, 4 Oct 2023 12:36:27 +0300 Subject: wifi: iwlwifi: mvm: Add basic link selection logic Add simple logic that would allow using EMLSR in case there are multiple valid links: - In case the connection establishment has just been completed try to find a valid link pair for EMLSR functionality where one of the links in the pair is the current active link. - In case the valid links changed after connection was already established, try to find a valid link pair for EMLSR functionality, in case the EMSLR is not active yet. If a valid link pair is found call mac80211 to asynchronously set the new link pair, otherwise continue using the current active links. Signed-off-by: Ilan Peer Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20231004123422.0c7b89ab29c2.I6600bd16551d75e2bf520d8d0add525568a9f85f@changeid Signed-off-by: Johannes Berg --- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c') diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 56965d6e6499..79ecfbb89c45 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -3803,6 +3803,13 @@ iwl_mvm_sta_state_assoc_to_authorized(struct iwl_mvm *mvm, callbacks->mac_ctxt_changed(mvm, vif, false); iwl_mvm_mei_host_associated(mvm, vif, mvm_sta); + + /* when client is authorized (AP station marked as such), + * try to enable more links + */ + if (vif->type == NL80211_IFTYPE_STATION && + !test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) + iwl_mvm_mld_select_links(mvm, vif, false); } mvm_sta->authorized = true; -- cgit