aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2012-03-02 17:26:01 +0200
committerVishal Mahaveer <vishalm@ti.com>2012-12-14 13:35:48 -0600
commitc293a48d26ea795e5cf4459d20923172c4ec7c55 (patch)
tree8f934adc37c9f88b216dc8c1f8b8cd6c11c59ee0
parent0793c79447210fbda20a1d68a94003fd31f61717 (diff)
downloadexternal_wpa_supplicant_8_ti-c293a48d26ea795e5cf4459d20923172c4ec7c55.zip
external_wpa_supplicant_8_ti-c293a48d26ea795e5cf4459d20923172c4ec7c55.tar.gz
external_wpa_supplicant_8_ti-c293a48d26ea795e5cf4459d20923172c4ec7c55.tar.bz2
WFD: Add wfd_subelems hexdump in BSS ctrl_iface command output
This makes it easier to parse the WFD subelements from scan results. Change-Id: I1ce349bb33b56470888b47a37a96e56f1e0d6342 Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
-rw-r--r--src/common/wpa_ctrl.h1
-rw-r--r--wpa_supplicant/ctrl_iface.c26
2 files changed, 27 insertions, 0 deletions
diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h
index a440b69..abe6f44 100644
--- a/src/common/wpa_ctrl.h
+++ b/src/common/wpa_ctrl.h
@@ -164,6 +164,7 @@ extern "C" {
#define WPA_BSS_MASK_WPS_SCAN BIT(13)
#define WPA_BSS_MASK_P2P_SCAN BIT(14)
#define WPA_BSS_MASK_INTERNETW BIT(15)
+#define WPA_BSS_MASK_WIFI_DISPLAY BIT(16)
/* wpa_supplicant/hostapd control interface access */
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index b70c6f4..110b610 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -12,6 +12,7 @@
#include "utils/eloop.h"
#include "common/version.h"
#include "common/ieee802_11_defs.h"
+#include "common/ieee802_11_common.h"
#include "common/wpa_ctrl.h"
#include "eap_peer/eap.h"
#include "eapol_supp/eapol_supp_sm.h"
@@ -2652,6 +2653,31 @@ static int print_bss_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
}
#endif /* CONFIG_P2P */
+#ifdef CONFIG_WIFI_DISPLAY
+ if (mask & WPA_BSS_MASK_WIFI_DISPLAY) {
+ struct wpabuf *wfd;
+ ie = (const u8 *) (bss + 1);
+ wfd = ieee802_11_vendor_ie_concat(ie, bss->ie_len,
+ WFD_IE_VENDOR_TYPE);
+ if (wfd) {
+ ret = os_snprintf(pos, end - pos, "wfd_subelems=");
+ if (ret < 0 || ret >= end - pos)
+ return pos - buf;
+ pos += ret;
+
+ pos += wpa_snprintf_hex(pos, end - pos,
+ wpabuf_head(wfd),
+ wpabuf_len(wfd));
+ wpabuf_free(wfd);
+
+ ret = os_snprintf(pos, end - pos, "\n");
+ if (ret < 0 || ret >= end - pos)
+ return pos - buf;
+ pos += ret;
+ }
+ }
+#endif /* CONFIG_WIFI_DISPLAY */
+
#ifdef CONFIG_INTERWORKING
if (mask & WPA_BSS_MASK_INTERNETW) {
pos = anqp_add_hex(pos, end, "anqp_venue_name",