aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-08-09 19:21:39 (GMT)
committerJouni Malinen <j@w1.fi>2012-08-09 20:18:31 (GMT)
commitda08a8eb9ad3899eedad7abc4724d660f1a85b54 (patch)
treeb4c30e178053bf0a3c1b37756d7757df85e8d683
parent8451227fa47a6d743c54b66f568442ba942c270d (diff)
downloadhostap-da08a8eb9ad3899eedad7abc4724d660f1a85b54.zip
hostap-da08a8eb9ad3899eedad7abc4724d660f1a85b54.tar.gz
hostap-da08a8eb9ad3899eedad7abc4724d660f1a85b54.tar.bz2
AOSP: state change ctrl_iface events
-rw-r--r--wpa_supplicant/ctrl_iface.c20
-rw-r--r--wpa_supplicant/notify.c8
2 files changed, 26 insertions, 2 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 77b8535..775a686 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -1009,6 +1009,26 @@ static int wpa_supplicant_ctrl_iface_status(struct wpa_supplicant *wpa_s,
if (res >= 0)
pos += res;
+#ifdef ANDROID
+ wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_STATE_CHANGE
+ "id=%d state=%d BSSID=" MACSTR " SSID=%s",
+ wpa_s->current_ssid ? wpa_s->current_ssid->id : -1,
+ wpa_s->wpa_state,
+ MAC2STR(wpa_s->pending_bssid),
+ wpa_s->current_ssid && wpa_s->current_ssid->ssid ?
+ wpa_ssid_txt(wpa_s->current_ssid->ssid,
+ wpa_s->current_ssid->ssid_len) : "");
+ if (wpa_s->wpa_state == WPA_COMPLETED) {
+ struct wpa_ssid *ssid = wpa_s->current_ssid;
+ wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_CONNECTED "- connection to "
+ MACSTR " completed %s [id=%d id_str=%s]",
+ MAC2STR(wpa_s->bssid), wpa_s->reassociated_connection ?
+ "(reauth)" : "(auth)",
+ ssid ? ssid->id : -1,
+ ssid && ssid->id_str ? ssid->id_str : "");
+ }
+#endif /* ANDROID */
+
return pos - buf;
}
diff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c
index da98a14..f613897 100644
--- a/wpa_supplicant/notify.c
+++ b/wpa_supplicant/notify.c
@@ -90,9 +90,13 @@ void wpas_notify_state_changed(struct wpa_supplicant *wpa_s,
#ifdef ANDROID
wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_STATE_CHANGE
- "id=%d state=%d BSSID=" MACSTR,
+ "id=%d state=%d BSSID=" MACSTR " SSID=%s",
wpa_s->current_ssid ? wpa_s->current_ssid->id : -1,
- new_state, MAC2STR(wpa_s->pending_bssid));
+ new_state,
+ MAC2STR(wpa_s->pending_bssid),
+ wpa_s->current_ssid && wpa_s->current_ssid->ssid ?
+ wpa_ssid_txt(wpa_s->current_ssid->ssid,
+ wpa_s->current_ssid->ssid_len): "");
#endif /* ANDROID */
}