From: Jouni Malinen Date: Tue, 28 Feb 2012 22:02:34 +0000 (+0200) Subject: P2P: Use specific SSID in scan for provisioning step X-Git-Tag: hostap_2_0~826 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a21c05db231ed2ccfbf6c006e1dbf64fcbda943d;p=thirdparty%2Fhostap.git P2P: Use specific SSID in scan for provisioning step Since the P2P client learns the SSID of the group during GO Negotiation, use the specific SSID in the Probe Request frames during the provisioning step. This helps in avoiding unnecessary Probe Response frames from other P2P GOs or APs. Signed-hostap: Jouni Malinen --- diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index 25b56b7d6..497900fdc 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -512,6 +512,17 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx) } } +#ifdef CONFIG_P2P + if (wpa_s->p2p_in_provisioning && wpa_s->go_params) { + wpa_printf(MSG_DEBUG, "P2P: Use specific SSID for scan during " + "P2P provisioning"); + params.ssids[0].ssid = wpa_s->go_params->ssid; + params.ssids[0].ssid_len = wpa_s->go_params->ssid_len; + params.num_ssids = 1; + goto ssid_list_set; + } +#endif /* CONFIG_P2P */ + /* Find the starting point from which to continue scanning */ ssid = wpa_s->conf->ssid; if (wpa_s->prev_scan_ssid != WILDCARD_SSID_SCAN) { @@ -607,6 +618,9 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx) wpa_dbg(wpa_s, MSG_DEBUG, "Starting AP scan for wildcard " "SSID"); } +#ifdef CONFIG_P2P +ssid_list_set: +#endif /* CONFIG_P2P */ wpa_supplicant_optimize_freqs(wpa_s, ¶ms); extra_ie = wpa_supplicant_extra_ies(wpa_s, ¶ms);