wireless: fix VHT max AMPDU exponent definition
[carl9170fw.git] / include / linux / ieee80211.h
index 03eecee20d9b34eb893bd057917cc321ef9c3718..0ab6e2c968f86074a55397bd1926b404455300a0 100644 (file)
 
 #define IEEE80211_MAX_MESH_ID_LEN      32
 
+#define IEEE80211_NUM_TIDS             16
+
 #define IEEE80211_QOS_CTL_LEN          2
 /* 1d tag mask */
 #define IEEE80211_QOS_CTL_TAG1D_MASK           0x0007
@@ -678,6 +680,21 @@ struct ieee80211_meshconf_ie {
        u8 meshconf_cap;
 } __attribute__ ((packed));
 
+/**
+ * enum mesh_config_capab_flags - Mesh Configuration IE capability field flags
+ *
+ * @IEEE80211_MESHCONF_CAPAB_ACCEPT_PLINKS: STA is willing to establish
+ *     additional mesh peerings with other mesh STAs
+ * @IEEE80211_MESHCONF_CAPAB_FORWARDING: the STA forwards MSDUs
+ * @IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING: TBTT adjustment procedure
+ *     is ongoing
+ */
+enum mesh_config_capab_flags {
+       IEEE80211_MESHCONF_CAPAB_ACCEPT_PLINKS          = 0x01,
+       IEEE80211_MESHCONF_CAPAB_FORWARDING             = 0x08,
+       IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING         = 0x20,
+};
+
 /**
  * struct ieee80211_rann_ie
  *
@@ -1176,11 +1193,13 @@ struct ieee80211_ht_operation {
  *     STA can receive. Rate expressed in units of 1 Mbps.
  *     If this field is 0 this value should not be used to
  *     consider the highest RX data rate supported.
+ *     The top 3 bits of this field are reserved.
  * @tx_mcs_map: TX MCS map 2 bits for each stream, total 8 streams
  * @tx_highest: Indicates highest long GI VHT PPDU data rate
  *     STA can transmit. Rate expressed in units of 1 Mbps.
  *     If this field is 0 this value should not be used to
  *     consider the highest TX data rate supported.
+ *     The top 3 bits of this field are reserved.
  */
 struct ieee80211_vht_mcs_info {
        __le16 rx_mcs_map;
@@ -1189,6 +1208,27 @@ struct ieee80211_vht_mcs_info {
        __le16 tx_highest;
 } __packed;
 
+/**
+ * enum ieee80211_vht_mcs_support - VHT MCS support definitions
+ * @IEEE80211_VHT_MCS_SUPPORT_0_7: MCSes 0-7 are supported for the
+ *     number of streams
+ * @IEEE80211_VHT_MCS_SUPPORT_0_8: MCSes 0-8 are supported
+ * @IEEE80211_VHT_MCS_SUPPORT_0_9: MCSes 0-9 are supported
+ * @IEEE80211_VHT_MCS_NOT_SUPPORTED: This number of streams isn't supported
+ *
+ * These definitions are used in each 2-bit subfield of the @rx_mcs_map
+ * and @tx_mcs_map fields of &struct ieee80211_vht_mcs_info, which are
+ * both split into 8 subfields by number of streams. These values indicate
+ * which MCSes are supported for the number of streams the value appears
+ * for.
+ */
+enum ieee80211_vht_mcs_support {
+       IEEE80211_VHT_MCS_SUPPORT_0_7   = 0,
+       IEEE80211_VHT_MCS_SUPPORT_0_8   = 1,
+       IEEE80211_VHT_MCS_SUPPORT_0_9   = 2,
+       IEEE80211_VHT_MCS_NOT_SUPPORTED = 3,
+};
+
 /**
  * struct ieee80211_vht_cap - VHT capabilities
  *
@@ -1202,6 +1242,21 @@ struct ieee80211_vht_cap {
        struct ieee80211_vht_mcs_info supp_mcs;
 } __packed;
 
+/**
+ * enum ieee80211_vht_chanwidth - VHT channel width
+ * @IEEE80211_VHT_CHANWIDTH_USE_HT: use the HT operation IE to
+ *     determine the channel width (20 or 40 MHz)
+ * @IEEE80211_VHT_CHANWIDTH_80MHZ: 80 MHz bandwidth
+ * @IEEE80211_VHT_CHANWIDTH_160MHZ: 160 MHz bandwidth
+ * @IEEE80211_VHT_CHANWIDTH_80P80MHZ: 80+80 MHz bandwidth
+ */
+enum ieee80211_vht_chanwidth {
+       IEEE80211_VHT_CHANWIDTH_USE_HT          = 0,
+       IEEE80211_VHT_CHANWIDTH_80MHZ           = 1,
+       IEEE80211_VHT_CHANWIDTH_160MHZ          = 2,
+       IEEE80211_VHT_CHANWIDTH_80P80MHZ        = 3,
+};
+
 /**
  * struct ieee80211_vht_operation - VHT operation IE
  *
@@ -1226,32 +1281,34 @@ struct ieee80211_vht_operation {
 #define IEEE80211_VHT_MCS_NOT_SUPPORTED 3
 
 /* 802.11ac VHT Capabilities */
-#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895                0x00000000
-#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991                0x00000001
-#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454               0x00000002
-#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ              0x00000004
-#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ     0x00000008
-#define IEEE80211_VHT_CAP_RXLDPC                              0x00000010
-#define IEEE80211_VHT_CAP_SHORT_GI_80                         0x00000020
-#define IEEE80211_VHT_CAP_SHORT_GI_160                        0x00000040
-#define IEEE80211_VHT_CAP_TXSTBC                              0x00000080
-#define IEEE80211_VHT_CAP_RXSTBC_1                            0x00000100
-#define IEEE80211_VHT_CAP_RXSTBC_2                            0x00000200
-#define IEEE80211_VHT_CAP_RXSTBC_3                            0x00000300
-#define IEEE80211_VHT_CAP_RXSTBC_4                            0x00000400
-#define IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE               0x00000800
-#define IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE               0x00001000
-#define IEEE80211_VHT_CAP_BEAMFORMER_ANTENNAS_MAX             0x00006000
-#define IEEE80211_VHT_CAP_SOUNDING_DIMENTION_MAX              0x00030000
-#define IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE               0x00080000
-#define IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE               0x00100000
-#define IEEE80211_VHT_CAP_VHT_TXOP_PS                         0x00200000
-#define IEEE80211_VHT_CAP_HTC_VHT                             0x00400000
-#define IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT          0x00800000
-#define IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_UNSOL_MFB   0x08000000
-#define IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB     0x0c000000
-#define IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN                  0x10000000
-#define IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN                  0x20000000
+#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895                 0x00000000
+#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991                 0x00000001
+#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454                        0x00000002
+#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ               0x00000004
+#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ      0x00000008
+#define IEEE80211_VHT_CAP_RXLDPC                               0x00000010
+#define IEEE80211_VHT_CAP_SHORT_GI_80                          0x00000020
+#define IEEE80211_VHT_CAP_SHORT_GI_160                         0x00000040
+#define IEEE80211_VHT_CAP_TXSTBC                               0x00000080
+#define IEEE80211_VHT_CAP_RXSTBC_1                             0x00000100
+#define IEEE80211_VHT_CAP_RXSTBC_2                             0x00000200
+#define IEEE80211_VHT_CAP_RXSTBC_3                             0x00000300
+#define IEEE80211_VHT_CAP_RXSTBC_4                             0x00000400
+#define IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE                        0x00000800
+#define IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE                        0x00001000
+#define IEEE80211_VHT_CAP_BEAMFORMER_ANTENNAS_MAX              0x00006000
+#define IEEE80211_VHT_CAP_SOUNDING_DIMENTION_MAX               0x00030000
+#define IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE                        0x00080000
+#define IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE                        0x00100000
+#define IEEE80211_VHT_CAP_VHT_TXOP_PS                          0x00200000
+#define IEEE80211_VHT_CAP_HTC_VHT                              0x00400000
+#define IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT     23
+#define IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK      \
+               (7 << IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT)
+#define IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_UNSOL_MFB    0x08000000
+#define IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB      0x0c000000
+#define IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN                   0x10000000
+#define IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN                   0x20000000
 
 /* Authentication algorithms */
 #define WLAN_AUTH_OPEN 0