]> www.infradead.org Git - users/hch/misc.git/commitdiff
wifi: iwlwifi: mld: trigger mlo scan only when not in EMLSR
authorSomashekhar Puttagangaiah <somashekhar.puttagangaiah@intel.com>
Tue, 26 Aug 2025 15:54:51 +0000 (18:54 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Thu, 28 Aug 2025 06:56:42 +0000 (09:56 +0300)
When beacon loss happens or the RSSI drops, trigger MLO scan only
if not in EMLSR. The link switch was meant to be done when we are
not in EMLSR and we can try to switch to a better link.
If in EMLSR, we exit first and then trigger MLO scan.

Signed-off-by: Somashekhar Puttagangaiah <somashekhar.puttagangaiah@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250826184046.f6ae8e3882cf.I60901c16487371b8e62019bd0bf25c45ab23752f@changeid
drivers/net/wireless/intel/iwlwifi/mld/link.c
drivers/net/wireless/intel/iwlwifi/mld/stats.c

index 782fc41aa1c31446385d1938e24f3293fb0c368d..dfaa6fbf8a54d24a775a53626624045b168c2f3c 100644 (file)
@@ -572,8 +572,11 @@ void iwl_mld_handle_missed_beacon_notif(struct iwl_mld *mld,
        if (missed_bcon_since_rx > IWL_MLD_MISSED_BEACONS_THRESHOLD) {
                ieee80211_cqm_beacon_loss_notify(vif, GFP_ATOMIC);
 
-               /* try to switch links, no-op if we don't have MLO */
-               iwl_mld_int_mlo_scan(mld, vif);
+               /* Not in EMLSR and we can't hear the link.
+                * Try to switch to a better link. EMLSR case is handled below.
+                */
+               if (!iwl_mld_emlsr_active(vif))
+                       iwl_mld_int_mlo_scan(mld, vif);
        }
 
        /* no more logic if we're not in EMLSR */
index cbc64db5eab6f8c253bff54b1a1b3796c5911ed0..7b8709716324ab4f53df54f9159fb562ae83309b 100644 (file)
@@ -379,11 +379,14 @@ static void iwl_mld_update_link_sig(struct ieee80211_vif *vif, int sig,
 
        /* TODO: task=statistics handle CQM notifications */
 
-       if (sig < IWL_MLD_LOW_RSSI_MLO_SCAN_THRESH)
-               iwl_mld_int_mlo_scan(mld, vif);
-
-       if (!iwl_mld_emlsr_active(vif))
+       if (!iwl_mld_emlsr_active(vif)) {
+               /* We're not in EMLSR and our signal is bad,
+                * try to switch link maybe. EMLSR will be handled below.
+                */
+               if (sig < IWL_MLD_LOW_RSSI_MLO_SCAN_THRESH)
+                       iwl_mld_int_mlo_scan(mld, vif);
                return;
+       }
 
        /* We are in EMLSR, check if we need to exit */
        exit_emlsr_thresh =