Patchwork Add WPA_BSS_MASK_DELIM flag to BSS command

login
register
mail settings
Submitter Dmitry Shmidt
Date Feb. 27, 2013, 8:39 p.m.
Message ID <20130227213202.9263E13FB53@ushik.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/223709/
State Accepted
Commit c667342933ca3a66305abfd89434292cdb863e51
Headers show

Comments

Dmitry Shmidt - Feb. 27, 2013, 8:39 p.m.
This flag will add ==== delimiter between to separate bss results

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
---
 src/common/wpa_ctrl.h       | 3 ++-
 wpa_supplicant/ctrl_iface.c | 7 +++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
Jouni Malinen - Feb. 28, 2013, 4:58 p.m.
On Wed, Feb 27, 2013 at 12:39:35PM -0800, Dmitry Shmidt wrote:
> This flag will add ==== delimiter between to separate bss results

Thanks, applied.

Patch

diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h
index 46e8dc7..ce1c3a6 100644
--- a/src/common/wpa_ctrl.h
+++ b/src/common/wpa_ctrl.h
@@ -151,7 +151,7 @@  extern "C" {
 
 /* BSS command information masks */
 
-#define WPA_BSS_MASK_ALL		0xFFFFFFFF
+#define WPA_BSS_MASK_ALL		0xFFFDFFFF
 #define WPA_BSS_MASK_ID			BIT(0)
 #define WPA_BSS_MASK_BSSID		BIT(1)
 #define WPA_BSS_MASK_FREQ		BIT(2)
@@ -169,6 +169,7 @@  extern "C" {
 #define WPA_BSS_MASK_P2P_SCAN		BIT(14)
 #define WPA_BSS_MASK_INTERNETW		BIT(15)
 #define WPA_BSS_MASK_WIFI_DISPLAY	BIT(16)
+#define WPA_BSS_MASK_DELIM		BIT(17)
 
 
 /* wpa_supplicant/hostapd control interface access */
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 87467b8..65a769e 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -3225,6 +3225,13 @@  static int print_bss_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
 	}
 #endif /* CONFIG_INTERWORKING */
 
+	if (mask & WPA_BSS_MASK_DELIM) {
+		ret = os_snprintf(pos, end - pos, "====\n");
+		if (ret < 0 || ret >= end - pos)
+			return 0;
+		pos += ret;
+	}
+
 	return pos - buf;
 }