mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 19:13:47 +02:00
wifi: iwlwifi: mld: always do MLO scan before link selection
According to the requirements, if the last scan isn't older than 20 seconds, we can use its results and do the link selection without scanning before. But this applies only when trying to get back to EMLSR, not if the link has bad RSSI/missed beacons. Since an MLO scan is cheap anyway, and results from 20 seconds before are really old, always scan before links switching. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Link: https://patch.msgid.link/20250309073442.a4c96e5c49d4.Ie55697af49435c2c45dccf7c607de5857b370f7a@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
36b79cb091
commit
f31d666f0b
|
|
@ -913,7 +913,7 @@ void iwl_mld_handle_missed_beacon_notif(struct iwl_mld *mld,
|
|||
ieee80211_cqm_beacon_loss_notify(vif, GFP_ATOMIC);
|
||||
|
||||
/* try to switch links, no-op if we don't have MLO */
|
||||
iwl_mld_trigger_link_selection(mld, vif);
|
||||
iwl_mld_int_mlo_scan(mld, vif);
|
||||
}
|
||||
|
||||
/* no more logic if we're not in EMLSR */
|
||||
|
|
|
|||
|
|
@ -289,22 +289,6 @@ int iwl_mld_block_emlsr_sync(struct iwl_mld *mld, struct ieee80211_vif *vif,
|
|||
static void _iwl_mld_select_links(struct iwl_mld *mld,
|
||||
struct ieee80211_vif *vif);
|
||||
|
||||
void iwl_mld_trigger_link_selection(struct iwl_mld *mld,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
bool last_scan_was_recent =
|
||||
time_before(jiffies, mld->scan.last_mlo_scan_jiffies +
|
||||
IWL_MLD_SCAN_EXPIRE_TIME);
|
||||
|
||||
if (last_scan_was_recent) {
|
||||
IWL_DEBUG_EHT(mld, "MLO scan was recent, skip.\n");
|
||||
_iwl_mld_select_links(mld, vif);
|
||||
} else {
|
||||
IWL_DEBUG_EHT(mld, "Doing link selection after MLO scan\n");
|
||||
iwl_mld_int_mlo_scan(mld, vif);
|
||||
}
|
||||
}
|
||||
|
||||
void iwl_mld_unblock_emlsr(struct iwl_mld *mld, struct ieee80211_vif *vif,
|
||||
enum iwl_mld_emlsr_blocked reason)
|
||||
{
|
||||
|
|
@ -334,7 +318,7 @@ void iwl_mld_unblock_emlsr(struct iwl_mld *mld, struct ieee80211_vif *vif,
|
|||
return;
|
||||
|
||||
IWL_DEBUG_INFO(mld, "EMLSR is unblocked\n");
|
||||
iwl_mld_trigger_link_selection(mld, vif);
|
||||
iwl_mld_int_mlo_scan(mld, vif);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -1011,5 +995,5 @@ void iwl_mld_retry_emlsr(struct iwl_mld *mld, struct ieee80211_vif *vif)
|
|||
mld_vif->emlsr.blocked_reasons)
|
||||
return;
|
||||
|
||||
iwl_mld_trigger_link_selection(mld, vif);
|
||||
iwl_mld_int_mlo_scan(mld, vif);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,9 +141,6 @@ void iwl_mld_emlsr_check_bt(struct iwl_mld *mld);
|
|||
|
||||
void iwl_mld_emlsr_check_chan_load(struct iwl_mld *mld);
|
||||
|
||||
void iwl_mld_trigger_link_selection(struct iwl_mld *mld,
|
||||
struct ieee80211_vif *vif);
|
||||
|
||||
/**
|
||||
* iwl_mld_retry_emlsr - Retry entering EMLSR
|
||||
* @mld: MLD context
|
||||
|
|
|
|||
|
|
@ -384,7 +384,7 @@ static void iwl_mld_update_link_sig(struct ieee80211_vif *vif, int sig,
|
|||
/* 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_trigger_link_selection(mld, vif);
|
||||
iwl_mld_int_mlo_scan(mld, vif);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user