Skip to content

Commit 3a84454

Browse files
egrumbachjmberg-intel
authored andcommitted
wifi: iwlwifi: mvm: don't wait for tx queues if firmware is dead
There is a WARNING in iwl_trans_wait_tx_queues_empty() (that was recently converted from just a message), that can be hit if we wait for TX queues to become empty after firmware died. Clearly, we can't expect anything from the firmware after it's declared dead. Don't call iwl_trans_wait_tx_queues_empty() in this case. While it could be a good idea to stop the flow earlier, the flush functions do some maintenance work that is not related to the firmware, so keep that part of the code running even when the firmware is not running. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20240825191257.a7cbd794cee9.I44a739fbd4ffcc46b83844dd1c7b2eb0c7b270f6@changeid [edit commit message] Signed-off-by: Johannes Berg <[email protected]>
1 parent 454f630 commit 3a84454

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5818,6 +5818,10 @@ static void iwl_mvm_flush_no_vif(struct iwl_mvm *mvm, u32 queues, bool drop)
58185818
int i;
58195819

58205820
if (!iwl_mvm_has_new_tx_api(mvm)) {
5821+
/* we can't ask the firmware anything if it is dead */
5822+
if (test_bit(IWL_MVM_STATUS_HW_RESTART_REQUESTED,
5823+
&mvm->status))
5824+
return;
58215825
if (drop) {
58225826
guard(mvm)(mvm);
58235827
iwl_mvm_flush_tx_path(mvm,
@@ -5911,8 +5915,11 @@ void iwl_mvm_mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
59115915

59125916
/* this can take a while, and we may need/want other operations
59135917
* to succeed while doing this, so do it without the mutex held
5918+
* If the firmware is dead, this can't work...
59145919
*/
5915-
if (!drop && !iwl_mvm_has_new_tx_api(mvm))
5920+
if (!drop && !iwl_mvm_has_new_tx_api(mvm) &&
5921+
!test_bit(IWL_MVM_STATUS_HW_RESTART_REQUESTED,
5922+
&mvm->status))
59165923
iwl_trans_wait_tx_queues_empty(mvm->trans, msk);
59175924
}
59185925

0 commit comments

Comments
 (0)