From 3ca2207932fbe227c29fbfdb62f72b824a16ba8e Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Wed, 29 Mar 2023 10:05:12 +0300 Subject: wifi: iwlwifi: mvm: coex: start handling multiple links Iterate all the links here and check which ones are active, then adjust them accordingly. This is still wrong as far as the RSSI event is concerned (calling iwl_mvm_bt_coex_enable_rssi_event) since we call that now multiple times, which could overwrite the data; we need to either make that per link or call it only once, but need to sort out first what the firmware will be doing for beacon filtering/beacon abort in MLO. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.fe813fd8de5d.I216236717876510e51e4c21c7fac7691925443f1@changeid Signed-off-by: Johannes Berg --- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/utils.c') diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c index cf72b9377411..af31b09c3966 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c @@ -296,6 +296,10 @@ void iwl_mvm_update_smps(struct iwl_mvm *mvm, struct ieee80211_vif *vif, return; mvmvif = iwl_mvm_vif_from_mac80211(vif); + + if (WARN_ON_ONCE(!mvmvif->link[link_id])) + return; + mvmvif->link[link_id]->smps_requests[req_type] = smps_request; for (i = 0; i < NUM_IWL_MVM_SMPS_REQ; i++) { if (mvmvif->link[link_id]->smps_requests[i] == -- cgit v1.2.3