Add wpa_supplicant state change event for Android network manager

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
This commit is contained in:
Dmitry Shmidt 2011-02-26 13:20:16 +02:00 committed by Jouni Malinen
parent fb0e5bd7df
commit 4e2ead7a72
2 changed files with 9 additions and 0 deletions

View File

@ -56,6 +56,8 @@ extern "C" {
#define WPA_EVENT_EAP_FAILURE "CTRL-EVENT-EAP-FAILURE "
/** New scan results available */
#define WPA_EVENT_SCAN_RESULTS "CTRL-EVENT-SCAN-RESULTS "
/** wpa_supplicant state change */
#define WPA_EVENT_STATE_CHANGE "CTRL-EVENT-STATE-CHANGE "
/** A new BSS entry was added (followed by BSS entry id and BSSID) */
#define WPA_EVENT_BSS_ADDED "CTRL-EVENT-BSS-ADDED "
/** A BSS entry was removed (followed by BSS entry id and BSSID) */

View File

@ -92,6 +92,13 @@ void wpas_notify_state_changed(struct wpa_supplicant *wpa_s,
#endif /* CONFIG_P2P */
sme_state_changed(wpa_s);
#ifdef ANDROID
wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_STATE_CHANGE
"id=%d state=%d BSSID=" MACSTR,
wpa_s->current_ssid ? wpa_s->current_ssid->id : -1,
new_state, MAC2STR(wpa_s->pending_bssid));
#endif /* ANDROID */
}