]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AOSP: Add SSID to EVENT-STATE-CHANGE
authorJouni Malinen <j@w1.fi>
Fri, 1 Nov 2013 11:03:04 +0000 (13:03 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 1 Nov 2013 14:36:32 +0000 (16:36 +0200)
This is a part of this AOSP commit:

commit f20a4432808cee548326c4b35c83071ca576a239
Author: Irfan Sheriff <isheriff@google.com>
Date:   Mon Apr 16 16:48:34 2012 -0700

    Add SSID in supplicant change event

    Change-Id: I67224e6765afad51b4b258b0df7d11d7ed3b9927

wpa_supplicant/ctrl_iface.c
wpa_supplicant/notify.c

index 57364f47486b1383c9d2526929c95df7c7de0b25..cf13af5b447dc2ae1c973b19714022cfdc993a70 100644 (file)
@@ -1607,6 +1607,25 @@ 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;
 }
 
index 40cffdfff258549a026f8dc6d31d7f7de60b99f3..ab62beaf88e68a1233309e6ec511d03c6e73e6fe 100644 (file)
@@ -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->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 */
 }