wifi: iwlwifi: mld: fix bad RSSI handling
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>
Sun, 9 Mar 2025 05:36:52 +0000 (07:36 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 11 Mar 2025 15:29:26 +0000 (16:29 +0100)
If the RSSI is dropping to below the threshold, we need to do a MLO
scan to try select a better link.
This is true also if the connection doesn't have EMLSR capability,
and also if we are in EMLSR.
Fix the logic to always check the RSSI (and do a MLO scan if needed).

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20250309073442.a31b95888244.If6dca30d657658fa902b19e07b6fbc86c48d69cb@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mld/stats.c

index a9d3860d8f9cbedff3ee79a71358d6e88c556df5..75cb204c241947d428a78fc4bd256b6c79c36af7 100644 (file)
@@ -378,15 +378,11 @@ static void iwl_mld_update_link_sig(struct ieee80211_vif *vif, int sig,
 
        /* TODO: task=statistics handle CQM notifications */
 
-       if (!iwl_mld_vif_has_emlsr_cap(vif))
-               return;
+       if (sig < IWL_MLD_LOW_RSSI_MLO_SCAN_THRESH)
+               iwl_mld_int_mlo_scan(mld, vif);
 
-       /* Handle inactive EMLSR, check whether to switch links */
-       if (!iwl_mld_emlsr_active(vif)) {
-               if (sig < IWL_MLD_LOW_RSSI_MLO_SCAN_THRESH)
-                       iwl_mld_int_mlo_scan(mld, vif);
+       if (!iwl_mld_emlsr_active(vif))
                return;
-       }
 
        /* We are in EMLSR, check if we need to exit */
        exit_emlsr_thresh =