From: Jouni Malinen Date: Sun, 12 May 2013 16:15:33 +0000 (+0300) Subject: Do not try auto connect mechanism in disconnected state X-Git-Tag: aosp-kk-from-upstream~266 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3636b891b75ada4fdb8a70dd462c66c21a65d6a8;p=thirdparty%2Fhostap.git 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 --- 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,