From 7897dfa2bc8fdfd47e95f94375e7af88d465d71a Mon Sep 17 00:00:00 2001 From: Luca Coelho Date: Mon, 4 Nov 2019 12:31:22 +0200 Subject: 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 --- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/net/wireless/intel/iwlwifi/mvm') 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; -- cgit v1.2.1