diff options
| author | Shahar S Matityahu <[email protected]> | 2019-07-23 09:50:25 +0000 |
|---|---|---|
| committer | Luca Coelho <[email protected]> | 2019-10-25 07:09:34 +0000 |
| commit | 677d25b237b307898a76bc0acd7cf854d39f02f2 (patch) | |
| tree | c2df37eb200bbf48a896b04d284389b9cce088a1 /drivers/net/wireless/intel/iwlwifi/fw/dbg.c | |
| parent | iwlwifi: dbg_ini: add error tables dumping support (diff) | |
| download | kernel-677d25b237b307898a76bc0acd7cf854d39f02f2.tar.gz kernel-677d25b237b307898a76bc0acd7cf854d39f02f2.zip | |
iwlwifi: dbg_ini: use new API in dump info
Make dump info region use new API.
debug_info_tlv_list list will be initialize in a future patch once the
driver will start using it.
Signed-off-by: Shahar S Matityahu <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/fw/dbg.c')
| -rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c index a2761f5881b9..aed7f9d9ebec 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c @@ -1864,7 +1864,15 @@ static u32 iwl_dump_ini_info(struct iwl_fw_runtime *fwrt, struct iwl_fw_ini_dump_entry *entry; struct iwl_fw_error_dump_data *tlv; struct iwl_fw_ini_dump_info *dump; + struct iwl_dbg_tlv_node *node; + struct iwl_fw_ini_dump_cfg_name *cfg_name; u32 size = sizeof(*tlv) + sizeof(*dump); + u32 num_of_cfg_names = 0; + + list_for_each_entry(node, &fwrt->trans->dbg.debug_info_tlv_list, list) { + size += sizeof(*cfg_name); + num_of_cfg_names++; + } entry = kmalloc(sizeof(*entry) + size, GFP_KERNEL); if (!entry) @@ -1901,10 +1909,27 @@ static u32 iwl_dump_ini_info(struct iwl_fw_runtime *fwrt, dump->umac_major = cpu_to_le32(fwrt->dump.fw_ver.umac_major); dump->umac_minor = cpu_to_le32(fwrt->dump.fw_ver.umac_minor); + dump->fw_mon_mode = cpu_to_le32(fwrt->trans->dbg.ini_dest); + dump->regions_mask = trigger->regions_mask; + dump->build_tag_len = cpu_to_le32(sizeof(dump->build_tag)); memcpy(dump->build_tag, fwrt->fw->human_readable, sizeof(dump->build_tag)); + cfg_name = dump->cfg_names; + dump->num_of_cfg_names = cpu_to_le32(num_of_cfg_names); + list_for_each_entry(node, &fwrt->trans->dbg.debug_info_tlv_list, list) { + struct iwl_fw_ini_debug_info_tlv *debug_info = + (void *)node->tlv.data; + + cfg_name->image_type = debug_info->image_type; + cfg_name->cfg_name_len = + cpu_to_le32(IWL_FW_INI_MAX_CFG_NAME); + memcpy(cfg_name->cfg_name, debug_info->debug_cfg_name, + sizeof(cfg_name->cfg_name)); + cfg_name++; + } + /* add dump info TLV to the beginning of the list since it needs to be * the first TLV in the dump */ |
