diff options
author | Eran Harary <eran.harary@intel.com> | 2014-09-30 00:42:06 -0400 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-11-23 12:57:30 -0500 |
commit | c064ddf318aa51647a30108f7cd151c208c62eef (patch) | |
tree | 6a11b6c4e3965680d66a269636c2223ef5790183 /drivers | |
parent | 66dc527296d8b3061cb7368927b5233f886c6f83 (diff) |
iwlwifi: change max HT and VHT A-MPDU exponent
Add two new parameters to iwl_cfg:
max_ht_ampdu_exponent and max_vht_ampdu_exponent.
These parameters, if set, will set new values to the maximum of
HT and VHT A-MPDU exponent for the A-MPDU length exponent.
Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-7000.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-8000.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-config.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-eeprom-parse.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-nvm-parse.c | 5 |
5 files changed, 20 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-7000.c b/drivers/net/wireless/iwlwifi/iwl-7000.c index b04b8858c690..b4e9bc7cc929 100644 --- a/drivers/net/wireless/iwlwifi/iwl-7000.c +++ b/drivers/net/wireless/iwlwifi/iwl-7000.c | |||
@@ -132,8 +132,8 @@ static const struct iwl_ht_params iwl7000_ht_params = { | |||
132 | .base_params = &iwl7000_base_params, \ | 132 | .base_params = &iwl7000_base_params, \ |
133 | .led_mode = IWL_LED_RF_STATE, \ | 133 | .led_mode = IWL_LED_RF_STATE, \ |
134 | .nvm_hw_section_num = NVM_HW_SECTION_NUM_FAMILY_7000, \ | 134 | .nvm_hw_section_num = NVM_HW_SECTION_NUM_FAMILY_7000, \ |
135 | .non_shared_ant = ANT_A | 135 | .non_shared_ant = ANT_A, \ |
136 | 136 | .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K | |
137 | 137 | ||
138 | const struct iwl_cfg iwl7260_2ac_cfg = { | 138 | const struct iwl_cfg iwl7260_2ac_cfg = { |
139 | .name = "Intel(R) Dual Band Wireless AC 7260", | 139 | .name = "Intel(R) Dual Band Wireless AC 7260", |
diff --git a/drivers/net/wireless/iwlwifi/iwl-8000.c b/drivers/net/wireless/iwlwifi/iwl-8000.c index 896ea906549c..091975905cb6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-8000.c +++ b/drivers/net/wireless/iwlwifi/iwl-8000.c | |||
@@ -91,6 +91,10 @@ | |||
91 | /* Max SDIO RX aggregation size of the ADDBA request/response */ | 91 | /* Max SDIO RX aggregation size of the ADDBA request/response */ |
92 | #define MAX_RX_AGG_SIZE_8260_SDIO 28 | 92 | #define MAX_RX_AGG_SIZE_8260_SDIO 28 |
93 | 93 | ||
94 | /* Max A-MPDU exponent for HT and VHT */ | ||
95 | #define MAX_HT_AMPDU_EXPONENT_8260_SDIO IEEE80211_HT_MAX_AMPDU_32K | ||
96 | #define MAX_VHT_AMPDU_EXPONENT_8260_SDIO IEEE80211_VHT_MAX_AMPDU_32K | ||
97 | |||
94 | static const struct iwl_base_params iwl8000_base_params = { | 98 | static const struct iwl_base_params iwl8000_base_params = { |
95 | .eeprom_size = OTP_LOW_IMAGE_SIZE_FAMILY_8000, | 99 | .eeprom_size = OTP_LOW_IMAGE_SIZE_FAMILY_8000, |
96 | .num_of_queues = IWLAGN_NUM_QUEUES, | 100 | .num_of_queues = IWLAGN_NUM_QUEUES, |
@@ -137,6 +141,7 @@ const struct iwl_cfg iwl8260_2ac_cfg = { | |||
137 | .ht_params = &iwl8000_ht_params, | 141 | .ht_params = &iwl8000_ht_params, |
138 | .nvm_ver = IWL8000_NVM_VERSION, | 142 | .nvm_ver = IWL8000_NVM_VERSION, |
139 | .nvm_calib_ver = IWL8000_TX_POWER_VERSION, | 143 | .nvm_calib_ver = IWL8000_TX_POWER_VERSION, |
144 | .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, | ||
140 | }; | 145 | }; |
141 | 146 | ||
142 | const struct iwl_cfg iwl8260_2ac_sdio_cfg = { | 147 | const struct iwl_cfg iwl8260_2ac_sdio_cfg = { |
@@ -149,6 +154,8 @@ const struct iwl_cfg iwl8260_2ac_sdio_cfg = { | |||
149 | .default_nvm_file = DEFAULT_NVM_FILE_FAMILY_8000, | 154 | .default_nvm_file = DEFAULT_NVM_FILE_FAMILY_8000, |
150 | .max_rx_agg_size = MAX_RX_AGG_SIZE_8260_SDIO, | 155 | .max_rx_agg_size = MAX_RX_AGG_SIZE_8260_SDIO, |
151 | .disable_dummy_notification = true, | 156 | .disable_dummy_notification = true, |
157 | .max_ht_ampdu_exponent = MAX_HT_AMPDU_EXPONENT_8260_SDIO, | ||
158 | .max_vht_ampdu_exponent = MAX_VHT_AMPDU_EXPONENT_8260_SDIO, | ||
152 | }; | 159 | }; |
153 | 160 | ||
154 | MODULE_FIRMWARE(IWL8000_MODULE_FIRMWARE(IWL8000_UCODE_API_OK)); | 161 | MODULE_FIRMWARE(IWL8000_MODULE_FIRMWARE(IWL8000_UCODE_API_OK)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-config.h b/drivers/net/wireless/iwlwifi/iwl-config.h index f8aa9cf08279..c6ae4d4ec202 100644 --- a/drivers/net/wireless/iwlwifi/iwl-config.h +++ b/drivers/net/wireless/iwlwifi/iwl-config.h | |||
@@ -257,6 +257,10 @@ struct iwl_pwr_tx_backoff { | |||
257 | * @pwr_tx_backoffs: translation table between power limits and backoffs | 257 | * @pwr_tx_backoffs: translation table between power limits and backoffs |
258 | * @max_rx_agg_size: max RX aggregation size of the ADDBA request/response | 258 | * @max_rx_agg_size: max RX aggregation size of the ADDBA request/response |
259 | * @max_tx_agg_size: max TX aggregation size of the ADDBA request/response | 259 | * @max_tx_agg_size: max TX aggregation size of the ADDBA request/response |
260 | * @max_ht_ampdu_factor: the exponent of the max length of A-MPDU that the | ||
261 | * station can receive in HT | ||
262 | * @max_vht_ampdu_exponent: the exponent of the max length of A-MPDU that the | ||
263 | * station can receive in VHT | ||
260 | * | 264 | * |
261 | * We enable the driver to be backward compatible wrt. hardware features. | 265 | * We enable the driver to be backward compatible wrt. hardware features. |
262 | * API differences in uCode shouldn't be handled here but through TLVs | 266 | * API differences in uCode shouldn't be handled here but through TLVs |
@@ -297,6 +301,8 @@ struct iwl_cfg { | |||
297 | unsigned int max_rx_agg_size; | 301 | unsigned int max_rx_agg_size; |
298 | bool disable_dummy_notification; | 302 | bool disable_dummy_notification; |
299 | unsigned int max_tx_agg_size; | 303 | unsigned int max_tx_agg_size; |
304 | unsigned int max_ht_ampdu_exponent; | ||
305 | unsigned int max_vht_ampdu_exponent; | ||
300 | }; | 306 | }; |
301 | 307 | ||
302 | /* | 308 | /* |
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom-parse.c b/drivers/net/wireless/iwlwifi/iwl-eeprom-parse.c index 74b796dc4242..41ff85de7334 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom-parse.c +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom-parse.c | |||
@@ -764,7 +764,7 @@ void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg, | |||
764 | if (iwlwifi_mod_params.amsdu_size_8K) | 764 | if (iwlwifi_mod_params.amsdu_size_8K) |
765 | ht_info->cap |= IEEE80211_HT_CAP_MAX_AMSDU; | 765 | ht_info->cap |= IEEE80211_HT_CAP_MAX_AMSDU; |
766 | 766 | ||
767 | ht_info->ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K; | 767 | ht_info->ampdu_factor = cfg->max_ht_ampdu_exponent; |
768 | ht_info->ampdu_density = IEEE80211_HT_MPDU_DENSITY_4; | 768 | ht_info->ampdu_density = IEEE80211_HT_MPDU_DENSITY_4; |
769 | 769 | ||
770 | ht_info->mcs.rx_mask[0] = 0xFF; | 770 | ht_info->mcs.rx_mask[0] = 0xFF; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c index c302e7468559..06e02fcd6f7b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c +++ b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c | |||
@@ -325,6 +325,8 @@ static void iwl_init_vht_hw_capab(const struct iwl_cfg *cfg, | |||
325 | { | 325 | { |
326 | int num_rx_ants = num_of_ant(rx_chains); | 326 | int num_rx_ants = num_of_ant(rx_chains); |
327 | int num_tx_ants = num_of_ant(tx_chains); | 327 | int num_tx_ants = num_of_ant(tx_chains); |
328 | unsigned int max_ampdu_exponent = (cfg->max_vht_ampdu_exponent ?: | ||
329 | IEEE80211_VHT_MAX_AMPDU_1024K); | ||
328 | 330 | ||
329 | vht_cap->vht_supported = true; | 331 | vht_cap->vht_supported = true; |
330 | 332 | ||
@@ -332,7 +334,8 @@ static void iwl_init_vht_hw_capab(const struct iwl_cfg *cfg, | |||
332 | IEEE80211_VHT_CAP_RXSTBC_1 | | 334 | IEEE80211_VHT_CAP_RXSTBC_1 | |
333 | IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE | | 335 | IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE | |
334 | 3 << IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT | | 336 | 3 << IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT | |
335 | 7 << IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT; | 337 | max_ampdu_exponent << |
338 | IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT; | ||
336 | 339 | ||
337 | if (cfg->ht_params->ldpc) | 340 | if (cfg->ht_params->ldpc) |
338 | vht_cap->cap |= IEEE80211_VHT_CAP_RXLDPC; | 341 | vht_cap->cap |= IEEE80211_VHT_CAP_RXLDPC; |