mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-02 17:26:42 +09:00
iwlwifi: dbg_ini: add version to dump header
Add version to dump header to allow future changes of the dump struct, once the ini debug flow becomes operational, without breaking backwards compatibility. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
committed by
Luca Coelho
parent
9802162f98
commit
990ffe3e81
@@ -1380,6 +1380,8 @@ static void *iwl_dump_ini_mem_fill_header(struct iwl_fw_runtime *fwrt,
|
||||
{
|
||||
struct iwl_fw_ini_error_dump *dump = data;
|
||||
|
||||
dump->header.version = cpu_to_le32(IWL_INI_DUMP_MEM_VER);
|
||||
|
||||
return dump->ranges;
|
||||
}
|
||||
|
||||
@@ -1402,6 +1404,7 @@ static void
|
||||
MON_BUFF_CYCLE_CNT_VER2);
|
||||
iwl_trans_release_nic_access(fwrt->trans, &flags);
|
||||
|
||||
mon_dump->header.version = cpu_to_le32(IWL_INI_DUMP_MONITOR_VER);
|
||||
mon_dump->write_ptr = cpu_to_le32(write_ptr);
|
||||
mon_dump->cycle_cnt = cpu_to_le32(cycle_cnt);
|
||||
|
||||
@@ -1414,6 +1417,8 @@ static void *iwl_dump_ini_fifo_fill_header(struct iwl_fw_runtime *fwrt,
|
||||
{
|
||||
struct iwl_fw_ini_fifo_error_dump *dump = data;
|
||||
|
||||
dump->header.version = cpu_to_le32(IWL_INI_DUMP_FIFO_VER);
|
||||
|
||||
return dump->ranges;
|
||||
}
|
||||
|
||||
|
||||
@@ -278,6 +278,10 @@ struct iwl_fw_error_dump_mem {
|
||||
u8 data[];
|
||||
};
|
||||
|
||||
#define IWL_INI_DUMP_MEM_VER 1
|
||||
#define IWL_INI_DUMP_MONITOR_VER 1
|
||||
#define IWL_INI_DUMP_FIFO_VER 1
|
||||
|
||||
/**
|
||||
* struct iwl_fw_ini_error_dump_range - range of memory
|
||||
* @start_addr: the start address of this range
|
||||
@@ -292,11 +296,13 @@ struct iwl_fw_ini_error_dump_range {
|
||||
|
||||
/**
|
||||
* struct iwl_fw_ini_error_dump_header - ini region dump header
|
||||
* @version: dump version
|
||||
* @num_of_ranges: number of ranges in this region
|
||||
* @name_len: number of bytes allocated to the name string of this region
|
||||
* @name: name of the region
|
||||
*/
|
||||
struct iwl_fw_ini_error_dump_header {
|
||||
__le32 version;
|
||||
__le32 num_of_ranges;
|
||||
__le32 name_len;
|
||||
u8 name[IWL_FW_INI_MAX_NAME];
|
||||
|
||||
Reference in New Issue
Block a user