From 782e2f785e5e19b6a1d06b61a6567fc9f6c49cd4 Mon Sep 17 00:00:00 2001 From: Ilan Peer Date: Thu, 27 Mar 2014 08:58:29 +0200 Subject: [PATCH] P2P: Do not initiate scan on P2P Device when enabled Do not start a scan on a P2P Device interface when processing an interface enabled event. Signed-off-by: Ilan Peer --- wpa_supplicant/events.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 56f22f0e6..847d50d23 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -3274,6 +3274,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,