mirror-linux/drivers/net/wireless
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
..
admtek wifi: mac80211: inform the low level if drv_stop() is a suspend 2024-06-26 10:25:46 +02:00
ath wifi: ath12k: use 128 bytes aligned iova in transmit path for WCN7850 2024-08-05 12:28:07 +03:00
atmel wifi: mac80211: inform the low level if drv_stop() is a suspend 2024-06-26 10:25:46 +02:00
broadcom wifi: brcmfmac: cfg80211: Handle SSID based pmksa deletion 2024-08-10 12:07:27 +03:00
intel wifi: iwlwifi: clear trans->state earlier upon error 2024-08-27 09:54:24 +02:00
intersil wifi: mac80211: inform the low level if drv_stop() is a suspend 2024-06-26 10:25:46 +02:00
marvell wifi: mwifiex: duplicate static structs used in driver instances 2024-08-16 12:47:39 +03:00
mediatek wifi: mt76: mt7921: fix NULL pointer access in mt7921_ipv6_addr_change 2024-08-13 12:48:56 +03:00
microchip Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-07-04 14:16:11 -07:00
purelifi wifi: mac80211: inform the low level if drv_stop() is a suspend 2024-06-26 10:25:46 +02:00
quantenna wifi: qtnfmac: Remove generic .ndo_get_stats64 2024-05-02 10:20:04 +03:00
ralink wifi: mac80211: inform the low level if drv_stop() is a suspend 2024-06-26 10:25:46 +02:00
realtek wifi: rtlwifi: rtl8192du: Initialise value32 in _rtl92du_init_queue_reserved_page 2024-08-07 20:11:36 +03:00
rsi wifi: mac80211: inform the low level if drv_stop() is a suspend 2024-06-26 10:25:46 +02:00
silabs wifi: wfx: repair open network AP mode 2024-08-27 10:49:26 +03:00
st wifi: mac80211: inform the low level if drv_stop() is a suspend 2024-06-26 10:25:46 +02:00
ti - In the series "treewide: Refactor heap related implementation", 2024-07-21 17:56:22 -07:00
virtual virtio: features, fixes, cleanups 2024-07-19 11:57:55 -07:00
zydas wifi: mac80211: inform the low level if drv_stop() is a suspend 2024-06-26 10:25:46 +02:00
Kconfig
Makefile