aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface.c
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2013-11-11 20:52:59 (GMT)
committerJouni Malinen <j@w1.fi>2013-11-17 14:47:56 (GMT)
commitf6c2b8c367b9e59c656e281cf51b906e83f5c081 (patch)
tree012287b88ebee68bd4d02d06557d4e564bd9a13e /wpa_supplicant/ctrl_iface.c
parent6b4990766595b77d488d50e1a8e6952e3cdd87ed (diff)
downloadhostap-f6c2b8c367b9e59c656e281cf51b906e83f5c081.zip
hostap-f6c2b8c367b9e59c656e281cf51b906e83f5c081.tar.gz
hostap-f6c2b8c367b9e59c656e281cf51b906e83f5c081.tar.bz2
Android: Add state message sent after 'status' command
This triggers re-transmission of CTRL-EVENT-STATE-CHANGE and CTRL-EVENT-CONNECTED events on STATUS command for Android framework specific processing. Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'wpa_supplicant/ctrl_iface.c')
-rw-r--r--wpa_supplicant/ctrl_iface.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 615a972..798c55b 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -1629,6 +1629,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->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), "(auth)",
+ ssid ? ssid->id : -1,
+ ssid && ssid->id_str ? ssid->id_str : "");
+ }
+#endif /* ANDROID */
+
return pos - buf;
}