[PATCH 1/3] P2P: Do not initiate scan on P2P Device when enabled

Ilan Peer ilan.peer
Wed Mar 26 23:58:29 PDT 2014


Do not start a scan on a P2P Device interface when enabled.

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
 wpa_supplicant/events.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 878cc0b..e9a4a8c 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -3278,6 +3278,12 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
 		wpa_dbg(wpa_s, MSG_DEBUG, "Interface was enabled");
 		if (wpa_s->wpa_state == WPA_INTERFACE_DISABLED) {
 			wpa_supplicant_update_mac_addr(wpa_s);
+			if (wpa_s->p2p_mgmt) {
+				wpa_supplicant_set_state(wpa_s,
+							 WPA_DISCONNECTED);
+				break;
+			}
+
 #ifdef CONFIG_AP
 			if (!wpa_s->ap_iface) {
 				wpa_supplicant_set_state(wpa_s,
-- 
1.7.10.4




More information about the Hostap mailing list