@@ -6054,8 +6054,12 @@ void wpa_supplicant_update_channel_list(struct wpa_supplicant *wpa_s,
wpa_dbg(ifs, MSG_INFO,
"Channel list changed: 6 GHz was enabled");
- /* Only force a rescan if the 6 GHz band has not been scanned yet. */
- if (!ifs->last_scan_covered_6ghz)
+ /*
+ * Only force a rescan if the 6 GHz band has not been scanned yet,
+ * and the last scan was not explicitly restricted to specific channels
+ * by the caller.
+ */
+ if (!ifs->last_scan_covered_6ghz && !ifs->last_scan_was_restricted)
ifs->crossed_6ghz_dom = true;
}
}
@@ -7065,6 +7069,8 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
}
}
}
+
+ wpa_s->last_scan_was_restricted = !wpa_s->last_scan_all_chan;
}
if (!(data && data->scan_info.external_scan) &&
@@ -1696,6 +1696,7 @@ struct wpa_supplicant {
bool is_6ghz_enabled;
bool crossed_6ghz_dom;
bool last_scan_covered_6ghz;
+ bool last_scan_was_restricted;
bool last_scan_all_chan;
bool last_scan_non_coloc_6ghz;
bool support_6ghz;
The 6 GHz coverage check forces a rescan whenever a scan doesn't cover 6 GHz, even when the scan was deliberately restricted to one channel. This reintroduced a redundant rescan. Skip forcing the rescan when the last scan was explicitly restricted. Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com> --- wpa_supplicant/events.c | 10 ++++++++-- wpa_supplicant/wpa_supplicant_i.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-)