mac80211: Drop MESH_PLINK category and use new ANA-approved MESH_ACTION
[carl9170fw.git] / include / linux / ieee80211.h
index db977ccf970f0e8e69cc54e0b46f755db4f23ae1..2be159d248d0e374c49f31074840678e6bea87ee 100644 (file)
 
 /* U-APSD queue for WMM IEs sent by AP */
 #define IEEE80211_WMM_IE_AP_QOSINFO_UAPSD      (1<<7)
+#define IEEE80211_WMM_IE_AP_QOSINFO_PARAM_SET_CNT_MASK 0x0f
 
 /* U-APSD queues for WMM IEs sent by STA */
 #define IEEE80211_WMM_IE_STA_QOSINFO_AC_VO     (1<<0)
@@ -526,13 +527,28 @@ static inline int ieee80211_is_qos_nullfunc(__le16 fc)
               cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC);
 }
 
+static inline unsigned int ieee80211_hdrlen(__le16 fc)
+{
+       unsigned int hdrlen = 24;
+
+       if (ieee80211_has_a4(fc))
+               hdrlen = 30;
+
+       if (ieee80211_is_data_qos(fc)) {
+               hdrlen += IEEE80211_QOS_CTL_LEN;
+               if (ieee80211_has_order(fc))
+                       hdrlen += IEEE80211_HT_CTL_LEN;
+       }
+
+        return hdrlen;
+}
+
 struct ieee80211s_hdr {
        u8 flags;
        u8 ttl;
        __le32 seqnum;
        u8 eaddr1[6];
        u8 eaddr2[6];
-       u8 eaddr3[6];
 } __attribute__ ((packed));
 
 /* Mesh flags */
@@ -898,6 +914,15 @@ struct ieee80211_ht_cap {
 #define IEEE80211_HT_CAP_40MHZ_INTOLERANT      0x4000
 #define IEEE80211_HT_CAP_LSIG_TXOP_PROT                0x8000
 
+/* 802.11n HT extended capabilities masks (for extended_ht_cap_info) */
+#define IEEE80211_HT_EXT_CAP_PCO               0x0001
+#define IEEE80211_HT_EXT_CAP_PCO_TIME          0x0006
+#define                IEEE80211_HT_EXT_CAP_PCO_TIME_SHIFT     1
+#define IEEE80211_HT_EXT_CAP_MCS_FB            0x0300
+#define                IEEE80211_HT_EXT_CAP_MCS_FB_SHIFT       8
+#define IEEE80211_HT_EXT_CAP_HTC_SUP           0x0400
+#define IEEE80211_HT_EXT_CAP_RD_RESPONDER      0x0800
+
 /* 802.11n HT capability AMPDU settings (for ampdu_params_info) */
 #define IEEE80211_HT_AMPDU_PARM_FACTOR         0x03
 #define IEEE80211_HT_AMPDU_PARM_DENSITY                0x1C
@@ -973,7 +998,7 @@ struct ieee80211_ht_info {
 /* block-ack parameters */
 #define IEEE80211_ADDBA_PARAM_POLICY_MASK 0x0002
 #define IEEE80211_ADDBA_PARAM_TID_MASK 0x003C
-#define IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK 0xFFA0
+#define IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK 0xFFC0
 #define IEEE80211_DELBA_PARAM_TID_MASK 0xF000
 #define IEEE80211_DELBA_PARAM_INITIATOR_MASK 0x0800
 
@@ -1266,9 +1291,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,
@@ -1304,6 +1328,31 @@ enum ieee80211_key_len {
        WLAN_KEY_LEN_AES_CMAC = 16,
 };
 
+/**
+ * enum - mesh path selection protocol identifier
+ *
+ * @IEEE80211_PATH_PROTOCOL_HWMP: the default path selection protocol
+ * @IEEE80211_PATH_PROTOCOL_VENDOR: a vendor specific protocol that will
+ * be specified in a vendor specific information element
+ */
+enum {
+       IEEE80211_PATH_PROTOCOL_HWMP = 0,
+       IEEE80211_PATH_PROTOCOL_VENDOR = 255,
+};
+
+/**
+ * enum - mesh path selection metric identifier
+ *
+ * @IEEE80211_PATH_METRIC_AIRTIME: the default path selection metric
+ * @IEEE80211_PATH_METRIC_VENDOR: a vendor specific metric that will be
+ * specified in a vendor specific information element
+ */
+enum {
+       IEEE80211_PATH_METRIC_AIRTIME = 0,
+       IEEE80211_PATH_METRIC_VENDOR = 255,
+};
+
+
 /*
  * IEEE 802.11-2007 7.3.2.9 Country information element
  *
@@ -1314,6 +1363,9 @@ enum ieee80211_key_len {
 /* Although the spec says 8 I'm seeing 6 in practice */
 #define IEEE80211_COUNTRY_IE_MIN_LEN   6
 
+/* The Country String field of the element shall be 3 octets in length */
+#define IEEE80211_COUNTRY_STRING_LEN   3
+
 /*
  * For regulatory extension stuff see IEEE 802.11-2007
  * Annex I (page 1141) and Annex J (page 1147). Also