ieee80211: add mesh action codes
[carl9170fw.git] / include / linux / ieee80211.h
index d1c00535c02fd634fd001b4894743a2cd376ccd4..589e8571fa32d7ecb3b7b22b088cb81ef3c5d2e8 100644 (file)
@@ -749,19 +749,10 @@ struct ieee80211_mgmt {
                                        __le16 params;
                                        __le16 reason_code;
                                } __attribute__((packed)) delba;
-                               struct{
+                               struct {
                                        u8 action_code;
-                                       /* capab_info for open and confirm,
-                                        * reason for close
-                                        */
-                                       __le16 aux;
-                                       /* Followed in plink_confirm by status
-                                        * code, AID and supported rates,
-                                        * and directly by supported rates in
-                                        * plink_open and plink_close
-                                        */
                                        u8 variable[0];
-                               } __attribute__((packed)) plink_action;
+                               } __attribute__((packed)) self_prot;
                                struct{
                                        u8 action_code;
                                        u8 variable[0];
@@ -829,9 +820,11 @@ struct ieee80211_bar {
 } __attribute__((packed)) __aligned(4);
 
 /* 802.11 BA(R) control masks */
-#define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL     0x0000
-#define IEEE80211_BAR_CTRL_MULTI_TID            0x0002
-#define IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA  0x0004
+#define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL   0x0000
+#define IEEE80211_BAR_CTRL_MULTI_TID           0x0002
+#define IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA        0x0004
+#define IEEE80211_BAR_CTRL_TID_INFO_MASK       0xf000
+#define IEEE80211_BAR_CTRL_TID_INFO_SHIFT      12
 
 /**
  * struct ieee80211_ba - HT Block Ack
@@ -1224,11 +1217,6 @@ enum ieee80211_eid {
        WLAN_EID_MESH_ID = 114,
        WLAN_EID_LINK_METRIC_REPORT = 115,
        WLAN_EID_CONGESTION_NOTIFICATION = 116,
-       /* Note that the Peer Link IE has been replaced with the similar
-        * Peer Management IE.  We will keep the former definition until mesh
-        * code is changed to comply with latest 802.11s drafts.
-        */
-       WLAN_EID_PEER_LINK = 55,  /* no longer in 802.11s drafts */
        WLAN_EID_PEER_MGMT = 117,
        WLAN_EID_CHAN_SWITCH_PARAM = 118,
        WLAN_EID_MESH_AWAKE_WINDOW = 119,
@@ -1339,6 +1327,31 @@ enum ieee80211_ht_actioncode {
        WLAN_HT_ACTION_ASEL_IDX_FEEDBACK = 7,
 };
 
+/* Self Protected Action codes */
+enum ieee80211_self_protected_actioncode {
+       WLAN_SP_RESERVED = 0,
+       WLAN_SP_MESH_PEERING_OPEN = 1,
+       WLAN_SP_MESH_PEERING_CONFIRM = 2,
+       WLAN_SP_MESH_PEERING_CLOSE = 3,
+       WLAN_SP_MGK_INFORM = 4,
+       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,
@@ -1483,6 +1496,43 @@ enum ieee80211_sa_query_action {
 
 #define WLAN_PMKID_LEN                 16
 
+/*
+ * WMM/802.11e Tspec Element
+ */
+#define IEEE80211_WMM_IE_TSPEC_TID_MASK                0x0F
+#define IEEE80211_WMM_IE_TSPEC_TID_SHIFT       1
+
+enum ieee80211_tspec_status_code {
+       IEEE80211_TSPEC_STATUS_ADMISS_ACCEPTED = 0,
+       IEEE80211_TSPEC_STATUS_ADDTS_INVAL_PARAMS = 0x1,
+};
+
+struct ieee80211_tspec_ie {
+       u8 element_id;
+       u8 len;
+       u8 oui[3];
+       u8 oui_type;
+       u8 oui_subtype;
+       u8 version;
+       __le16 tsinfo;
+       u8 tsinfo_resvd;
+       __le16 nominal_msdu;
+       __le16 max_msdu;
+       __le32 min_service_int;
+       __le32 max_service_int;
+       __le32 inactivity_int;
+       __le32 suspension_int;
+       __le32 service_start_time;
+       __le32 min_data_rate;
+       __le32 mean_data_rate;
+       __le32 peak_data_rate;
+       __le32 max_burst_size;
+       __le32 delay_bound;
+       __le32 min_phy_rate;
+       __le16 sba;
+       __le16 medium_time;
+} __packed;
+
 /**
  * ieee80211_get_qos_ctl - get pointer to qos control bytes
  * @hdr: the frame