From 0e65037c271304d220b807ad54cd70512311641a Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 18 Jul 2010 14:30:25 -0700 Subject: [PATCH] P2P: Add P2P IE into Probe Request frames --- wpa_supplicant/scan.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index 19210ecc0..d74174e0f 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -22,6 +22,8 @@ #include "driver_i.h" #include "mlme.h" #include "wps_supplicant.h" +#include "p2p_supplicant.h" +#include "p2p/p2p.h" #include "notify.h" #include "bss.h" #include "scan.h" @@ -405,6 +407,16 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx) } #endif /* CONFIG_WPS */ +#ifdef CONFIG_P2P + if (wps_ie) { + if (wpabuf_resize(&wps_ie, 100) == 0) { + wpas_p2p_scan_ie(wpa_s, wps_ie); + params.extra_ies = wpabuf_head(wps_ie); + params.extra_ies_len = wpabuf_len(wps_ie); + } + } +#endif /* CONFIG_P2P */ + params.filter_ssids = wpa_supplicant_build_filter_ssids( wpa_s->conf, ¶ms.num_filter_ssids);