Browse Source

P2P: Add P2P IE into Probe Request frames

Jouni Malinen 14 years ago
parent
commit
0e65037c27
1 changed files with 12 additions and 0 deletions
  1. 12 0
      wpa_supplicant/scan.c

+ 12 - 0
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, &params.num_filter_ssids);