diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2024-08-25 19:17:01 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2024-08-27 09:54:24 +0200 |
commit | 094513f8a2fbddee51b055d8035f995551f98fce (patch) | |
tree | 5bf17a75424f1ed061966a1e409fd728eb5f7e33 /drivers/pps/kc.c | |
parent | 6d30bb88f623526197c0e18a366e68a4254a2c83 (diff) |
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>
Diffstat (limited to 'drivers/pps/kc.c')
0 files changed, 0 insertions, 0 deletions