diff options
author | Luca Coelho <luciano.coelho@intel.com> | 2019-11-04 13:31:22 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2020-03-27 09:12:48 +0300 |
commit | 7897dfa2bc8fdfd47e95f94375e7af88d465d71a (patch) | |
tree | c388f98e9ed5d83aaf60c65956c0c64635d5c1de /drivers/net/wireless/intel/iwlwifi/mvm | |
parent | 85ea9833995aaee2fd0b1753b9f45e998999bf35 (diff) | |
download | linux-7897dfa2bc8fdfd47e95f94375e7af88d465d71a.tar.xz |
iwlwifi: move integrated, extra_phy and soc_latency to trans_cfg
These values are selected based on the PCI device ID, so the decision
to use them can be made early. By moving them to the trans_cfg, we
avoid duplicating the large cfg structs for small pieces of
data (sometimes a single boolean). This will also allow us to make
more decisions based on, for instance, the SoC type in used.
The trans_cfg concept changes a bit, because previously it was used
only to boot the device before reading further characteristics and now
it also contains more data that is associated with the device ID.
Change-Id: Ib71b07ea9e322eb74571dc5e8aa58f17eece5c9c
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index 1b3a2f52e13f..98978a475d93 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -93,10 +93,10 @@ static int iwl_set_soc_latency(struct iwl_mvm *mvm) struct iwl_soc_configuration_cmd cmd; int ret; - cmd.device_type = (mvm->trans->cfg->integrated) ? + cmd.device_type = (mvm->trans->trans_cfg->integrated) ? cpu_to_le32(SOC_CONFIG_CMD_INTEGRATED) : cpu_to_le32(SOC_CONFIG_CMD_DISCRETE); - cmd.soc_latency = cpu_to_le32(mvm->trans->cfg->soc_latency); + cmd.soc_latency = cpu_to_le32(mvm->trans->trans_cfg->xtal_latency); ret = iwl_mvm_send_cmd_pdu(mvm, iwl_cmd_id(SOC_CONFIGURATION_CMD, SYSTEM_GROUP, 0), 0, @@ -561,7 +561,8 @@ static int iwl_send_phy_cfg_cmd(struct iwl_mvm *mvm) phy_cfg_cmd.phy_cfg = cpu_to_le32(iwl_mvm_get_phy_config(mvm)); /* set flags extra PHY configuration flags from the device's cfg */ - phy_cfg_cmd.phy_cfg |= cpu_to_le32(mvm->cfg->extra_phy_cfg_flags); + phy_cfg_cmd.phy_cfg |= + cpu_to_le32(mvm->trans->trans_cfg->extra_phy_cfg_flags); phy_cfg_cmd.calib_control.event_trigger = mvm->fw->default_calib[ucode_type].event_trigger; |