wpa_supplicant: Fix order of auth_timeout event
`auth_timeout` event should be sent out before `disconnect` event. This
otherwise causes issues in external clients which are keeping track of
connection state.
Bug: 170476633
Test: Compiles
Change-Id: Iecadf054e56fca07bece54d65fcce327534c1336
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 78910fc..a01a4e5 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -223,10 +223,10 @@
wpa_msg(wpa_s, MSG_INFO, "Authentication with " MACSTR " timed out.",
MAC2STR(bssid));
wpa_blacklist_add(wpa_s, bssid);
+ wpas_notify_auth_timeout(wpa_s);
wpa_sm_notify_disassoc(wpa_s->wpa);
wpa_supplicant_deauthenticate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
wpa_s->reassociate = 1;
- wpas_notify_auth_timeout(wpa_s);
/*
* If we timed out, the AP or the local radio may be busy.