[PATCH] WPS: make wps pin connection work with wpa_cli command

Abdoulaye Berthe berthe.ab
Thu Nov 27 08:28:35 PST 2014


Network selection is not performed for all scan results
making wps pin fail for command line connection attempts.
This enables network selection if wpas_wps_searching is true.

Signed-off-by: Abdoulaye Berthe <berthe.ab at gmail.com>
---
 wpa_supplicant/events.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 06b09ef..a9e5d22 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1275,7 +1275,7 @@ static int _wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,
 	}
 #endif /* CONFIG_NO_RANDOM_POOL */
 
-	if (own_request && wpa_s->scan_res_handler &&
+	if (!wpas_wps_searching(wpa_s) && own_request && wpa_s->scan_res_handler &&
 	    (wpa_s->own_scan_running || !wpa_s->external_scan_running)) {
 		void (*scan_res_handler)(struct wpa_supplicant *wpa_s,
 					 struct wpa_scan_results *scan_res);
-- 
1.8.2.2




More information about the Hostap mailing list