diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 5e204655c..677b729d5 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -667,6 +667,16 @@ struct wpa_driver_scan_params { */ unsigned int p2p_include_6ghz:1; + /** + * non_coloc_6ghz - Force scanning of non-PSC 6 GHz channels + * + * If this is set, the driver should scan non-PSC channels from the + * scan request even if neighbor reports from 2.4/5 GHz APs did not + * report a co-located AP on these channels. The default is to scan + * non-PSC channels only if a co-located AP was reported on the channel. + */ + unsigned int non_coloc_6ghz:1; + /* * NOTE: Whenever adding new parameters here, please make sure * wpa_scan_clone_params() and wpa_scan_free_params() get updated with diff --git a/src/drivers/driver_nl80211_scan.c b/src/drivers/driver_nl80211_scan.c index b82e5af2a..c31ed6eb1 100644 --- a/src/drivers/driver_nl80211_scan.c +++ b/src/drivers/driver_nl80211_scan.c @@ -203,6 +203,21 @@ nl80211_scan_common(struct i802_bss *bss, u8 cmd, goto fail; } nla_nest_end(msg, ssids); + + /* + * If allowed, scan for 6 GHz APs that are reported by other + * APs. Note that if the flag is not set and 6 GHz channels are + * to be scanned, it is highly likely that non-PSC channels + * would be scanned passively (due to the Probe Request frame + * transmission restrictions mandated in IEEE Std 802.11ax-2021, + * 26.17.2.3 (Scanning in the 6 GHz band). Passive scanning of + * all non-PSC channels would take a significant amount of time. + */ + if (!params->non_coloc_6ghz) { + wpa_printf(MSG_DEBUG, + "nl80211: Scan co-located APs on 6 GHz"); + scan_flags |= NL80211_SCAN_FLAG_COLOCATED_6GHZ; + } } else { wpa_printf(MSG_DEBUG, "nl80211: Passive scan requested"); } diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index abd48edb7..ce29d9953 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -2915,6 +2915,7 @@ wpa_scan_clone_params(const struct wpa_driver_scan_params *src) params->relative_adjust_band = src->relative_adjust_band; params->relative_adjust_rssi = src->relative_adjust_rssi; params->p2p_include_6ghz = src->p2p_include_6ghz; + params->non_coloc_6ghz = src->non_coloc_6ghz; return params; failed: