diff options
author | Luca Coelho <luciano.coelho@intel.com> | 2018-08-02 14:57:55 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2019-09-06 15:34:25 +0300 |
commit | 79b6c8feb63589196cd4c557c91bfafd2da47f4e (patch) | |
tree | 971c175c86c58e7704db937045df08cab5fb3615 /drivers/net/wireless/intel/iwlwifi/pcie/drv.c | |
parent | cd6de838e179287cbbfb7b655701183f2d32936e (diff) | |
download | linux-79b6c8feb63589196cd4c557c91bfafd2da47f4e.tar.xz |
iwlwifi: separate elements from cfg that are needed by trans_alloc
In order to be able to select the cfg depending on the HW revision or
on the RF ID, we need to set up the trans before selecting the cfg.
To do so, move the elements from cfg that are needed by
iwl_trans_alloc() to a separate struct at the top of the cfg, so it
can be used by other cfg types as well, before selecting the rest of
the configuration.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/pcie/drv.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index c02cb976cafe..08990694dd0e 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c @@ -995,7 +995,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) struct iwl_trans *iwl_trans; int ret; - if (WARN_ONCE(!cfg->csr, "CSR addresses aren't configured\n")) + if (WARN_ONCE(!cfg->trans.csr, "CSR addresses aren't configured\n")) return -EINVAL; iwl_trans = iwl_trans_pcie_alloc(pdev, ent, cfg); @@ -1022,7 +1022,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) iwl_trans->cfg = cfg_7265d; } - if (iwl_trans->cfg->rf_id && cfg == &iwl22000_2ac_cfg_hr_cdb && + if (iwl_trans->cfg->trans.rf_id && cfg == &iwl22000_2ac_cfg_hr_cdb && iwl_trans->hw_rev != CSR_HW_REV_TYPE_HR_CDB) { u32 rf_id_chp = CSR_HW_RF_ID_TYPE_CHIP_ID(iwl_trans->hw_rf_id); u32 jf_chp_id = CSR_HW_RF_ID_TYPE_CHIP_ID(CSR_HW_RF_ID_TYPE_JF); |