]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: iwlwifi: fix debug actions order
authorJohannes Berg <johannes.berg@intel.com>
Sat, 8 Mar 2025 21:19:18 +0000 (23:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:42:00 +0000 (14:42 +0200)
[ Upstream commit eb29b4ffafb20281624dcd2cbb768d6f30edf600 ]

The order of actions taken for debug was implemented incorrectly.
Now we implemented the dump split and do the FW reset only in the
middle of the dump (rather than the FW killing itself on error.)
As a result, some of the actions taken when applying the config
will now crash the device, so we need to fix the order.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250308231427.6de7fa8e63ed.I40632c48e2a67a8aca05def572a934b88ce7934b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c

index a97ed7cbe4d1404facc7430db519e5e702dff6ff..d588e4cd808d8e52f35aacccbfce518804a4ba60 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
 /*
- * Copyright (C) 2018-2024 Intel Corporation
+ * Copyright (C) 2018-2025 Intel Corporation
  */
 #include <linux/firmware.h>
 #include "iwl-drv.h"
@@ -1382,15 +1382,15 @@ void _iwl_dbg_tlv_time_point(struct iwl_fw_runtime *fwrt,
        switch (tp_id) {
        case IWL_FW_INI_TIME_POINT_EARLY:
                iwl_dbg_tlv_init_cfg(fwrt);
-               iwl_dbg_tlv_apply_config(fwrt, conf_list);
                iwl_dbg_tlv_update_drams(fwrt);
                iwl_dbg_tlv_tp_trigger(fwrt, sync, trig_list, tp_data, NULL);
+               iwl_dbg_tlv_apply_config(fwrt, conf_list);
                break;
        case IWL_FW_INI_TIME_POINT_AFTER_ALIVE:
                iwl_dbg_tlv_apply_buffers(fwrt);
                iwl_dbg_tlv_send_hcmds(fwrt, hcmd_list);
-               iwl_dbg_tlv_apply_config(fwrt, conf_list);
                iwl_dbg_tlv_tp_trigger(fwrt, sync, trig_list, tp_data, NULL);
+               iwl_dbg_tlv_apply_config(fwrt, conf_list);
                break;
        case IWL_FW_INI_TIME_POINT_PERIODIC:
                iwl_dbg_tlv_set_periodic_trigs(fwrt);
@@ -1400,14 +1400,14 @@ void _iwl_dbg_tlv_time_point(struct iwl_fw_runtime *fwrt,
        case IWL_FW_INI_TIME_POINT_MISSED_BEACONS:
        case IWL_FW_INI_TIME_POINT_FW_DHC_NOTIFICATION:
                iwl_dbg_tlv_send_hcmds(fwrt, hcmd_list);
-               iwl_dbg_tlv_apply_config(fwrt, conf_list);
                iwl_dbg_tlv_tp_trigger(fwrt, sync, trig_list, tp_data,
                                       iwl_dbg_tlv_check_fw_pkt);
+               iwl_dbg_tlv_apply_config(fwrt, conf_list);
                break;
        default:
                iwl_dbg_tlv_send_hcmds(fwrt, hcmd_list);
-               iwl_dbg_tlv_apply_config(fwrt, conf_list);
                iwl_dbg_tlv_tp_trigger(fwrt, sync, trig_list, tp_data, NULL);
+               iwl_dbg_tlv_apply_config(fwrt, conf_list);
                break;
        }
 }