wifi: iwlwifi: small cleanups in PPAG table flows
1. The name of iwl_read_ppag_table is misleading, as this function only fills the command structure from the previously read table. Rename it. 2. Don't initialize fwrt::ppag_flags to 0 as the entire fwrt is zeroed in the INIT stage anyway. 3. Don't filter out the reserved bits from fwrt::ppag_flags when printing it, as it is already done in 'read-from-bios' flow. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://msgid.link/20240131091413.48acf340e817.I810e457b80015c1931d96d3e13c849f0339723c3@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
committed by
Johannes Berg
parent
427661e4c4
commit
be3a8cbb1c
@@ -956,7 +956,6 @@ int iwl_acpi_get_ppag_table(struct iwl_fw_runtime *fwrt)
|
||||
int idx = 2;
|
||||
u8 cmd_ver;
|
||||
|
||||
fwrt->ppag_flags = 0;
|
||||
fwrt->ppag_table_valid = false;
|
||||
|
||||
data = iwl_acpi_get_object(fwrt->dev, ACPI_PPAG_METHOD);
|
||||
@@ -1057,7 +1056,8 @@ out_free:
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_acpi_get_ppag_table);
|
||||
|
||||
int iwl_read_ppag_table(struct iwl_fw_runtime *fwrt, union iwl_ppag_table_cmd *cmd,
|
||||
int iwl_fill_ppag_table(struct iwl_fw_runtime *fwrt,
|
||||
union iwl_ppag_table_cmd *cmd,
|
||||
int *cmd_size)
|
||||
{
|
||||
u8 cmd_ver;
|
||||
@@ -1117,7 +1117,7 @@ int iwl_read_ppag_table(struct iwl_fw_runtime *fwrt, union iwl_ppag_table_cmd *c
|
||||
/* ppag mode */
|
||||
IWL_DEBUG_RADIO(fwrt,
|
||||
"PPAG MODE bits were read from bios: %d\n",
|
||||
cmd->v1.flags & cpu_to_le32(ACPI_PPAG_MASK));
|
||||
cmd->v1.flags);
|
||||
if ((cmd_ver == 1 && !fw_has_capa(&fwrt->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_CAPA_PPAG_CHINA_BIOS_SUPPORT)) ||
|
||||
(cmd_ver == 2 && fwrt->ppag_ver == 2)) {
|
||||
@@ -1129,7 +1129,7 @@ int iwl_read_ppag_table(struct iwl_fw_runtime *fwrt, union iwl_ppag_table_cmd *c
|
||||
|
||||
IWL_DEBUG_RADIO(fwrt,
|
||||
"PPAG MODE bits going to be sent: %d\n",
|
||||
cmd->v1.flags & cpu_to_le32(ACPI_PPAG_MASK));
|
||||
cmd->v1.flags);
|
||||
|
||||
for (i = 0; i < IWL_NUM_CHAIN_LIMITS; i++) {
|
||||
for (j = 0; j < num_sub_bands; j++) {
|
||||
@@ -1143,7 +1143,7 @@ int iwl_read_ppag_table(struct iwl_fw_runtime *fwrt, union iwl_ppag_table_cmd *c
|
||||
|
||||
return 0;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_read_ppag_table);
|
||||
IWL_EXPORT_SYMBOL(iwl_fill_ppag_table);
|
||||
|
||||
bool iwl_acpi_is_ppag_approved(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
|
||||
@@ -207,7 +207,8 @@ __le32 iwl_acpi_get_lari_config_bitmap(struct iwl_fw_runtime *fwrt);
|
||||
|
||||
int iwl_acpi_get_ppag_table(struct iwl_fw_runtime *fwrt);
|
||||
|
||||
int iwl_read_ppag_table(struct iwl_fw_runtime *fwrt, union iwl_ppag_table_cmd *cmd,
|
||||
int iwl_fill_ppag_table(struct iwl_fw_runtime *fwrt,
|
||||
union iwl_ppag_table_cmd *cmd,
|
||||
int *cmd_size);
|
||||
|
||||
bool iwl_acpi_is_ppag_approved(struct iwl_fw_runtime *fwrt);
|
||||
@@ -283,8 +284,9 @@ static inline int iwl_acpi_get_ppag_table(struct iwl_fw_runtime *fwrt)
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
static inline int iwl_read_ppag_table(struct iwl_fw_runtime *fwrt,
|
||||
union iwl_ppag_table_cmd *cmd, int *cmd_size)
|
||||
static inline int iwl_fill_ppag_table(struct iwl_fw_runtime *fwrt,
|
||||
union iwl_ppag_table_cmd *cmd,
|
||||
int *cmd_size)
|
||||
{
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
@@ -1085,7 +1085,7 @@ int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm)
|
||||
union iwl_ppag_table_cmd cmd;
|
||||
int ret, cmd_size;
|
||||
|
||||
ret = iwl_read_ppag_table(&mvm->fwrt, &cmd, &cmd_size);
|
||||
ret = iwl_fill_ppag_table(&mvm->fwrt, &cmd, &cmd_size);
|
||||
/* Not supporting PPAG table is a valid scenario */
|
||||
if (ret < 0)
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user