wireless: fix VHT max AMPDU exponent definition
authorJohannes Berg <johannes.berg@intel.com>
Wed, 5 Dec 2012 15:45:31 +0000 (16:45 +0100)
committerChristian Lamparter <chunkeey@googlemail.com>
Sat, 15 Dec 2012 21:42:33 +0000 (22:42 +0100)
This is really a 3-bit field, not a single bit,
so declare a mask and shift. Also fix hwsim, it
advertises the maximum possible.

While at it reindent all the defines using tabs
instead of spaces.

Change-Id: I7cd81c0d72f76deb5010aba5bfa3dd312006e898
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
include/linux/ieee80211.h

index fa85ff3f998a0964eb2b559ca7f0200965207e53..0ab6e2c968f86074a55397bd1926b404455300a0 100644 (file)
@@ -1281,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