From 3636b891b75ada4fdb8a70dd462c66c21a65d6a8 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 12 May 2013 19:15:33 +0300 Subject: [PATCH] Do not try auto connect mechanism in disconnected state This cleans up debug log by not requesting the auto connect on dissassociation event if we are already in disconnected state and would not try to connect anyway. Signed-hostap: Jouni Malinen --- wpa_supplicant/events.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 98ef1bf9c..463c8e651 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -1964,8 +1964,9 @@ static void wpa_supplicant_event_disassoc_finish(struct wpa_supplicant *wpa_s, "pre-shared key may be incorrect"); wpas_auth_failed(wpa_s); } - if (!wpa_s->auto_reconnect_disabled || - wpa_s->key_mgmt == WPA_KEY_MGMT_WPS) { + if (!wpa_s->disconnected && + (!wpa_s->auto_reconnect_disabled || + wpa_s->key_mgmt == WPA_KEY_MGMT_WPS)) { wpa_dbg(wpa_s, MSG_DEBUG, "Auto connect enabled: try to " "reconnect (wps=%d wpa_state=%d)", wpa_s->key_mgmt == WPA_KEY_MGMT_WPS,