summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gabay <daniel.gabay@intel.com>2023-04-13 10:44:10 +0300
committerJohannes Berg <johannes.berg@intel.com>2023-04-13 16:30:00 +0200
commitcb75abcebc458efe3b329372e0a57c15f7bdaee0 (patch)
treefaddb88eb64f6a433f466e91e81baface1908c61
parenta0c8ab93eb3edf82511502be71a825f74b632137 (diff)
wifi: iwlwifi: nvm: Update HE capabilities on 6GHz band for EHT device
Max A-MPDU length exponent shall be set to 2 for EHT capable device on 6GHz band in order to support 4MB aggregation. Update HE MAC capabilities accordingly for station and softap interfaces. This change requires to add another ieee80211_sband_iftype_data for uhb since high/uhb are no longer the same. Signed-off-by: Daniel Gabay <daniel.gabay@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230413102635.1eee32cfd199.I9c5ff3a6956d509137deca620814935149516fbc@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.h5
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c10
2 files changed, 10 insertions, 5 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.h b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.h
index baa643386018..0e8ca761d24b 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.h
@@ -47,13 +47,12 @@ struct iwl_nvm_data {
struct ieee80211_supported_band bands[NUM_NL80211_BANDS];
/*
- * iftype data for low (2.4 GHz) and high (5 and 6 GHz) bands,
- * we can use the same for 5 and 6 GHz bands because they have
- * the same data
+ * iftype data for low (2.4 GHz) high (5 GHz) and uhb (6 GHz) bands
*/
struct {
struct ieee80211_sband_iftype_data low[2];
struct ieee80211_sband_iftype_data high[2];
+ struct ieee80211_sband_iftype_data uhb[2];
} iftd;
struct ieee80211_channel channels[];
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
index 449a1922a215..92a79df3e6d2 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
@@ -860,7 +860,10 @@ iwl_nvm_fixup_sband_iftd(struct iwl_trans *trans,
/* Advertise an A-MPDU exponent extension based on
* operating band
*/
- if (sband->band != NL80211_BAND_2GHZ)
+ if (sband->band == NL80211_BAND_6GHZ && iftype_data->eht_cap.has_eht)
+ iftype_data->he_cap.he_cap_elem.mac_cap_info[3] |=
+ IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2;
+ else if (sband->band != NL80211_BAND_2GHZ)
iftype_data->he_cap.he_cap_elem.mac_cap_info[3] |=
IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_1;
else
@@ -996,15 +999,18 @@ static void iwl_init_he_hw_capab(struct iwl_trans *trans,
BUILD_BUG_ON(sizeof(data->iftd.low) != sizeof(iwl_he_eht_capa));
BUILD_BUG_ON(sizeof(data->iftd.high) != sizeof(iwl_he_eht_capa));
+ BUILD_BUG_ON(sizeof(data->iftd.uhb) != sizeof(iwl_he_eht_capa));
switch (sband->band) {
case NL80211_BAND_2GHZ:
iftype_data = data->iftd.low;
break;
case NL80211_BAND_5GHZ:
- case NL80211_BAND_6GHZ:
iftype_data = data->iftd.high;
break;
+ case NL80211_BAND_6GHZ:
+ iftype_data = data->iftd.uhb;
+ break;
default:
WARN_ON(1);
return;