iwlwifi: mvm: support additional nvm_file in family 8000 B step
authorEran Harary <eran.harary@intel.com>
Tue, 2 Dec 2014 13:19:22 +0000 (15:19 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 28 Dec 2014 18:00:16 +0000 (20:00 +0200)
nvm_file in family 8000 B step and A step differ. This means
that the driver should support 2 file name as default.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/iwl-8000.c
drivers/net/wireless/iwlwifi/iwl-config.h
drivers/net/wireless/iwlwifi/mvm/mac80211.c
drivers/net/wireless/iwlwifi/mvm/ops.c

index 6c5c55856a35f994b55cf644dfbfc6469c03d62c..8f64928aeb421260e19d527dba15fbdf1240a15b 100644 (file)
@@ -90,7 +90,8 @@
        IWL8000_FW_PRE "-" __stringify(api) ".ucode"
 
 #define NVM_HW_SECTION_NUM_FAMILY_8000         10
-#define DEFAULT_NVM_FILE_FAMILY_8000           "iwl_nvm_8000.bin"
+#define DEFAULT_NVM_FILE_FAMILY_8000A          "iwl_nvm_8000.bin"
+#define DEFAULT_NVM_FILE_FAMILY_8000           "iwl_nvm_8000B.bin"
 
 /* Max SDIO RX aggregation size of the ADDBA request/response */
 #define MAX_RX_AGG_SIZE_8260_SDIO      28
@@ -159,6 +160,7 @@ const struct iwl_cfg iwl8260_2ac_sdio_cfg = {
        .nvm_ver = IWL8000_NVM_VERSION,
        .nvm_calib_ver = IWL8000_TX_POWER_VERSION,
        .default_nvm_file = DEFAULT_NVM_FILE_FAMILY_8000,
+       .default_nvm_file_8000A = DEFAULT_NVM_FILE_FAMILY_8000A,
        .max_rx_agg_size = MAX_RX_AGG_SIZE_8260_SDIO,
        .disable_dummy_notification = true,
        .max_ht_ampdu_exponent  = MAX_HT_AMPDU_EXPONENT_8260_SDIO,
@@ -173,6 +175,7 @@ const struct iwl_cfg iwl4165_2ac_sdio_cfg = {
        .nvm_ver = IWL8000_NVM_VERSION,
        .nvm_calib_ver = IWL8000_TX_POWER_VERSION,
        .default_nvm_file = DEFAULT_NVM_FILE_FAMILY_8000,
+       .default_nvm_file_8000A = DEFAULT_NVM_FILE_FAMILY_8000A,
        .max_rx_agg_size = MAX_RX_AGG_SIZE_8260_SDIO,
        .bt_shared_single_ant = true,
        .disable_dummy_notification = true,
index 31c67dfabf5518fedf1b3ceb2819085c4463ee6b..2daabab7ec3f6f172e9179136d562556f9096198 100644 (file)
@@ -300,6 +300,7 @@ struct iwl_cfg {
        const struct iwl_pwr_tx_backoff *pwr_tx_backoffs;
        bool no_power_up_nic_in_init;
        const char *default_nvm_file;
+       const char *default_nvm_file_8000A;
        unsigned int max_rx_agg_size;
        bool disable_dummy_notification;
        unsigned int max_tx_agg_size;
index 2293a51f3c3a13cdc45c87f099af1f46a170102c..f53bfd6e8df818c6baf1777d960c6e61a0247bd7 100644 (file)
@@ -85,6 +85,7 @@
 #include "testmode.h"
 #include "iwl-fw-error-dump.h"
 #include "iwl-prph.h"
+#include "iwl-csr.h"
 
 static const struct ieee80211_iface_limit iwl_mvm_limits[] = {
        {
index 146554c88c1422083c067c06149c1702c974901f..b2fa3b878f795dab125c465a171d12b3ff359170 100644 (file)
@@ -511,10 +511,15 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
        min_backoff = calc_min_backoff(trans, cfg);
        iwl_mvm_tt_initialize(mvm, min_backoff);
        /* set the nvm_file_name according to priority */
-       if (iwlwifi_mod_params.nvm_file)
+       if (iwlwifi_mod_params.nvm_file) {
                mvm->nvm_file_name = iwlwifi_mod_params.nvm_file;
-       else
-               mvm->nvm_file_name = mvm->cfg->default_nvm_file;
+       } else {
+               if ((trans->cfg->device_family == IWL_DEVICE_FAMILY_8000) &&
+                   (CSR_HW_REV_STEP(trans->hw_rev) == SILICON_A_STEP))
+                       mvm->nvm_file_name = mvm->cfg->default_nvm_file_8000A;
+               else
+                       mvm->nvm_file_name = mvm->cfg->default_nvm_file;
+       }
 
        if (WARN(cfg->no_power_up_nic_in_init && !mvm->nvm_file_name,
                 "not allowing power-up and not having nvm_file\n"))