Skip to content

Commit fe56d05

Browse files
sara-sKalle Valo
authored andcommitted
iwlwifi: mvm: fix kernel panic in case of assert during CSA
During CSA, we briefly nullify the phy context, in __iwl_mvm_unassign_vif_chanctx. In case we have a FW assert right after it, it remains NULL though. We end up running into endless loop due to mac80211 trying repeatedly to move us to ASSOC state, and we keep returning -EINVAL. Later down the road we hit a kernel panic. Detect and avoid this endless loop. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/iwlwifi.20201107104557.d64de2c17bff.Iedd0d2afa20a2aacba5259a5cae31cb3a119a4eb@changeid
1 parent edb6252 commit fe56d05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3080,7 +3080,7 @@ static int iwl_mvm_mac_sta_state(struct ieee80211_hw *hw,
30803080

30813081
/* this would be a mac80211 bug ... but don't crash */
30823082
if (WARN_ON_ONCE(!mvmvif->phy_ctxt))
3083-
return -EINVAL;
3083+
return test_bit(IWL_MVM_STATUS_HW_RESTART_REQUESTED, &mvm->status) ? 0 : -EINVAL;
30843084

30853085
/*
30863086
* If we are in a STA removal flow and in DQA mode:

0 commit comments

Comments
 (0)