ieee80211: Define cipher suite selector for WPI-SMS4
[carl9170fw.git] / include / linux / ieee80211.h
index 994acf2dbcf71a91b9915dd6957785586080b205..7f2cd8cb356f1f59b2d7e4b9eac1c9b4e4f1856e 100644 (file)
 #define IEEE80211_QOS_CTL_ACK_POLICY_BLOCKACK  0x0060
 /* A-MSDU 802.11n */
 #define IEEE80211_QOS_CTL_A_MSDU_PRESENT       0x0080
+/* Mesh Control 802.11s */
+#define IEEE80211_QOS_CTL_MESH_CONTROL_PRESENT  0x0100
 
 /* U-APSD queue for WMM IEs sent by AP */
 #define IEEE80211_WMM_IE_AP_QOSINFO_UAPSD      (1<<7)
@@ -642,9 +644,14 @@ struct ieee80211_rann_ie {
        u8 rann_ttl;
        u8 rann_addr[6];
        u32 rann_seq;
+       u32 rann_interval;
        u32 rann_metric;
 } __attribute__ ((packed));
 
+enum ieee80211_rann_flags {
+       RANN_FLAG_IS_GATE = 1 << 0,
+};
+
 #define WLAN_SA_QUERY_TR_ID_LEN 2
 
 struct ieee80211_mgmt {
@@ -765,11 +772,20 @@ struct ieee80211_mgmt {
                                        u8 action;
                                        u8 smps_control;
                                } __attribute__ ((packed)) ht_smps;
+                               struct {
+                                       u8 action_code;
+                                       u8 dialog_token;
+                                       __le16 capability;
+                                       u8 variable[0];
+                               } __packed tdls_discover_resp;
                        } u;
                } __attribute__ ((packed)) action;
        } u;
 } __attribute__ ((packed));
 
+/* Supported Rates value encodings in 802.11n-2009 7.3.2.2 */
+#define BSS_MEMBERSHIP_SELECTOR_HT_PHY 127
+
 /* mgmt header + 1 byte category code */
 #define IEEE80211_MIN_ACTION_SIZE offsetof(struct ieee80211_mgmt, u.action.u)
 
@@ -783,6 +799,13 @@ struct ieee80211_mmie {
        u8 mic[8];
 } __attribute__ ((packed));
 
+struct ieee80211_vendor_ie {
+       u8 element_id;
+       u8 len;
+       u8 oui[3];
+       u8 oui_type;
+} __packed;
+
 /* Control frames */
 struct ieee80211_rts {
        __le16 frame_control;
@@ -804,6 +827,52 @@ struct ieee80211_pspoll {
        u8 ta[6];
 } __attribute__ ((packed));
 
+/* TDLS */
+
+/* Link-id information element */
+struct ieee80211_tdls_lnkie {
+       u8 ie_type; /* Link Identifier IE */
+       u8 ie_len;
+       u8 bssid[6];
+       u8 init_sta[6];
+       u8 resp_sta[6];
+} __packed;
+
+struct ieee80211_tdls_data {
+       u8 da[6];
+       u8 sa[6];
+       __be16 ether_type;
+       u8 payload_type;
+       u8 category;
+       u8 action_code;
+       union {
+               struct {
+                       u8 dialog_token;
+                       __le16 capability;
+                       u8 variable[0];
+               } __packed setup_req;
+               struct {
+                       __le16 status_code;
+                       u8 dialog_token;
+                       __le16 capability;
+                       u8 variable[0];
+               } __packed setup_resp;
+               struct {
+                       __le16 status_code;
+                       u8 dialog_token;
+                       u8 variable[0];
+               } __packed setup_cfm;
+               struct {
+                       __le16 reason_code;
+                       u8 variable[0];
+               } __packed teardown;
+               struct {
+                       u8 dialog_token;
+                       u8 variable[0];
+               } __packed discover_req;
+       } u;
+} __packed;
+
 /**
  * struct ieee80211_bar - HT Block Ack Request
  *
@@ -1212,6 +1281,8 @@ enum ieee80211_eid {
        WLAN_EID_TS_DELAY = 43,
        WLAN_EID_TCLAS_PROCESSING = 44,
        WLAN_EID_QOS_CAPA = 46,
+       /* 802.11z */
+       WLAN_EID_LINK_ID = 101,
        /* 802.11s */
        WLAN_EID_MESH_CONFIG = 113,
        WLAN_EID_MESH_ID = 114,
@@ -1295,13 +1366,11 @@ enum ieee80211_category {
        WLAN_CATEGORY_HT = 7,
        WLAN_CATEGORY_SA_QUERY = 8,
        WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION = 9,
+       WLAN_CATEGORY_TDLS = 12,
        WLAN_CATEGORY_MESH_ACTION = 13,
        WLAN_CATEGORY_MULTIHOP_ACTION = 14,
        WLAN_CATEGORY_SELF_PROTECTED = 15,
        WLAN_CATEGORY_WMM = 17,
-       /* 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,
 };
@@ -1337,6 +1406,21 @@ enum ieee80211_self_protected_actioncode {
        WLAN_SP_MGK_ACK = 5,
 };
 
+/* Mesh action codes */
+enum ieee80211_mesh_actioncode {
+       WLAN_MESH_ACTION_LINK_METRIC_REPORT,
+       WLAN_MESH_ACTION_HWMP_PATH_SELECTION,
+       WLAN_MESH_ACTION_GATE_ANNOUNCEMENT,
+       WLAN_MESH_ACTION_CONGESTION_CONTROL_NOTIFICATION,
+       WLAN_MESH_ACTION_MCCA_SETUP_REQUEST,
+       WLAN_MESH_ACTION_MCCA_SETUP_REPLY,
+       WLAN_MESH_ACTION_MCCA_ADVERTISEMENT_REQUEST,
+       WLAN_MESH_ACTION_MCCA_ADVERTISEMENT,
+       WLAN_MESH_ACTION_MCCA_TEARDOWN,
+       WLAN_MESH_ACTION_TBTT_ADJUSTMENT_REQUEST,
+       WLAN_MESH_ACTION_TBTT_ADJUSTMENT_RESPONSE,
+};
+
 /* Security key length */
 enum ieee80211_key_len {
        WLAN_KEY_LEN_WEP40 = 5,
@@ -1346,6 +1430,36 @@ enum ieee80211_key_len {
        WLAN_KEY_LEN_AES_CMAC = 16,
 };
 
+/* Public action codes */
+enum ieee80211_pub_actioncode {
+       WLAN_PUB_ACTION_TDLS_DISCOVER_RES = 14,
+};
+
+/* TDLS action codes */
+enum ieee80211_tdls_actioncode {
+       WLAN_TDLS_SETUP_REQUEST = 0,
+       WLAN_TDLS_SETUP_RESPONSE = 1,
+       WLAN_TDLS_SETUP_CONFIRM = 2,
+       WLAN_TDLS_TEARDOWN = 3,
+       WLAN_TDLS_PEER_TRAFFIC_INDICATION = 4,
+       WLAN_TDLS_CHANNEL_SWITCH_REQUEST = 5,
+       WLAN_TDLS_CHANNEL_SWITCH_RESPONSE = 6,
+       WLAN_TDLS_PEER_PSM_REQUEST = 7,
+       WLAN_TDLS_PEER_PSM_RESPONSE = 8,
+       WLAN_TDLS_PEER_TRAFFIC_RESPONSE = 9,
+       WLAN_TDLS_DISCOVERY_REQUEST = 10,
+};
+
+/*
+ * TDLS capabililites to be enabled in the 5th byte of the
+ * @WLAN_EID_EXT_CAPABILITY information element
+ */
+#define WLAN_EXT_CAPA5_TDLS_ENABLED    BIT(5)
+#define WLAN_EXT_CAPA5_TDLS_PROHIBITED BIT(6)
+
+/* TDLS specific payload type in the LLC/SNAP header */
+#define WLAN_TDLS_SNAP_RFTYPE  0x2
+
 /**
  * enum - mesh path selection protocol identifier
  *
@@ -1471,6 +1585,8 @@ enum ieee80211_sa_query_action {
 #define WLAN_CIPHER_SUITE_WEP104       0x000FAC05
 #define WLAN_CIPHER_SUITE_AES_CMAC     0x000FAC06
 
+#define WLAN_CIPHER_SUITE_SMS4         0x00147201
+
 /* AKM suite selectors */
 #define WLAN_AKM_SUITE_8021X           0x000FAC01
 #define WLAN_AKM_SUITE_PSK             0x000FAC02
@@ -1481,6 +1597,9 @@ enum ieee80211_sa_query_action {
 
 #define WLAN_PMKID_LEN                 16
 
+#define WLAN_OUI_WFA                   0x506f9a
+#define WLAN_OUI_TYPE_WFA_P2P          9
+
 /*
  * WMM/802.11e Tspec Element
  */