diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index ab8a624a5..3d8e6630b 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -8838,6 +8838,7 @@ static void wpas_ctrl_scan(struct wpa_supplicant *wpa_s, char *params, unsigned int manual_scan_only_new = 0; unsigned int scan_only = 0; unsigned int scan_id_count = 0; + unsigned int manual_non_coloc_6ghz = 0; int scan_id[MAX_SCAN_ID]; void (*scan_res_handler)(struct wpa_supplicant *wpa_s, struct wpa_scan_results *scan_res); @@ -8915,6 +8916,10 @@ static void wpas_ctrl_scan(struct wpa_supplicant *wpa_s, char *params, os_strstr(params, "wildcard_ssid=1") != NULL; } + pos = os_strstr(params, "non_coloc_6ghz="); + if (pos) + manual_non_coloc_6ghz = !!atoi(pos + 15); + pos = params; while (pos && *pos != '\0') { if (os_strncmp(pos, "ssid ", 5) == 0) { @@ -8984,6 +8989,7 @@ static void wpas_ctrl_scan(struct wpa_supplicant *wpa_s, char *params, wpa_s->manual_scan_use_id = manual_scan_use_id; wpa_s->manual_scan_only_new = manual_scan_only_new; wpa_s->scan_id_count = scan_id_count; + wpa_s->manual_non_coloc_6ghz = manual_non_coloc_6ghz; os_memcpy(wpa_s->scan_id, scan_id, scan_id_count * sizeof(int)); wpa_s->scan_res_handler = scan_res_handler; os_free(wpa_s->manual_scan_freqs); @@ -9007,6 +9013,7 @@ static void wpas_ctrl_scan(struct wpa_supplicant *wpa_s, char *params, wpa_s->manual_scan_use_id = manual_scan_use_id; wpa_s->manual_scan_only_new = manual_scan_only_new; wpa_s->scan_id_count = scan_id_count; + wpa_s->manual_non_coloc_6ghz = manual_non_coloc_6ghz; os_memcpy(wpa_s->scan_id, scan_id, scan_id_count * sizeof(int)); wpa_s->scan_res_handler = scan_res_handler; os_free(wpa_s->manual_scan_freqs); diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index ce29d9953..102c544d4 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -1328,6 +1328,12 @@ ssid_list_set: } } + if (wpa_s->last_scan_req == MANUAL_SCAN_REQ && + wpa_s->manual_non_coloc_6ghz) { + wpa_dbg(wpa_s, MSG_DEBUG, "Collocated 6 GHz logic is disabled"); + params.non_coloc_6ghz = 1; + } + scan_params = ¶ms; scan: diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h index 4dd9dd8b5..b4af76ed8 100644 --- a/wpa_supplicant/wpa_supplicant_i.h +++ b/wpa_supplicant/wpa_supplicant_i.h @@ -884,6 +884,7 @@ struct wpa_supplicant { unsigned int own_scan_requested:1; unsigned int own_scan_running:1; unsigned int clear_driver_scan_cache:1; + unsigned int manual_non_coloc_6ghz:1; unsigned int manual_scan_id; int scan_interval; /* time in sec between scans to find suitable AP */ int normal_scans; /* normal scans run before sched_scan */