wifi: iwlwifi: split bios_value_u32 to separate the header

This header will be reused in other firmware API structures

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260111193638.2f191a5f33fe.I7797134967b980bbda9ba29daa360e50a2196d7d@changeid
This commit is contained in:
Emmanuel Grumbach 2026-01-11 19:39:22 +02:00 committed by Miri Korenblit
parent 4172db83b0
commit 1e00423de0
5 changed files with 26 additions and 15 deletions

View File

@ -503,18 +503,26 @@ enum bios_source {
};
/**
* struct bios_value_u32 - BIOS configuration.
* struct iwl_bios_config_hdr - BIOS configuration header
* @table_source: see &enum bios_source
* @table_revision: table revision.
* @reserved: reserved
* @value: value in bios.
*/
struct bios_value_u32 {
struct iwl_bios_config_hdr {
u8 table_source;
u8 table_revision;
u8 reserved[2];
} __packed; /* BIOS_CONFIG_HDR_API_S_VER_1 */
/**
* struct bios_value_u32 - BIOS configuration.
* @hdr: bios config header
* @value: value in bios.
*/
struct bios_value_u32 {
struct iwl_bios_config_hdr hdr;
__le32 value;
} __packed; /* BIOS_TABLE_SOURCE_U32_S_VER_1 */
} __packed; /* BIOS_CONFIG_DATA_U32_API_S_VER_1 */
/**
* struct iwl_tas_config_cmd - configures the TAS.

View File

@ -376,8 +376,10 @@ int iwl_fill_ppag_table(struct iwl_fw_runtime *fwrt,
num_sub_bands = IWL_NUM_SUB_BANDS_V2;
gain = cmd->v7.gain[0];
*cmd_size = sizeof(cmd->v7);
cmd->v7.ppag_config_info.table_source = fwrt->ppag_bios_source;
cmd->v7.ppag_config_info.table_revision = fwrt->ppag_bios_rev;
cmd->v7.ppag_config_info.hdr.table_source =
fwrt->ppag_bios_source;
cmd->v7.ppag_config_info.hdr.table_revision =
fwrt->ppag_bios_rev;
cmd->v7.ppag_config_info.value = cpu_to_le32(fwrt->ppag_flags);
} else {
IWL_DEBUG_RADIO(fwrt, "Unsupported PPAG command version\n");

View File

@ -244,7 +244,7 @@ static size_t iwl_mld_dump_tas_resp(struct iwl_dhc_tas_status_resp *resp,
}
pos += scnprintf(buf + pos, count - pos, "TAS Report\n");
switch (resp->tas_config_info.table_source) {
switch (resp->tas_config_info.hdr.table_source) {
case BIOS_SOURCE_NONE:
pos += scnprintf(buf + pos, count - pos,
"BIOS SOURCE NONE ");
@ -260,13 +260,13 @@ static size_t iwl_mld_dump_tas_resp(struct iwl_dhc_tas_status_resp *resp,
default:
pos += scnprintf(buf + pos, count - pos,
"BIOS SOURCE UNKNOWN (%d) ",
resp->tas_config_info.table_source);
resp->tas_config_info.hdr.table_source);
break;
}
pos += scnprintf(buf + pos, count - pos,
"revision is: %d data is: 0x%08x\n",
resp->tas_config_info.table_revision,
resp->tas_config_info.hdr.table_revision,
resp->tas_config_info.value);
pos += scnprintf(buf + pos, count - pos, "Current MCC: 0x%x\n",
le16_to_cpu(resp->curr_mcc));

View File

@ -165,8 +165,8 @@ static int iwl_mld_ppag_send_cmd(struct iwl_mld *mld)
{
struct iwl_fw_runtime *fwrt = &mld->fwrt;
union iwl_ppag_table_cmd cmd = {
.v7.ppag_config_info.table_source = fwrt->ppag_bios_source,
.v7.ppag_config_info.table_revision = fwrt->ppag_bios_rev,
.v7.ppag_config_info.hdr.table_source = fwrt->ppag_bios_source,
.v7.ppag_config_info.hdr.table_revision = fwrt->ppag_bios_rev,
.v7.ppag_config_info.value = cpu_to_le32(fwrt->ppag_flags),
};
int ret;
@ -389,8 +389,8 @@ void iwl_mld_init_tas(struct iwl_mld *mld)
for (u8 i = 0; i < data.block_list_size; i++)
cmd.block_list_array[i] =
cpu_to_le16(data.block_list_array[i]);
cmd.tas_config_info.table_source = data.table_source;
cmd.tas_config_info.table_revision = data.table_revision;
cmd.tas_config_info.hdr.table_source = data.table_source;
cmd.tas_config_info.hdr.table_revision = data.table_revision;
cmd.tas_config_info.value = cpu_to_le32(data.tas_selection);
ret = iwl_mld_send_cmd_pdu(mld, cmd_id, &cmd);

View File

@ -1135,8 +1135,9 @@ static void iwl_mvm_tas_init(struct iwl_mvm *mvm)
for (u16 i = 0; i < data.block_list_size; i++)
cmd_v5.block_list_array[i] =
cpu_to_le16(data.block_list_array[i]);
cmd_v5.tas_config_info.table_source = data.table_source;
cmd_v5.tas_config_info.table_revision = data.table_revision;
cmd_v5.tas_config_info.hdr.table_source = data.table_source;
cmd_v5.tas_config_info.hdr.table_revision =
data.table_revision;
cmd_v5.tas_config_info.value = cpu_to_le32(data.tas_selection);
} else if (fw_ver == 4) {
cmd_size = sizeof(cmd_v2_v4.common) + sizeof(cmd_v2_v4.v4);