linux/drivers/net/wireless/intel/iwlwifi
Shaul Triebitz 96d2bfb794 iwlwifi: mvm: clear IN_D3 after wowlan status cmd
In D3 resume flow, avoid the following race where sending
packets before updating the sequence number (sequence
number received from the wowlan status command response):
Thread 1:
__iwl_mvm_resume clears IWL_MVM_STATUS_IN_D3 and is cut
by thread 2 before reaching iwl_mvm_query_wakeup_reasons.
Thread 2:
iwl_mvm_mac_itxq_xmit calls iwl_mvm_tx_skb since
IWL_MVM_STATUS_IN_D3 is not set using a wrong sequence number.
Thread 1:
__iwl_mvm_resume continues and calls iwl_mvm_query_wakeup_reasons
updating the sequence number received from the firmware.

The next packet that will be sent now will cause sysassert 0x1096.

Fix the bug by moving 'clear IWL_MVM_STATUS_IN_D3' to after
sending the wowlan status command and updating the sequence
number.

Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/iwlwifi.20210122144849.fe927ec939c6.I103d3321fb55da7e6c6c51582cfadf94eb8b6c58@changeid
2021-01-25 15:59:19 +02:00
..
cfg iwlwifi: pcie: add rules to match Qu with Hr2 2021-01-25 15:59:17 +02:00
dvm iwlwifi: dvm: Fix fall-through warnings for Clang 2020-12-11 20:20:56 +02:00
fw iwlwifi: mvm: fix the return type for DSM functions 1 and 2 2021-01-25 15:59:12 +02:00
mvm iwlwifi: mvm: clear IN_D3 after wowlan status cmd 2021-01-25 15:59:19 +02:00
pcie iwlwifi: pcie: add rules to match Qu with Hr2 2021-01-25 15:59:17 +02:00
queue iwlwifi: queue: don't crash if txq->entries is NULL 2021-01-25 15:53:02 +02:00
iwl-agn-hw.h iwlwifi: use SPDX tags 2020-12-10 00:15:31 +02:00
iwl-config.h iwlwifi: pcie: add rules to match Qu with Hr2 2021-01-25 15:59:17 +02:00
iwl-context-info-gen3.h iwlwifi: use SPDX tags 2020-12-10 00:15:31 +02:00
iwl-context-info.h iwlwifi: use SPDX tags 2020-12-10 00:15:31 +02:00
iwl-csr.h iwlwifi: support firmware reset handshake 2020-12-10 00:16:03 +02:00
iwl-dbg-tlv.c iwlwifi: dbg: Don't touch the tlv data 2021-01-14 18:56:37 +02:00
iwl-dbg-tlv.h iwlwifi: use SPDX tags 2020-12-10 00:15:31 +02:00
iwl-debug.c iwlwifi: use SPDX tags 2020-12-10 00:15:31 +02:00
iwl-debug.h iwlwifi: mvm: add d3 prints 2020-10-01 22:00:59 +03:00
iwl-devtrace-data.h iwlwifi: pcie: trace IOVA for iwlwifi_dev_tx_tb 2019-11-20 12:28:55 +02:00
iwl-devtrace-io.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 322 2019-06-05 17:37:05 +02:00
iwl-devtrace-iwlwifi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 322 2019-06-05 17:37:05 +02:00
iwl-devtrace-msg.h net: iwlwifi: Remove in_interrupt() from tracing macro. 2020-09-29 14:02:55 -07:00
iwl-devtrace-ucode.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 322 2019-06-05 17:37:05 +02:00
iwl-devtrace.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 322 2019-06-05 17:37:05 +02:00
iwl-devtrace.h iwlwifi: fix warning iwl-trans.h is included more than once 2019-09-06 15:52:05 +03:00
iwl-drv.c iwlwifi: iwl-drv: Fix fall-through warnings for Clang 2020-12-11 20:21:28 +02:00
iwl-drv.h iwlwifi: use SPDX tags 2020-12-10 00:15:31 +02:00
iwl-eeprom-parse.c iwlwifi: iwl-eeprom-parse: Fix 'struct iwl_eeprom_enhanced_txpwr's header 2020-12-11 20:24:23 +02:00
iwl-eeprom-parse.h iwlwifi: use SPDX tags 2020-12-10 00:15:31 +02:00
iwl-eeprom-read.c iwlwifi: iwl-eeprom-read: Demote one nonconformant function header 2020-12-11 20:24:22 +02:00
iwl-eeprom-read.h iwlwifi: use SPDX tags 2020-12-10 00:15:31 +02:00
iwl-fh.h iwlwifi: use SPDX tags 2020-12-10 00:15:31 +02:00
iwl-io.c iwlwifi: fix the NMI flow for old devices 2021-01-25 15:53:00 +02:00
iwl-io.h iwlwifi: fix the NMI flow for old devices 2021-01-25 15:53:00 +02:00
iwl-modparams.h iwlwifi: use SPDX tags 2020-12-10 00:15:31 +02:00
iwl-nvm-parse.c iwlwifi: use SPDX tags 2020-12-10 00:15:31 +02:00
iwl-nvm-parse.h iwlwifi: use SPDX tags 2020-12-10 00:15:31 +02:00
iwl-op-mode.h iwlwifi: use SPDX tags 2020-12-10 00:15:31 +02:00
iwl-phy-db.c iwlwifi: iwl-phy-db: Add missing struct member description for 'trans' 2020-12-11 20:24:25 +02:00
iwl-phy-db.h iwlwifi: use SPDX tags 2020-12-10 00:15:31 +02:00
iwl-prph.h iwlwifi: pcie: set LTR on more devices 2021-01-25 15:53:03 +02:00
iwl-scd.h iwlwifi: use SPDX tags 2020-12-10 00:15:31 +02:00
iwl-trans.c iwlwifi: use SPDX tags 2020-12-10 00:15:31 +02:00
iwl-trans.h iwlwifi: support firmware reset handshake 2020-12-10 00:16:03 +02:00
Kconfig First set of patches intended for v5.9 2020-06-15 20:23:23 +03:00
Makefile iwlwifi: move PNVM implementation to common code 2020-10-08 20:14:58 +03:00