[PATCH 1/1] P2P: Use GO's operating channel to do a directed scan during the Join

Jithu Jance jithu
Wed Jan 15 05:47:19 PST 2014


Use P2P GO's operating channel info to do a directed scan
during the Join operation.

Signed-hostap: Jithu Jance <jithu at broadcom.com>
---
 wpa_supplicant/p2p_supplicant.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

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(&params, 0, sizeof(params));

--
1.7.9.5




More information about the Hostap mailing list