]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: iwlwifi: split bios_value_u32 to separate the header
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 11 Jan 2026 17:39:22 +0000 (19:39 +0200)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Wed, 21 Jan 2026 12:23:02 +0000 (14:23 +0200)
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
drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h
drivers/net/wireless/intel/iwlwifi/fw/regulatory.c
drivers/net/wireless/intel/iwlwifi/mld/debugfs.c
drivers/net/wireless/intel/iwlwifi/mld/regulatory.c
drivers/net/wireless/intel/iwlwifi/mvm/fw.c

index 4644fc1aa1ec901fde81ef3c4eb196739cf9196f..48f407baed39b8f2e964610ded400df1cf55c32e 100644 (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.
index 00f1c20a5a375f05aae0a40506f407174de7d758..958e71a3c958bdb8dd8a7f78b7bb915cfb5c3c30 100644 (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");
index b9c9cd3f44e40b7e65f4627299f329da24019bdb..5c2a2033b3fdeec68da584f1d4ea89e1c8057f6b 100644 (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));
index 92e6c05355011e63491e7e5178ce7c073f6714c2..7d11036f9e04abcfd76aa51927a679d2486ea15c 100644 (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);
index 018f3396e9555a315099cde301794832cd552160..a34ca8073ca89829bfbe6eb658cddb598ff95003 100644 (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);