]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: iwlwifi: remove dump file name extension support
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>
Tue, 26 Aug 2025 15:54:58 +0000 (18:54 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Thu, 28 Aug 2025 06:56:42 +0000 (09:56 +0300)
The options to configure a dump file name extension was added for 2
cases:
1. if we dump because of a missed beacon, we added the mac id and type
   to the filename.
2. to add the error id of the LMAC/UMAC/TCM/RCM error id to the file
   name.

For 1, there is a bug: in cases in which missed beacon will not trigger
a dump (for example in the default preset), and a missed beacon occurred,
and eventually there is a dump for a different reason,
the dump file name will contain the mac type and id even thought the
dump has nothing to do with a missed beacon.

Anyway, both cases are no longer required. Remove the code.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250826184046.d97f93fd1147.I7d0b056b6f9c38cafc53a0f29e0cf1236e2d2e8c@changeid
drivers/net/wireless/intel/iwlwifi/fw/dbg.c
drivers/net/wireless/intel/iwlwifi/fw/dump.c
drivers/net/wireless/intel/iwlwifi/fw/runtime.h
drivers/net/wireless/intel/iwlwifi/iwl-trans.h
drivers/net/wireless/intel/iwlwifi/mld/link.c
drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c

index 2879be4b8fcb34cad2b9f8c2cf349ba8e3146c3e..09e8c93293e558d3e907a275ed1dc4eb31bbf1f4 100644 (file)
@@ -2478,36 +2478,6 @@ static u32 iwl_dump_ini_info(struct iwl_fw_runtime *fwrt,
        return entry->size;
 }
 
-static u32 iwl_dump_ini_file_name_info(struct iwl_fw_runtime *fwrt,
-                                      struct list_head *list)
-{
-       struct iwl_fw_ini_dump_entry *entry;
-       struct iwl_dump_file_name_info *tlv;
-       u32 len = strnlen(fwrt->trans->dbg.dump_file_name_ext,
-                         IWL_FW_INI_MAX_NAME);
-
-       if (!fwrt->trans->dbg.dump_file_name_ext_valid)
-               return 0;
-
-       entry = vzalloc(sizeof(*entry) + sizeof(*tlv) + len);
-       if (!entry)
-               return 0;
-
-       entry->size = sizeof(*tlv) + len;
-
-       tlv = (void *)entry->data;
-       tlv->type = cpu_to_le32(IWL_INI_DUMP_NAME_TYPE);
-       tlv->len = cpu_to_le32(len);
-       memcpy(tlv->data, fwrt->trans->dbg.dump_file_name_ext, len);
-
-       /* add the dump file name extension tlv to the list */
-       list_add_tail(&entry->list, list);
-
-       fwrt->trans->dbg.dump_file_name_ext_valid = false;
-
-       return entry->size;
-}
-
 static const struct iwl_dump_ini_mem_ops iwl_dump_ini_region_ops[] = {
        [IWL_FW_INI_REGION_INVALID] = {},
        [IWL_FW_INI_REGION_INTERNAL_BUFFER] = {
@@ -2764,7 +2734,6 @@ static u32 iwl_dump_ini_trigger(struct iwl_fw_runtime *fwrt,
                                         &iwl_dump_ini_region_ops[IWL_FW_INI_REGION_DRAM_IMR]);
 
        if (size) {
-               size += iwl_dump_ini_file_name_info(fwrt, list);
                size += iwl_dump_ini_info(fwrt, trigger, list);
        }
 
index f633124979ab364aa6d7cbd02fe481b6cc254541..a39c038db08ee5cf580ea19c67e23e0ed0f621ce 100644 (file)
 #include "iwl-csr.h"
 #include "pnvm.h"
 
-#define FW_ASSERT_LMAC_FATAL                   0x70
-#define FW_ASSERT_LMAC2_FATAL                  0x72
-#define FW_ASSERT_UMAC_FATAL                   0x71
-#define UMAC_RT_NMI_LMAC2_FATAL                        0x72
-#define RT_NMI_INTERRUPT_OTHER_LMAC_FATAL      0x73
-#define FW_ASSERT_NMI_UNKNOWN                  0x84
-
 /*
  * Note: This structure is read from the device with IO accesses,
  * and the reading already does the endian conversion. As it is
@@ -103,17 +96,6 @@ struct iwl_umac_error_event_table {
 #define ERROR_START_OFFSET  (1 * sizeof(u32))
 #define ERROR_ELEM_SIZE     (7 * sizeof(u32))
 
-static bool iwl_fwrt_if_errorid_other_cpu(u32 err_id)
-{
-       err_id &= 0xFF;
-
-       if ((err_id >= FW_ASSERT_LMAC_FATAL &&
-            err_id <= RT_NMI_INTERRUPT_OTHER_LMAC_FATAL) ||
-           err_id == FW_ASSERT_NMI_UNKNOWN)
-               return  true;
-       return false;
-}
-
 static void iwl_fwrt_dump_umac_error_log(struct iwl_fw_runtime *fwrt)
 {
        struct iwl_trans *trans = fwrt->trans;
@@ -131,13 +113,6 @@ static void iwl_fwrt_dump_umac_error_log(struct iwl_fw_runtime *fwrt)
        if (table.valid)
                fwrt->dump.umac_err_id = table.error_id;
 
-       if (!iwl_fwrt_if_errorid_other_cpu(fwrt->dump.umac_err_id) &&
-           !fwrt->trans->dbg.dump_file_name_ext_valid) {
-               fwrt->trans->dbg.dump_file_name_ext_valid = true;
-               snprintf(fwrt->trans->dbg.dump_file_name_ext, IWL_FW_INI_MAX_NAME,
-                        "0x%x", fwrt->dump.umac_err_id);
-       }
-
        if (ERROR_START_OFFSET <= table.valid * ERROR_ELEM_SIZE) {
                IWL_ERR(trans, "Start IWL Error Log Dump:\n");
                IWL_ERR(trans, "Transport status: 0x%08lX, valid: %d\n",
@@ -213,13 +188,6 @@ static void iwl_fwrt_dump_lmac_error_log(struct iwl_fw_runtime *fwrt, u8 lmac_nu
        if (table.valid)
                fwrt->dump.lmac_err_id[lmac_num] = table.error_id;
 
-       if (!iwl_fwrt_if_errorid_other_cpu(fwrt->dump.lmac_err_id[lmac_num]) &&
-           !fwrt->trans->dbg.dump_file_name_ext_valid) {
-               fwrt->trans->dbg.dump_file_name_ext_valid = true;
-               snprintf(fwrt->trans->dbg.dump_file_name_ext, IWL_FW_INI_MAX_NAME,
-                        "0x%x", fwrt->dump.lmac_err_id[lmac_num]);
-       }
-
        if (ERROR_START_OFFSET <= table.valid * ERROR_ELEM_SIZE) {
                IWL_ERR(trans, "Start IWL Error Log Dump:\n");
                IWL_ERR(trans, "Transport status: 0x%08lX, valid: %d\n",
@@ -305,16 +273,6 @@ static void iwl_fwrt_dump_tcm_error_log(struct iwl_fw_runtime *fwrt, int idx)
 
        iwl_trans_read_mem_bytes(trans, base, &table, sizeof(table));
 
-       if (table.valid)
-               fwrt->dump.tcm_err_id[idx] = table.error_id;
-
-       if (!iwl_fwrt_if_errorid_other_cpu(fwrt->dump.tcm_err_id[idx]) &&
-           !fwrt->trans->dbg.dump_file_name_ext_valid) {
-               fwrt->trans->dbg.dump_file_name_ext_valid = true;
-               snprintf(fwrt->trans->dbg.dump_file_name_ext, IWL_FW_INI_MAX_NAME,
-                        "0x%x", fwrt->dump.tcm_err_id[idx]);
-       }
-
        IWL_ERR(fwrt, "TCM%d status:\n", idx + 1);
        IWL_ERR(fwrt, "0x%08X | error ID\n", table.error_id);
        IWL_ERR(fwrt, "0x%08X | tcm branchlink2\n", table.blink2);
@@ -378,16 +336,6 @@ static void iwl_fwrt_dump_rcm_error_log(struct iwl_fw_runtime *fwrt, int idx)
 
        iwl_trans_read_mem_bytes(trans, base, &table, sizeof(table));
 
-       if (table.valid)
-               fwrt->dump.rcm_err_id[idx] = table.error_id;
-
-       if (!iwl_fwrt_if_errorid_other_cpu(fwrt->dump.rcm_err_id[idx]) &&
-           !fwrt->trans->dbg.dump_file_name_ext_valid) {
-               fwrt->trans->dbg.dump_file_name_ext_valid = true;
-               snprintf(fwrt->trans->dbg.dump_file_name_ext, IWL_FW_INI_MAX_NAME,
-                        "0x%x", fwrt->dump.rcm_err_id[idx]);
-       }
-
        IWL_ERR(fwrt, "RCM%d status:\n", idx + 1);
        IWL_ERR(fwrt, "0x%08X | error ID\n", table.error_id);
        IWL_ERR(fwrt, "0x%08X | rcm branchlink2\n", table.blink2);
index 0444a736c2b2060db3002496b942bcc520137d7b..9b116fa1d5d1e3d508de18d3dc0aed8560270d2b 100644 (file)
@@ -146,8 +146,6 @@ struct iwl_fw_runtime {
                unsigned long non_collect_ts_start[IWL_FW_INI_TIME_POINT_NUM];
                u32 *d3_debug_data;
                u32 lmac_err_id[MAX_NUM_LMAC];
-               u32 tcm_err_id[MAX_NUM_TCM];
-               u32 rcm_err_id[MAX_NUM_RCM];
                u32 umac_err_id;
 
                struct iwl_txf_iter_data txf_iter_data;
index d0e658801c2e01c9442d4b8133c7d7bfef030970..52f4a09c740f5eb45834ec901b61b654a81a04af 100644 (file)
@@ -658,8 +658,6 @@ struct iwl_pc_data {
  * @restart_required: indicates debug restart is required
  * @last_tp_resetfw: last handling of reset during debug timepoint
  * @imr_data: IMR debug data allocation
- * @dump_file_name_ext: dump file name extension
- * @dump_file_name_ext_valid: dump file name extension if valid or not
  * @num_pc: number of program counter for cpu
  * @pc_data: details of the program counter
  * @yoyo_bin_loaded: tells if a yoyo debug file has been loaded
@@ -698,8 +696,6 @@ struct iwl_trans_debug {
        bool restart_required;
        u32 last_tp_resetfw;
        struct iwl_imr_data imr_data;
-       u8 dump_file_name_ext[IWL_FW_INI_MAX_NAME];
-       bool dump_file_name_ext_valid;
        u32 num_pc;
        struct iwl_pc_data *pc_data;
        bool yoyo_bin_loaded;
index 6135da34a9c1acd1b66893d9c2584534f04b7265..738f80fe0c50a4231915224177cd8e983e45ac5c 100644 (file)
@@ -551,11 +551,6 @@ void iwl_mld_handle_missed_beacon_notif(struct iwl_mld *mld,
        if (WARN_ON(!vif))
                return;
 
-       mld->trans->dbg.dump_file_name_ext_valid = true;
-       snprintf(mld->trans->dbg.dump_file_name_ext, IWL_FW_INI_MAX_NAME,
-                "LinkId_%d_MacType_%d", fw_link_id,
-                iwl_mld_mac80211_iftype_to_fw(vif));
-
        iwl_dbg_tlv_time_point(&mld->fwrt,
                               IWL_FW_INI_TIME_POINT_MISSED_BEACONS, &tp_data);
 
index 7d84ac26949c2085994d6012485723724bf6fdfe..9c9e0e1c6e1d4c5a54bc3e0430124b63969559ce 100644 (file)
@@ -1619,10 +1619,6 @@ iwl_mvm_handle_missed_beacons_notif(struct iwl_mvm *mvm,
 
        IWL_DEBUG_INFO(mvm, "missed beacon mac_type=%u,\n", mac_type);
 
-       mvm->trans->dbg.dump_file_name_ext_valid = true;
-       snprintf(mvm->trans->dbg.dump_file_name_ext, IWL_FW_INI_MAX_NAME,
-                "MacId_%d_MacType_%d", id, mac_type);
-
        rx_missed_bcon = le32_to_cpu(mb->consec_missed_beacons);
        rx_missed_bcon_since_rx =
                le32_to_cpu(mb->consec_missed_beacons_since_last_rx);