[PATCH 1/3] WPS: Notify about WPS PBC event in Enrollee mode

Jörg Krause joerg.krause at embedded.rocks
Thu Mar 9 01:59:48 PST 2017

For now, the event "WPS-PBC-ACTIVE" is only generated when wpa_supplicant is
operating as WPS registrar whereas "WPS-SUCCESS" or "WPS-TIMEOUT" are generated
for both, the registrar and the enrollee mode.

Also generate the event when wpa_supplicant is operating as WPS enrollee to
allow monitoring the begin and the end of a WPS PBC process.

Signed-off-by: Jörg Krause <joerg.krause at embedded.rocks>
 wpa_supplicant/wps_supplicant.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c
index 78c455e75..58906ca2c 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -21,6 +21,7 @@
 #include "eap_peer/eap.h"
 #include "eapol_supp/eapol_supp_sm.h"
 #include "rsn_supp/wpa.h"
+#include "wps/wps_i.h"
 #include "wps/wps_attr_parse.h"
 #include "config.h"
 #include "wpa_supplicant_i.h"
@@ -1168,6 +1169,7 @@ int wpas_wps_start_pbc(struct wpa_supplicant *wpa_s, const u8 *bssid,
 		return -1;
 	if (wpa_s->wps_fragment_size)
 		ssid->eap.fragment_size = wpa_s->wps_fragment_size;
+	wps_pbc_active_event(wpa_s->wps);
 	eloop_register_timeout(WPS_PBC_WALK_TIME, 0, wpas_wps_timeout,
 			       wpa_s, NULL);
 	wpas_wps_reassoc(wpa_s, ssid, bssid, 0);

More information about the Hostap mailing list