diff options
author | Luca Coelho <luciano.coelho@intel.com> | 2018-08-02 15:16:27 +0200 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2019-09-06 14:35:43 +0200 |
commit | 91eff3f8200599afc9b98b8e47cdfed824c84b00 (patch) | |
tree | 4199fc2642b187e44b94a221129e0adac0448d4e /drivers/net/wireless/intel/iwlwifi | |
parent | iwlwifi: separate elements from cfg that are needed by trans_alloc (diff) | |
download | linux-91eff3f8200599afc9b98b8e47cdfed824c84b00.tar.xz linux-91eff3f8200599afc9b98b8e47cdfed824c84b00.zip |
iwlwifi: pcie: use the cfg we passed to iwl_trans_pcie_alloc()
Instead of using iwl_trans->cfg in iwl_trans_pcie_alloc(), use the
local argument that we received. This will allow us to not to set the
cfg during iwl_trans_alloc() so it can be decided later.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c index db75a79aa8a4..a1164a0a384f 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c @@ -3481,7 +3481,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, * "dash" value). To keep hw_rev backwards compatible - we'll store it * in the old format. */ - if (trans->cfg->trans.device_family >= IWL_DEVICE_FAMILY_8000) { + if (cfg->trans.device_family >= IWL_DEVICE_FAMILY_8000) { unsigned long flags; trans->hw_rev = (trans->hw_rev & 0xfff0) | @@ -3497,7 +3497,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, * in-order to recognize C step driver should read chip version * id located at the AUX bus MISC address space. */ - ret = iwl_finish_nic_init(trans, &trans->cfg->trans); + ret = iwl_finish_nic_init(trans, &cfg->trans); if (ret) goto out_no_pci; @@ -3524,7 +3524,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, #if IS_ENABLED(CONFIG_IWLMVM) trans->hw_rf_id = iwl_read32(trans, CSR_HW_RF_ID); - if (trans->cfg == &iwlax210_2ax_cfg_so_hr_a0) { + if (cfg == &iwlax210_2ax_cfg_so_hr_a0) { if (trans->hw_rev == CSR_HW_REV_TYPE_TY) { trans->cfg = &iwlax210_2ax_cfg_ty_gf_a0; } else if (CSR_HW_RF_ID_TYPE_CHIP_ID(trans->hw_rf_id) == |