Skip to content

Commit 91eff3f

Browse files
committed
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>
1 parent 79b6c8f commit 91eff3f

File tree

1 file changed

+3
-3
lines changed
  • drivers/net/wireless/intel/iwlwifi/pcie

1 file changed

+3
-3
lines changed

drivers/net/wireless/intel/iwlwifi/pcie/trans.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3481,7 +3481,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
34813481
* "dash" value). To keep hw_rev backwards compatible - we'll store it
34823482
* in the old format.
34833483
*/
3484-
if (trans->cfg->trans.device_family >= IWL_DEVICE_FAMILY_8000) {
3484+
if (cfg->trans.device_family >= IWL_DEVICE_FAMILY_8000) {
34853485
unsigned long flags;
34863486

34873487
trans->hw_rev = (trans->hw_rev & 0xfff0) |
@@ -3497,7 +3497,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
34973497
* in-order to recognize C step driver should read chip version
34983498
* id located at the AUX bus MISC address space.
34993499
*/
3500-
ret = iwl_finish_nic_init(trans, &trans->cfg->trans);
3500+
ret = iwl_finish_nic_init(trans, &cfg->trans);
35013501
if (ret)
35023502
goto out_no_pci;
35033503

@@ -3524,7 +3524,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
35243524
#if IS_ENABLED(CONFIG_IWLMVM)
35253525
trans->hw_rf_id = iwl_read32(trans, CSR_HW_RF_ID);
35263526

3527-
if (trans->cfg == &iwlax210_2ax_cfg_so_hr_a0) {
3527+
if (cfg == &iwlax210_2ax_cfg_so_hr_a0) {
35283528
if (trans->hw_rev == CSR_HW_REV_TYPE_TY) {
35293529
trans->cfg = &iwlax210_2ax_cfg_ty_gf_a0;
35303530
} else if (CSR_HW_RF_ID_TYPE_CHIP_ID(trans->hw_rf_id) ==

0 commit comments

Comments
 (0)