diff options
| author | Miri Korenblit <miriam.rachel.korenblit@intel.com> | 2024-01-31 10:24:46 +0200 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2024-02-02 14:15:15 +0100 |
| commit | 3bc67e7c18cd69e88b801336cfe2a4dc7b4981a4 (patch) | |
| tree | 0b91e0b6485f9c6afa415206264aa6730f70827c /drivers/net/wireless/intel/iwlwifi/fw/regulatory.c | |
| parent | ad5a85d8fdd346ecc34217e3bd713bf0b519912d (diff) | |
wifi: iwlwifi: separate TAS 'read-from-BIOS' and 'send-to-FW' flows
Currently the TAS 'read-from-BIOS' flow receives the command struct
and the version of it as read from FW TLVs, and fills the command
accordingly.
This seems wrong, we should have the 'read-from-BIOS' flow
(iwl_acpi_get_tas in iwlwifi) reading/parsing/validating the table from
BIOS, and the 'send-to-FW' flow (iwl_mvm_tas_init) doing
all the FW versioning checks and cmd filling.
Move the cmd filling to the 'send-to-fw' flow.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://msgid.link/20240131091413.24df27772a71.I57b702af4feb3f38dc21d52593c25de4b1999e4b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/fw/regulatory.c')
| -rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/regulatory.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/regulatory.c b/drivers/net/wireless/intel/iwlwifi/fw/regulatory.c index 570d8e74f839..20154b0fb7e6 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/regulatory.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/regulatory.c @@ -3,7 +3,6 @@ * Copyright (C) 2023 Intel Corporation */ #include <linux/dmi.h> -#include "fw/api/nvm-reg.h" #include "iwl-drv.h" #include "iwl-debug.h" #include "regulatory.h" @@ -400,11 +399,11 @@ bool iwl_is_tas_approved(void) IWL_EXPORT_SYMBOL(iwl_is_tas_approved); int iwl_parse_tas_selection(struct iwl_fw_runtime *fwrt, - union iwl_tas_config_cmd *cmd, int fw_ver, + struct iwl_tas_data *tas_data, const u32 tas_selection) { u8 override_iec = u32_get_bits(tas_selection, - IWL_WTAS_OVERRIDE_IEC_MSK); + IWL_WTAS_OVERRIDE_IEC_MSK); u8 enabled_iec = u32_get_bits(tas_selection, IWL_WTAS_ENABLE_IEC_MSK); u8 usa_tas_uhb = u32_get_bits(tas_selection, IWL_WTAS_USA_UHB_MSK); int enabled = tas_selection & IWL_WTAS_ENABLED_MSK; @@ -412,17 +411,9 @@ int iwl_parse_tas_selection(struct iwl_fw_runtime *fwrt, IWL_DEBUG_RADIO(fwrt, "TAS selection as read from BIOS: 0x%x\n", tas_selection); - if (fw_ver < 3) - return enabled; - - if (fw_ver == 3) { - cmd->v3.override_tas_iec = cpu_to_le16(override_iec); - cmd->v3.enable_tas_iec = cpu_to_le16(enabled_iec); - } else { - cmd->v4.usa_tas_uhb_allowed = usa_tas_uhb; - cmd->v4.override_tas_iec = override_iec; - cmd->v4.enable_tas_iec = enabled_iec; - } + tas_data->usa_tas_uhb_allowed = usa_tas_uhb; + tas_data->override_tas_iec = override_iec; + tas_data->enable_tas_iec = enabled_iec; return enabled; } |