cfg80211: Define IEEE P802.11ai (FILS) information elements
[carl9170fw.git] / include / linux / ieee80211.h
index 7bc9f831972294ed6205c18eab456ffa9a2236aa..210045e8f07913758f21a7fb77afc6f9d6a096de 100644 (file)
@@ -1978,6 +1978,26 @@ enum ieee80211_eid {
 
        WLAN_EID_VENDOR_SPECIFIC = 221,
        WLAN_EID_QOS_PARAMETER = 222,
+       WLAN_EID_CAG_NUMBER = 237,
+       WLAN_EID_AP_CSN = 239,
+       WLAN_EID_FILS_INDICATION = 240,
+       WLAN_EID_DILS = 241,
+       WLAN_EID_FRAGMENT = 242,
+       WLAN_EID_EXTENSION = 255
+};
+
+/* Element ID Extensions for Element ID 255 */
+enum ieee80211_eid_ext {
+       WLAN_EID_EXT_ASSOC_DELAY_INFO = 1,
+       WLAN_EID_EXT_FILS_REQ_PARAMS = 2,
+       WLAN_EID_EXT_FILS_KEY_CONFIRM = 3,
+       WLAN_EID_EXT_FILS_SESSION = 4,
+       WLAN_EID_EXT_FILS_HLP_CONTAINER = 5,
+       WLAN_EID_EXT_FILS_IP_ADDR_ASSIGN = 6,
+       WLAN_EID_EXT_KEY_DELIVERY = 7,
+       WLAN_EID_EXT_FILS_WRAPPED_DATA = 8,
+       WLAN_EID_EXT_FILS_PUBLIC_KEY = 12,
+       WLAN_EID_EXT_FILS_NONCE = 13,
 };
 
 /* Action category code */
@@ -2491,6 +2511,28 @@ static inline bool ieee80211_is_public_action(struct ieee80211_hdr *hdr,
        return mgmt->u.action.category == WLAN_CATEGORY_PUBLIC;
 }
 
+static inline bool is_multicast_ether_addr(const u8 *a)
+{
+        return 0x01 & a[0];
+}
+
+/**
+ * _ieee80211_is_group_privacy_action - check if frame is a group addressed
+ * privacy action frame
+ * @hdr: the frame
+ */
+static inline bool ieee80211_is_group_privacy_action(struct ieee80211_hdr *hdr)
+{
+       struct ieee80211_mgmt *mgmt = (void *)hdr;
+
+       if (!ieee80211_is_action(hdr->frame_control) ||
+           !is_multicast_ether_addr(hdr->addr1))
+               return false;
+
+       return mgmt->u.action.category == WLAN_CATEGORY_MESH_ACTION ||
+              mgmt->u.action.category == WLAN_CATEGORY_MULTIHOP_ACTION;
+}
+
 /**
  * ieee80211_tu_to_usec - convert time units (TU) to microseconds
  * @tu: the TUs