]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:37:08 +0000 (15:37 -0500)
[ Upstream commit 14a4aca568f6e78af7564c6fc5f1ecc1a5a32c33 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intel/iwlwifi/mld/link.c
drivers/net/wireless/intel/iwlwifi/mld/stats.c

index 960dcd208f005c791d136d8402a9ae0e212d8573..131190977d4b0800c9fd77cf33310e4d657a9d1a 100644 (file)
@@ -573,8 +573,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 =