[PATCH] libertas: push mesh beacon bit to userspace in scan results
authorDan Williams <dcbw@redhat.com>
Thu, 2 Aug 2007 17:14:56 +0000 (13:14 -0400)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:50:10 +0000 (16:50 -0700)
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/scan.c

index 5c730b9d956c36ae7462182e0b2c4e547f7169d5..8d4e1ee273959cb056d0a5a14dbe1e4058b80068 100644 (file)
@@ -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;
 }