cfg80211: don't drop p2p probe responses
[carl9170fw.git] / include / linux / ieee80211.h
index 9a55372110d609db75cc4f3cf3503dec48004573..c4f43c3377aa9f36b2a1f2eaaf828680991ce583 100644 (file)
@@ -1032,6 +1032,15 @@ 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.
+ * however, this holds true for p2p probe responses (in the p2p_find
+ * phase) as well.
+ */
+#define WLAN_CAPABILITY_IS_STA_BSS(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)
@@ -1291,9 +1300,8 @@ enum ieee80211_category {
        WLAN_CATEGORY_MULTIHOP_ACTION = 14,
        WLAN_CATEGORY_SELF_PROTECTED = 15,
        WLAN_CATEGORY_WMM = 17,
-       /* TODO: remove MESH_PLINK and MESH_PATH_SEL after */
-       /*       mesh is updated to current 802.11s draft  */
-       WLAN_CATEGORY_MESH_PLINK = 30,
+       /* TODO: remove MESH_PATH_SEL after mesh is updated
+        * to current 802.11s draft  */
        WLAN_CATEGORY_MESH_PATH_SEL = 32,
        WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126,
        WLAN_CATEGORY_VENDOR_SPECIFIC = 127,
@@ -1546,6 +1554,7 @@ static inline bool ieee80211_is_robust_mgmt_frame(struct ieee80211_hdr *hdr)
                category = ((u8 *) hdr) + 24;
                return *category != WLAN_CATEGORY_PUBLIC &&
                        *category != WLAN_CATEGORY_HT &&
+                       *category != WLAN_CATEGORY_SELF_PROTECTED &&
                        *category != WLAN_CATEGORY_VENDOR_SPECIFIC;
        }