From ea78c315a20ec1c8a3ce9b9b1847859262913e4f Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 27 Oct 2010 20:28:16 +0300 Subject: [PATCH] Add ctrl_interface event for association rejected --- src/common/wpa_ctrl.h | 2 ++ wpa_supplicant/events.c | 13 ++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h index 8a29fb659..96a52a5a3 100644 --- a/src/common/wpa_ctrl.h +++ b/src/common/wpa_ctrl.h @@ -32,6 +32,8 @@ extern "C" { #define WPA_EVENT_CONNECTED "CTRL-EVENT-CONNECTED " /** Disconnected, data connection is not available */ #define WPA_EVENT_DISCONNECTED "CTRL-EVENT-DISCONNECTED " +/** Association rejected during connection attempt */ +#define WPA_EVENT_ASSOC_REJECT "CTRL-EVENT-ASSOC-REJECT " /** wpa_supplicant is exiting */ #define WPA_EVENT_TERMINATING "CTRL-EVENT-TERMINATING " /** Password change was completed successfully */ diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index c0d993561..46bcae8d8 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -1654,13 +1654,20 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event, break; #endif /* CONFIG_IBSS_RSN */ case EVENT_ASSOC_REJECT: - sme_event_assoc_reject(wpa_s, data); + wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_ASSOC_REJECT "bssid=" MACSTR + " status_code=%u", + MAC2STR(data->assoc_reject.bssid), + data->assoc_reject.status_code); + if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) + sme_event_assoc_reject(wpa_s, data); break; case EVENT_AUTH_TIMED_OUT: - sme_event_auth_timed_out(wpa_s, data); + if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) + sme_event_auth_timed_out(wpa_s, data); break; case EVENT_ASSOC_TIMED_OUT: - sme_event_assoc_timed_out(wpa_s, data); + if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) + sme_event_assoc_timed_out(wpa_s, data); break; #ifdef CONFIG_AP case EVENT_TX_STATUS: