aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJithu Jance <jithu@broadcom.com>2014-01-15 13:47:19 (GMT)
committerJouni Malinen <j@w1.fi>2014-01-17 09:57:07 (GMT)
commit37b4198af4a76da82e7345a43f7f28285bde0d60 (patch)
tree70bd5205ac5dae235b3a6fda66247762e1d3e5b6 /wpa_supplicant
parenta691d99ff58e7b0f6cbc2aacfbde7ac985538483 (diff)
downloadhostap-37b4198af4a76da82e7345a43f7f28285bde0d60.zip
hostap-37b4198af4a76da82e7345a43f7f28285bde0d60.tar.gz
hostap-37b4198af4a76da82e7345a43f7f28285bde0d60.tar.bz2
P2P: Use GO's operating channel to optimize scan during join
Use P2P GO's operating channel information, if known, to do a single channel scan during the join operation. Signed-hostap: Jithu Jance <jithu@broadcom.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/p2p_supplicant.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 7d5667c..91ed508 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -4279,6 +4279,18 @@ static void wpas_p2p_join_scan_req(struct wpa_supplicant *wpa_s, int freq,
params.p2p_probe = 1;
params.extra_ies = wpabuf_head(ies);
params.extra_ies_len = wpabuf_len(ies);
+
+ if (!freq) {
+ int oper_freq;
+ /*
+ * If freq is not provided, check the operating freq of the GO
+ * and use a single channel scan on if possible.
+ */
+ oper_freq = p2p_get_oper_freq(wpa_s->global->p2p,
+ wpa_s->pending_join_iface_addr);
+ if (oper_freq > 0)
+ freq = oper_freq;
+ }
if (freq > 0) {
freqs[0] = freq;
params.freqs = freqs;