P2P: support preferred GO band
Allow specifying preferred GO band in addition to frequency. If a band
is specified, the first two scans will be limited to only DFS channels
to shorten scan times, and the next two will scan the entire band.
Bug: 233925359
Test: Used WifiP2PTest app to specify band and looked at logs to confirm
that first two scans were non-radar and third was radar included. Also
verified that specificying a single channel still works - all scans are
on that channel.
Change-Id: I2d558bb2c00bf3925ad92f5f036335cd46b9c609
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 00493d0..ab1555e 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -365,9 +365,9 @@
wpa_printf(MSG_DEBUG,
"P2P: Exclude 6 GHz channels - update the scan frequency list");
wpa_add_scan_freqs_list(wpa_s, HOSTAPD_MODE_IEEE80211G, params,
- 0);
+ false, false);
wpa_add_scan_freqs_list(wpa_s, HOSTAPD_MODE_IEEE80211A, params,
- 0);
+ false, false);
}
ret = wpa_drv_scan(wpa_s, params);
if (ret == 0)
@@ -5560,9 +5560,9 @@
wpa_printf(MSG_DEBUG,
"P2P: 6 GHz disabled - update the scan frequency list");
wpa_add_scan_freqs_list(wpa_s, HOSTAPD_MODE_IEEE80211G, ¶ms,
- 0);
+ false, false);
wpa_add_scan_freqs_list(wpa_s, HOSTAPD_MODE_IEEE80211A, ¶ms,
- 0);
+ false, false);
}
ielen = p2p_scan_ie_buf_len(wpa_s->global->p2p);