diff mbox series

[07/15] wireless: align HE capabilities A-MPDU Length Exponent Extension

Message ID iwlwifi.20210409123755.c2a257d3e2df.I3455245d388c52c61dace7e7958dbed7e807cfb6@changeid
State New
Headers show
Series cfg80211/mac80211 patches from our internal tree 2021-04-09 | expand

Commit Message

Luca Coelho April 9, 2021, 9:40 a.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

The A-MPDU length exponent extension is defined differently in
802.11ax D6.1, align with that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 .../net/wireless/intel/iwlwifi/iwl-nvm-parse.c   |  4 ++--
 drivers/net/wireless/mac80211_hwsim.c            |  8 ++++----
 include/linux/ieee80211.h                        | 10 ++++------
 net/mac80211/debugfs_sta.c                       | 16 ++++++++--------
 4 files changed, 18 insertions(+), 20 deletions(-)

Comments

kernel test robot April 10, 2021, 9:20 a.m. UTC | #1
Hi Luca,

I love your patch! Yet something to improve:

[auto build test ERROR on mac80211-next/master]
[also build test ERROR on mac80211/master wireless-drivers-next/master wireless-drivers/master v5.12-rc6 next-20210409]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Luca-Coelho/cfg80211-mac80211-patches-from-our-internal-tree-2021-04-09/20210409-181210
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: x86_64-randconfig-a006-20210409 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project dd453a1389b6a7e6d9214b449d3c54981b1a89b6)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/14d0d9bb385498f53ad9d73ebac33c6ef919be7c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Luca-Coelho/cfg80211-mac80211-patches-from-our-internal-tree-2021-04-09/20210409-181210
        git checkout 14d0d9bb385498f53ad9d73ebac33c6ef919be7c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/net/wireless/ath/ath11k/mac.c:1270:4: error: use of undeclared identifier 'IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_SHIFT'

                           IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_SHIFT;
                           ^
   drivers/net/wireless/ath/ath11k/mac.c:3810:6: error: use of undeclared identifier 'IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECVITE_TRANSMISSION'
           m = IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECVITE_TRANSMISSION |
               ^
   drivers/net/wireless/ath/ath11k/mac.c:3820:6: error: use of undeclared identifier 'IEEE80211_HE_PHY_CAP3_RX_HE_MU_PPDU_FROM_NON_AP_STA'
           m = IEEE80211_HE_PHY_CAP3_RX_HE_MU_PPDU_FROM_NON_AP_STA |
               ^
   drivers/net/wireless/ath/ath11k/mac.c:3832:6: error: use of undeclared identifier 'IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB'
               IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB |
               ^
   drivers/net/wireless/ath/ath11k/mac.c:3837:6: error: use of undeclared identifier 'IEEE80211_HE_PHY_CAP7_SRP_BASED_SR'
           m = IEEE80211_HE_PHY_CAP7_SRP_BASED_SR |
               ^
   drivers/net/wireless/ath/ath11k/mac.c:3838:6: error: use of undeclared identifier 'IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR'
               IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR |
               ^
   6 errors generated.


vim +/IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_SHIFT +1270 drivers/net/wireless/ath/ath11k/mac.c

d5c65159f28953 Kalle Valo          2019-11-23  1233  
d5c65159f28953 Kalle Valo          2019-11-23  1234  static void ath11k_peer_assoc_h_he(struct ath11k *ar,
d5c65159f28953 Kalle Valo          2019-11-23  1235  				   struct ieee80211_vif *vif,
d5c65159f28953 Kalle Valo          2019-11-23  1236  				   struct ieee80211_sta *sta,
d5c65159f28953 Kalle Valo          2019-11-23  1237  				   struct peer_assoc_params *arg)
d5c65159f28953 Kalle Valo          2019-11-23  1238  {
9f056ed8ee01ad John Crispin        2019-11-25  1239  	const struct ieee80211_sta_he_cap *he_cap = &sta->he_cap;
af6d39db1b046a Tamizh Chelvam      2020-09-08  1240  	u8 ampdu_factor;
9f056ed8ee01ad John Crispin        2019-11-25  1241  	u16 v;
9f056ed8ee01ad John Crispin        2019-11-25  1242  
9f056ed8ee01ad John Crispin        2019-11-25  1243  	if (!he_cap->has_he)
9f056ed8ee01ad John Crispin        2019-11-25  1244  		return;
9f056ed8ee01ad John Crispin        2019-11-25  1245  
9f056ed8ee01ad John Crispin        2019-11-25  1246  	arg->he_flag = true;
9f056ed8ee01ad John Crispin        2019-11-25  1247  
9f056ed8ee01ad John Crispin        2019-11-25  1248  	memcpy(&arg->peer_he_cap_macinfo, he_cap->he_cap_elem.mac_cap_info,
9f056ed8ee01ad John Crispin        2019-11-25  1249  	       sizeof(arg->peer_he_cap_macinfo));
9f056ed8ee01ad John Crispin        2019-11-25  1250  	memcpy(&arg->peer_he_cap_phyinfo, he_cap->he_cap_elem.phy_cap_info,
9f056ed8ee01ad John Crispin        2019-11-25  1251  	       sizeof(arg->peer_he_cap_phyinfo));
60689de46c7f6a Rajkumar Manoharan  2020-04-24  1252  	arg->peer_he_ops = vif->bss_conf.he_oper.params;
9f056ed8ee01ad John Crispin        2019-11-25  1253  
9f056ed8ee01ad John Crispin        2019-11-25  1254  	/* the top most byte is used to indicate BSS color info */
9f056ed8ee01ad John Crispin        2019-11-25  1255  	arg->peer_he_ops &= 0xffffff;
9f056ed8ee01ad John Crispin        2019-11-25  1256  
af6d39db1b046a Tamizh Chelvam      2020-09-08  1257  	/* As per section 26.6.1 11ax Draft5.0, if the Max AMPDU Exponent Extension
af6d39db1b046a Tamizh Chelvam      2020-09-08  1258  	 * in HE cap is zero, use the arg->peer_max_mpdu as calculated while parsing
af6d39db1b046a Tamizh Chelvam      2020-09-08  1259  	 * VHT caps(if VHT caps is present) or HT caps (if VHT caps is not present).
af6d39db1b046a Tamizh Chelvam      2020-09-08  1260  	 *
af6d39db1b046a Tamizh Chelvam      2020-09-08  1261  	 * For non-zero value of Max AMPDU Extponent Extension in HE MAC caps,
af6d39db1b046a Tamizh Chelvam      2020-09-08  1262  	 * if a HE STA sends VHT cap and HE cap IE in assoc request then, use
af6d39db1b046a Tamizh Chelvam      2020-09-08  1263  	 * MAX_AMPDU_LEN_FACTOR as 20 to calculate max_ampdu length.
af6d39db1b046a Tamizh Chelvam      2020-09-08  1264  	 * If a HE STA that does not send VHT cap, but HE and HT cap in assoc
af6d39db1b046a Tamizh Chelvam      2020-09-08  1265  	 * request, then use MAX_AMPDU_LEN_FACTOR as 16 to calculate max_ampdu
af6d39db1b046a Tamizh Chelvam      2020-09-08  1266  	 * length.
af6d39db1b046a Tamizh Chelvam      2020-09-08  1267  	 */
af6d39db1b046a Tamizh Chelvam      2020-09-08  1268  	ampdu_factor = (he_cap->he_cap_elem.mac_cap_info[3] &
af6d39db1b046a Tamizh Chelvam      2020-09-08  1269  			IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK) >>
af6d39db1b046a Tamizh Chelvam      2020-09-08 @1270  			IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_SHIFT;
af6d39db1b046a Tamizh Chelvam      2020-09-08  1271  
af6d39db1b046a Tamizh Chelvam      2020-09-08  1272  	if (ampdu_factor) {
af6d39db1b046a Tamizh Chelvam      2020-09-08  1273  		if (sta->vht_cap.vht_supported)
af6d39db1b046a Tamizh Chelvam      2020-09-08  1274  			arg->peer_max_mpdu = (1 << (IEEE80211_HE_VHT_MAX_AMPDU_FACTOR +
af6d39db1b046a Tamizh Chelvam      2020-09-08  1275  						    ampdu_factor)) - 1;
af6d39db1b046a Tamizh Chelvam      2020-09-08  1276  		else if (sta->ht_cap.ht_supported)
af6d39db1b046a Tamizh Chelvam      2020-09-08  1277  			arg->peer_max_mpdu = (1 << (IEEE80211_HE_HT_MAX_AMPDU_FACTOR +
af6d39db1b046a Tamizh Chelvam      2020-09-08  1278  						    ampdu_factor)) - 1;
af6d39db1b046a Tamizh Chelvam      2020-09-08  1279  	}
af6d39db1b046a Tamizh Chelvam      2020-09-08  1280  
9f056ed8ee01ad John Crispin        2019-11-25  1281  	if (he_cap->he_cap_elem.phy_cap_info[6] &
9f056ed8ee01ad John Crispin        2019-11-25  1282  	    IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT) {
9f056ed8ee01ad John Crispin        2019-11-25  1283  		int bit = 7;
9f056ed8ee01ad John Crispin        2019-11-25  1284  		int nss, ru;
9f056ed8ee01ad John Crispin        2019-11-25  1285  
9f056ed8ee01ad John Crispin        2019-11-25  1286  		arg->peer_ppet.numss_m1 = he_cap->ppe_thres[0] &
9f056ed8ee01ad John Crispin        2019-11-25  1287  					  IEEE80211_PPE_THRES_NSS_MASK;
9f056ed8ee01ad John Crispin        2019-11-25  1288  		arg->peer_ppet.ru_bit_mask =
9f056ed8ee01ad John Crispin        2019-11-25  1289  			(he_cap->ppe_thres[0] &
9f056ed8ee01ad John Crispin        2019-11-25  1290  			 IEEE80211_PPE_THRES_RU_INDEX_BITMASK_MASK) >>
9f056ed8ee01ad John Crispin        2019-11-25  1291  			IEEE80211_PPE_THRES_RU_INDEX_BITMASK_POS;
9f056ed8ee01ad John Crispin        2019-11-25  1292  
9f056ed8ee01ad John Crispin        2019-11-25  1293  		for (nss = 0; nss <= arg->peer_ppet.numss_m1; nss++) {
9f056ed8ee01ad John Crispin        2019-11-25  1294  			for (ru = 0; ru < 4; ru++) {
9f056ed8ee01ad John Crispin        2019-11-25  1295  				u32 val = 0;
9f056ed8ee01ad John Crispin        2019-11-25  1296  				int i;
9f056ed8ee01ad John Crispin        2019-11-25  1297  
9f056ed8ee01ad John Crispin        2019-11-25  1298  				if ((arg->peer_ppet.ru_bit_mask & BIT(ru)) == 0)
9f056ed8ee01ad John Crispin        2019-11-25  1299  					continue;
9f056ed8ee01ad John Crispin        2019-11-25  1300  				for (i = 0; i < 6; i++) {
9f056ed8ee01ad John Crispin        2019-11-25  1301  					val >>= 1;
9f056ed8ee01ad John Crispin        2019-11-25  1302  					val |= ((he_cap->ppe_thres[bit / 8] >>
9f056ed8ee01ad John Crispin        2019-11-25  1303  						 (bit % 8)) & 0x1) << 5;
9f056ed8ee01ad John Crispin        2019-11-25  1304  					bit++;
9f056ed8ee01ad John Crispin        2019-11-25  1305  				}
9f056ed8ee01ad John Crispin        2019-11-25  1306  				arg->peer_ppet.ppet16_ppet8_ru3_ru0[nss] |=
9f056ed8ee01ad John Crispin        2019-11-25  1307  								val << (ru * 6);
9f056ed8ee01ad John Crispin        2019-11-25  1308  			}
9f056ed8ee01ad John Crispin        2019-11-25  1309  		}
9f056ed8ee01ad John Crispin        2019-11-25  1310  	}
9f056ed8ee01ad John Crispin        2019-11-25  1311  
6d293d447670da John Crispin        2019-11-25  1312  	if (he_cap->he_cap_elem.mac_cap_info[0] & IEEE80211_HE_MAC_CAP0_TWT_RES)
6d293d447670da John Crispin        2019-11-25  1313  		arg->twt_responder = true;
6d293d447670da John Crispin        2019-11-25  1314  	if (he_cap->he_cap_elem.mac_cap_info[0] & IEEE80211_HE_MAC_CAP0_TWT_REQ)
6d293d447670da John Crispin        2019-11-25  1315  		arg->twt_requester = true;
6d293d447670da John Crispin        2019-11-25  1316  
9f056ed8ee01ad John Crispin        2019-11-25  1317  	switch (sta->bandwidth) {
9f056ed8ee01ad John Crispin        2019-11-25  1318  	case IEEE80211_STA_RX_BW_160:
9f056ed8ee01ad John Crispin        2019-11-25  1319  		if (he_cap->he_cap_elem.phy_cap_info[0] &
9f056ed8ee01ad John Crispin        2019-11-25  1320  		    IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G) {
9f056ed8ee01ad John Crispin        2019-11-25  1321  			v = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_80p80);
9f056ed8ee01ad John Crispin        2019-11-25  1322  			arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80_80] = v;
9f056ed8ee01ad John Crispin        2019-11-25  1323  
9f056ed8ee01ad John Crispin        2019-11-25  1324  			v = le16_to_cpu(he_cap->he_mcs_nss_supp.tx_mcs_80p80);
9f056ed8ee01ad John Crispin        2019-11-25  1325  			arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80_80] = v;
9f056ed8ee01ad John Crispin        2019-11-25  1326  
9f056ed8ee01ad John Crispin        2019-11-25  1327  			arg->peer_he_mcs_count++;
9f056ed8ee01ad John Crispin        2019-11-25  1328  		}
9f056ed8ee01ad John Crispin        2019-11-25  1329  		v = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_160);
9f056ed8ee01ad John Crispin        2019-11-25  1330  		arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_160] = v;
9f056ed8ee01ad John Crispin        2019-11-25  1331  
9f056ed8ee01ad John Crispin        2019-11-25  1332  		v = le16_to_cpu(he_cap->he_mcs_nss_supp.tx_mcs_160);
9f056ed8ee01ad John Crispin        2019-11-25  1333  		arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_160] = v;
9f056ed8ee01ad John Crispin        2019-11-25  1334  
9f056ed8ee01ad John Crispin        2019-11-25  1335  		arg->peer_he_mcs_count++;
0b294aebb6a00b Gustavo A. R. Silva 2020-07-27  1336  		fallthrough;
9f056ed8ee01ad John Crispin        2019-11-25  1337  
9f056ed8ee01ad John Crispin        2019-11-25  1338  	default:
9f056ed8ee01ad John Crispin        2019-11-25  1339  		v = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_80);
9f056ed8ee01ad John Crispin        2019-11-25  1340  		arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80] = v;
9f056ed8ee01ad John Crispin        2019-11-25  1341  
9f056ed8ee01ad John Crispin        2019-11-25  1342  		v = le16_to_cpu(he_cap->he_mcs_nss_supp.tx_mcs_80);
9f056ed8ee01ad John Crispin        2019-11-25  1343  		arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80] = v;
9f056ed8ee01ad John Crispin        2019-11-25  1344  
9f056ed8ee01ad John Crispin        2019-11-25  1345  		arg->peer_he_mcs_count++;
9f056ed8ee01ad John Crispin        2019-11-25  1346  		break;
9f056ed8ee01ad John Crispin        2019-11-25  1347  	}
d5c65159f28953 Kalle Valo          2019-11-23  1348  }
d5c65159f28953 Kalle Valo          2019-11-23  1349  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff mbox series

Patch

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
index 632f20d4027d..d2058cdcb0d8 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
@@ -550,7 +550,7 @@  static const struct ieee80211_sband_iftype_data iwl_he_capa[] = {
 					IEEE80211_HE_MAC_CAP2_32BIT_BA_BITMAP,
 				.mac_cap_info[3] =
 					IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
-					IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
+					IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2,
 				.mac_cap_info[4] =
 					IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU |
 					IEEE80211_HE_MAC_CAP4_MULTI_TID_AGG_TX_QOS_B39,
@@ -636,7 +636,7 @@  static const struct ieee80211_sband_iftype_data iwl_he_capa[] = {
 					IEEE80211_HE_MAC_CAP2_BSR,
 				.mac_cap_info[3] =
 					IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
-					IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
+					IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2,
 				.mac_cap_info[4] =
 					IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
 				.mac_cap_info[5] =
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index fa7d4c20dc13..3039baa43f4c 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2795,7 +2795,7 @@  static const struct ieee80211_sband_iftype_data he_capa_2ghz[] = {
 					IEEE80211_HE_MAC_CAP2_ACK_EN,
 				.mac_cap_info[3] =
 					IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
-					IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
+					IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3,
 				.mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
 				.phy_cap_info[1] =
 					IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK |
@@ -2839,7 +2839,7 @@  static const struct ieee80211_sband_iftype_data he_capa_2ghz[] = {
 					IEEE80211_HE_MAC_CAP2_ACK_EN,
 				.mac_cap_info[3] =
 					IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
-					IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
+					IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3,
 				.mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
 				.phy_cap_info[1] =
 					IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK |
@@ -2885,7 +2885,7 @@  static const struct ieee80211_sband_iftype_data he_capa_5ghz[] = {
 					IEEE80211_HE_MAC_CAP2_ACK_EN,
 				.mac_cap_info[3] =
 					IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
-					IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
+					IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3,
 				.mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
 				.phy_cap_info[0] =
 					IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G |
@@ -2933,7 +2933,7 @@  static const struct ieee80211_sband_iftype_data he_capa_5ghz[] = {
 					IEEE80211_HE_MAC_CAP2_ACK_EN,
 				.mac_cap_info[3] =
 					IEEE80211_HE_MAC_CAP3_OMI_CONTROL |
-					IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2,
+					IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3,
 				.mac_cap_info[4] = IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU,
 				.phy_cap_info[0] =
 					IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 0c15fb64e7c2..9aa6a6c02100 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -2006,17 +2006,15 @@  int ieee80211_get_vht_max_nss(struct ieee80211_vht_cap *cap,
  * A-MDPU Length Exponent field in the HT capabilities, VHT capabilities and the
  * same field in the HE capabilities.
  */
-#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_USE_VHT	0x00
-#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_1		0x08
-#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2		0x10
-#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_RESERVED	0x18
+#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_0		0x00
+#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_1		0x08
+#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2		0x10
+#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3		0x18
 #define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK		0x18
 #define IEEE80211_HE_MAC_CAP3_AMSDU_FRAG			0x20
 #define IEEE80211_HE_MAC_CAP3_FLEX_TWT_SCHED			0x40
 #define IEEE80211_HE_MAC_CAP3_RX_CTRL_FRAME_TO_MULTIBSS		0x80
 
-#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_SHIFT		3
-
 #define IEEE80211_HE_MAC_CAP4_BSRP_BQRP_A_MPDU_AGG		0x01
 #define IEEE80211_HE_MAC_CAP4_QTP				0x02
 #define IEEE80211_HE_MAC_CAP4_BQR				0x04
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index d350224d45e8..25b3d4822aed 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -711,17 +711,17 @@  static ssize_t sta_he_capa_read(struct file *file, char __user *userbuf,
 	PFLAG(MAC, 3, OFDMA_RA, "OFDMA-RA");
 
 	switch (cap[3] & IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK) {
-	case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_USE_VHT:
-		PRINT("MAX-AMPDU-LEN-EXP-USE-VHT");
+	case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_0:
+		PRINT("MAX-AMPDU-LEN-EXP-USE-EXT-0");
 		break;
-	case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_1:
-		PRINT("MAX-AMPDU-LEN-EXP-VHT-1");
+	case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_1:
+		PRINT("MAX-AMPDU-LEN-EXP-VHT-EXT-1");
 		break;
-	case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2:
-		PRINT("MAX-AMPDU-LEN-EXP-VHT-2");
+	case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2:
+		PRINT("MAX-AMPDU-LEN-EXP-VHT-EXT-2");
 		break;
-	case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_RESERVED:
-		PRINT("MAX-AMPDU-LEN-EXP-RESERVED");
+	case IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3:
+		PRINT("MAX-AMPDU-LEN-EXP-VHT-EXT-3");
 		break;
 	}