P2P: Show P2P Device Address in wpa_cli status
authorJouni Malinen <jouni.malinen@atheros.com>
Sun, 18 Jul 2010 21:30:25 +0000 (14:30 -0700)
committerJouni Malinen <j@w1.fi>
Thu, 9 Sep 2010 14:17:18 +0000 (07:17 -0700)
wpa_supplicant/ctrl_iface.c

index 97f8e28..3b72121 100644 (file)
@@ -597,6 +597,16 @@ static int wpa_supplicant_ctrl_iface_status(struct wpa_supplicant *wpa_s,
                pos += ret;
        }
 
+#ifdef CONFIG_P2P
+       if (wpa_s->global->p2p) {
+               ret = os_snprintf(pos, end - pos, "p2p_device_address=" MACSTR
+                                 "\n", MAC2STR(wpa_s->global->p2p_dev_addr));
+               if (ret < 0 || ret >= end - pos)
+                       return pos - buf;
+               pos += ret;
+       }
+#endif /* CONFIG_P2P */
+
        if (wpa_key_mgmt_wpa_ieee8021x(wpa_s->key_mgmt) ||
            wpa_s->key_mgmt == WPA_KEY_MGMT_IEEE8021X_NO_WPA) {
                res = eapol_sm_get_status(wpa_s->eapol, pos, end - pos,