]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AOSP: state change ctrl_iface events
authorJouni Malinen <j@w1.fi>
Thu, 9 Aug 2012 19:21:39 +0000 (22:21 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 9 Aug 2012 20:18:31 +0000 (23:18 +0300)
wpa_supplicant/ctrl_iface.c
wpa_supplicant/notify.c

index 77b853577496e40afc6001d59fbefe52049de99e..775a686cdd5b81d854a8fc5380b031efa257f9fa 100644 (file)
@@ -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;
 }
 
index da98a14c40340268575a07778ef73f5ef40e3135..f613897db83a61e224d0f640036107823ef8271c 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->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 */
 }