cfg80211: Use capability info to detect mesh beacons.
authorJavier Cardona <javier@cozybit.com>
Wed, 4 May 2011 17:24:56 +0000 (17:24 +0000)
committerChristian Lamparter <chunkeey@googlemail.com>
Sat, 28 May 2011 16:39:13 +0000 (18:39 +0200)
Mesh beacons no longer use all-zeroes BSSID.  Beacon frames for MBSS,
infrastructure BSS, or IBSS are differentiated by the Capability
Information field in the Beacon frame.  A mesh STA sets the ESS and IBSS
subfields to 0 in transmitted Beacon or Probe Response management
frames.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
include/linux/ieee80211.h

index 2be159d248d0e374c49f31074840678e6bea87ee..45b437423b4137aafa6e37498cd3f21d30a4d10c 100644 (file)
@@ -1032,6 +1032,11 @@ struct ieee80211_ht_info {
 
 #define WLAN_CAPABILITY_ESS            (1<<0)
 #define WLAN_CAPABILITY_IBSS           (1<<1)
+
+/* A mesh STA sets the ESS and IBSS capability bits to zero */
+#define WLAN_CAPABILITY_IS_MBSS(cap)   \
+       (!((cap) & (WLAN_CAPABILITY_ESS | WLAN_CAPABILITY_IBSS)))
+
 #define WLAN_CAPABILITY_CF_POLLABLE    (1<<2)
 #define WLAN_CAPABILITY_CF_POLL_REQUEST        (1<<3)
 #define WLAN_CAPABILITY_PRIVACY                (1<<4)