1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/wireless/intel/iwlwifi/fw
Emmanuel Grumbach 094513f8a2 wifi: iwlwifi: clear trans->state earlier upon error
When the firmware crashes, we first told the op_mode and only then,
changed the transport's state. This is a problem if the op_mode's
nic_error() handler needs to send a host command: it'll see that the
transport's state still reflects that the firmware is alive.

Today, this has no consequences since we set the STATUS_FW_ERROR bit and
that will prevent sending host commands. iwl_fw_dbg_stop_restart_recording
looks at this bit to know not to send a host command for example.

To fix the hibernation, we needed to reset the firmware without having
an error and checking STATUS_FW_ERROR to see whether the firmware is
alive will no longer hold, so this change is necessary as well.

Change the flow a bit.
Change trans->state before calling the op_mode's nic_error() method and
check trans->state instead of STATUS_FW_ERROR. This will keep the
current behavior of iwl_fw_dbg_stop_restart_recording upon firmware
error, and it'll allow us to call iwl_fw_dbg_stop_restart_recording
safely even if STATUS_FW_ERROR is clear, but yet, the firmware is not
alive.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20240825191257.9d7427fbdfd7.Ia056ca57029a382c921d6f7b6a6b28fc480f2f22@changeid
[I missed this was a dependency for the hibernation fix, changed
 the commit message a bit accordingly]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-08-27 09:54:24 +02:00
..
api wifi: iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD v12 2024-07-04 13:50:06 +02:00
acpi.c wifi: iwlwifi: fw: fix wgds rev 3 exact size 2024-08-26 17:39:57 +02:00
acpi.h wifi: iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD v10 2024-04-19 10:15:44 +02:00
dbg.c wifi: iwlwifi: clear trans->state earlier upon error 2024-08-27 09:54:24 +02:00
dbg.h wifi: iwlwifi: remove unused function prototype 2024-02-02 14:33:01 +01:00
debugfs.c wifi: iwlwifi: remove fw_running op 2024-05-23 10:51:02 +02:00
debugfs.h iwlwifi: use SPDX tags 2020-12-10 00:15:31 +02:00
dump.c wifi: iwlwifi: remove memory check for LMAC error address 2023-08-22 13:19:25 +02:00
error-dump.h wifi: iwlwifi: fix prototype mismatch kernel-doc warnings 2024-06-26 10:35:15 +02:00
file.h wifi: iwlwifi: enable monitor on passive/inactive channels 2024-03-25 15:39:11 +01:00
img.c iwlwifi: make iwl_fw_lookup_cmd_ver() take a cmd_id 2022-02-18 10:40:50 +02:00
img.h wifi: iwlwifi: fw: increase fw_version string size 2023-10-23 12:25:53 +02:00
init.c wifi: iwlwifi: fw: avoid bad FW config on RXQ DMA failure 2024-05-23 10:51:47 +02:00
notif-wait.c iwlwifi: fw: fix notification wait locking 2021-04-06 13:25:59 +03:00
notif-wait.h wifi: iwlwifi: fix some kernel-doc issues 2023-09-11 12:36:26 +02:00
paging.c iwlwifi: avoid void pointer arithmetic 2022-02-18 10:40:50 +02:00
pnvm.c wifi: iwlwifi: fw: allow vmalloc for PNVM image 2024-02-08 15:00:48 +01:00
pnvm.h wifi: iwlwifi: cfg: remove trailing dash from FW_PRE constants 2023-06-21 14:07:01 +02:00
regulatory.c wifi: iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD v12 2024-07-04 13:50:06 +02:00
regulatory.h wifi: iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD v11 2024-05-23 10:53:04 +02:00
rs.c wifi: iwlwifi: remove dead-code 2023-09-13 16:11:39 +02:00
runtime.h wifi: iwlwifi: mvm: don't limit VLP/AFC to UATS-enabled 2024-06-26 10:28:51 +02:00
smem.c iwlwifi: prefer WIDE_ID() over iwl_cmd_id() 2022-02-18 10:40:50 +02:00
uefi.c wifi: iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD v10 2024-04-19 10:15:44 +02:00
uefi.h wifi: iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD v10 2024-04-19 10:15:44 +02:00