aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2016-05-30 21:11:42 (GMT)
committerJouni Malinen <j@w1.fi>2016-05-30 21:11:42 (GMT)
commit9a5160f5fb1b06392477154bb349cacc49b2ef16 (patch)
treeb94d0659282bd78e67cc1e60f97308c6574a6572 /wpa_supplicant/events.c
parent9ec916e9f4512f7a1dfbd6cb1809f33eed476f08 (diff)
downloadhostap-9a5160f5fb1b06392477154bb349cacc49b2ef16.zip
hostap-9a5160f5fb1b06392477154bb349cacc49b2ef16.tar.gz
hostap-9a5160f5fb1b06392477154bb349cacc49b2ef16.tar.bz2
Report connection timeouts in CTRL-EVENT-ASSOC-REJECT
Add a new "timeout" argument to the event message if the nl80211 message indicates that the connection failure is not due to an explicit AP rejection message. This makes it easier for external programs to figure out why the connection failed. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index c8d0553..057f630 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -3544,13 +3544,15 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
case EVENT_ASSOC_REJECT:
if (data->assoc_reject.bssid)
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_ASSOC_REJECT
- "bssid=" MACSTR " status_code=%u",
+ "bssid=" MACSTR " status_code=%u%s",
MAC2STR(data->assoc_reject.bssid),
- data->assoc_reject.status_code);
+ data->assoc_reject.status_code,
+ data->assoc_reject.timed_out ? " timeout" : "");
else
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_ASSOC_REJECT
- "status_code=%u",
- data->assoc_reject.status_code);
+ "status_code=%u%s",
+ data->assoc_reject.status_code,
+ data->assoc_reject.timed_out ? " timeout" : "");
wpa_s->assoc_status_code = data->assoc_reject.status_code;
wpas_notify_assoc_status_code(wpa_s);
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)