Message ID | 20140115134719.GA11310@jithu@broadcom.com |
---|---|
State | Accepted |
Headers | show |
On Wed, Jan 15, 2014 at 07:17:19PM +0530, Jithu Jance wrote: > Use P2P GO's operating channel info to do a directed scan > during the Join operation. Thanks, applied with some cleanup.
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 7d5667c..8c25970 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -4239,6 +4239,16 @@ static void wpas_p2p_join_scan_req(struct wpa_supplicant *wpa_s, int freq, struct wpabuf *wps_ie, *ies; size_t ielen; int freqs[2] = { 0, 0 }; + int oper_freq; + + if (!freq) { + /* + * If Freq is not provided, check the operating freq of the GO and + * do a directed scan + */ + freq = ((oper_freq = p2p_get_oper_freq(wpa_s->global->p2p, + wpa_s->pending_join_iface_addr)) == -1) ? 0 : oper_freq; + } os_memset(¶ms, 0, sizeof(params));