瀏覽代碼

[PATCH] libertas: push mesh beacon bit to userspace in scan results

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Williams 18 年之前
父節點
當前提交
00af0157e0
共有 1 個文件被更改,包括 14 次插入0 次删除
  1. 14 0
      drivers/net/wireless/libertas/scan.c

+ 14 - 0
drivers/net/wireless/libertas/scan.c

@@ -1334,6 +1334,8 @@ out:
 	return ret;
 }
 
+#define MAX_CUSTOM_LEN 64
+
 static inline char *libertas_translate_scan(wlan_private *priv,
 					char *start, char *stop,
 					struct bss_descriptor *bss)
@@ -1467,6 +1469,18 @@ static inline char *libertas_translate_scan(wlan_private *priv,
 		start = iwe_stream_add_point(start, stop, &iwe, buf);
 	}
 
+	if (bss->mesh) {
+		char custom[MAX_CUSTOM_LEN];
+		char *p = custom;
+
+		iwe.cmd = IWEVCUSTOM;
+		p += snprintf(p, MAX_CUSTOM_LEN - (p - custom),
+		              "mesh-type: olpc");
+		iwe.u.data.length = p - custom;
+		if (iwe.u.data.length)
+			start = iwe_stream_add_point(start, stop, &iwe, custom);
+	}
+
 	return start;
 }