]> git.karo-electronics.de Git - linux-beck.git/commitdiff
iwlwifi: change max HT and VHT A-MPDU exponent
authorEran Harary <eran.harary@intel.com>
Tue, 30 Sep 2014 04:42:06 +0000 (06:42 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 23 Nov 2014 17:57:30 +0000 (19:57 +0200)
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>
drivers/net/wireless/iwlwifi/iwl-7000.c
drivers/net/wireless/iwlwifi/iwl-8000.c
drivers/net/wireless/iwlwifi/iwl-config.h
drivers/net/wireless/iwlwifi/iwl-eeprom-parse.c
drivers/net/wireless/iwlwifi/iwl-nvm-parse.c

index b04b8858c6905ae700ac4081e57f56f59668eaf8..b4e9bc7cc929cf2202dcb771d460268879b8ea06 100644 (file)
@@ -132,8 +132,8 @@ static const struct iwl_ht_params iwl7000_ht_params = {
        .base_params = &iwl7000_base_params,                    \
        .led_mode = IWL_LED_RF_STATE,                           \
        .nvm_hw_section_num = NVM_HW_SECTION_NUM_FAMILY_7000,   \
-       .non_shared_ant = ANT_A
-
+       .non_shared_ant = ANT_A,                                \
+       .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
 
 const struct iwl_cfg iwl7260_2ac_cfg = {
        .name = "Intel(R) Dual Band Wireless AC 7260",
index 896ea906549c89d50eed5bb5069c4a22b61c6fe1..091975905cb6c55150ca8163bfe1926ac40d0b8f 100644 (file)
 /* Max SDIO RX aggregation size of the ADDBA request/response */
 #define MAX_RX_AGG_SIZE_8260_SDIO      28
 
+/* Max A-MPDU exponent for HT and VHT */
+#define MAX_HT_AMPDU_EXPONENT_8260_SDIO        IEEE80211_HT_MAX_AMPDU_32K
+#define MAX_VHT_AMPDU_EXPONENT_8260_SDIO       IEEE80211_VHT_MAX_AMPDU_32K
+
 static const struct iwl_base_params iwl8000_base_params = {
        .eeprom_size = OTP_LOW_IMAGE_SIZE_FAMILY_8000,
        .num_of_queues = IWLAGN_NUM_QUEUES,
@@ -137,6 +141,7 @@ const struct iwl_cfg iwl8260_2ac_cfg = {
        .ht_params = &iwl8000_ht_params,
        .nvm_ver = IWL8000_NVM_VERSION,
        .nvm_calib_ver = IWL8000_TX_POWER_VERSION,
+       .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
 };
 
 const struct iwl_cfg iwl8260_2ac_sdio_cfg = {
@@ -149,6 +154,8 @@ const struct iwl_cfg iwl8260_2ac_sdio_cfg = {
        .default_nvm_file = DEFAULT_NVM_FILE_FAMILY_8000,
        .max_rx_agg_size = MAX_RX_AGG_SIZE_8260_SDIO,
        .disable_dummy_notification = true,
+       .max_ht_ampdu_exponent  = MAX_HT_AMPDU_EXPONENT_8260_SDIO,
+       .max_vht_ampdu_exponent = MAX_VHT_AMPDU_EXPONENT_8260_SDIO,
 };
 
 MODULE_FIRMWARE(IWL8000_MODULE_FIRMWARE(IWL8000_UCODE_API_OK));
index f8aa9cf0827913e1c242b95609eeb821a83cd12a..c6ae4d4ec20229622d3adc4ba4874ff9fd984d61 100644 (file)
@@ -257,6 +257,10 @@ struct iwl_pwr_tx_backoff {
  * @pwr_tx_backoffs: translation table between power limits and backoffs
  * @max_rx_agg_size: max RX aggregation size of the ADDBA request/response
  * @max_tx_agg_size: max TX aggregation size of the ADDBA request/response
+ * @max_ht_ampdu_factor: the exponent of the max length of A-MPDU that the
+ *     station can receive in HT
+ * @max_vht_ampdu_exponent: the exponent of the max length of A-MPDU that the
+ *     station can receive in VHT
  *
  * We enable the driver to be backward compatible wrt. hardware features.
  * API differences in uCode shouldn't be handled here but through TLVs
@@ -297,6 +301,8 @@ struct iwl_cfg {
        unsigned int max_rx_agg_size;
        bool disable_dummy_notification;
        unsigned int max_tx_agg_size;
+       unsigned int max_ht_ampdu_exponent;
+       unsigned int max_vht_ampdu_exponent;
 };
 
 /*
index 74b796dc424287172b363fc11bc430c93bf9ef97..41ff85de73343b0a5686bfd175164807e8dc4684 100644 (file)
@@ -764,7 +764,7 @@ void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg,
        if (iwlwifi_mod_params.amsdu_size_8K)
                ht_info->cap |= IEEE80211_HT_CAP_MAX_AMSDU;
 
-       ht_info->ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K;
+       ht_info->ampdu_factor = cfg->max_ht_ampdu_exponent;
        ht_info->ampdu_density = IEEE80211_HT_MPDU_DENSITY_4;
 
        ht_info->mcs.rx_mask[0] = 0xFF;
index c302e7468559ced39edc4871466a52938091a039..06e02fcd6f7b1319ccdd2c85cb21184c2074d7b1 100644 (file)
@@ -325,6 +325,8 @@ static void iwl_init_vht_hw_capab(const struct iwl_cfg *cfg,
 {
        int num_rx_ants = num_of_ant(rx_chains);
        int num_tx_ants = num_of_ant(tx_chains);
+       unsigned int max_ampdu_exponent = (cfg->max_vht_ampdu_exponent ?:
+                                          IEEE80211_VHT_MAX_AMPDU_1024K);
 
        vht_cap->vht_supported = true;
 
@@ -332,7 +334,8 @@ static void iwl_init_vht_hw_capab(const struct iwl_cfg *cfg,
                       IEEE80211_VHT_CAP_RXSTBC_1 |
                       IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE |
                       3 << IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT |
-                      7 << IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT;
+                      max_ampdu_exponent <<
+                      IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT;
 
        if (cfg->ht_params->ldpc)
                vht_cap->cap |= IEEE80211_VHT_CAP_RXLDPC;