aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/ops.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/ops.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/ops.c b/drivers/net/wireless/iwlwifi/mvm/ops.c
index bd52ecfabedb..7a9578567f4f 100644
--- a/drivers/net/wireless/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/iwlwifi/mvm/ops.c
@@ -427,6 +427,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
427 } 427 }
428 mvm->sf_state = SF_UNINIT; 428 mvm->sf_state = SF_UNINIT;
429 mvm->low_latency_agg_frame_limit = 6; 429 mvm->low_latency_agg_frame_limit = 6;
430 mvm->cur_ucode = IWL_UCODE_INIT;
430 431
431 mutex_init(&mvm->mutex); 432 mutex_init(&mvm->mutex);
432 mutex_init(&mvm->d0i3_suspend_mutex); 433 mutex_init(&mvm->d0i3_suspend_mutex);
@@ -757,6 +758,7 @@ void iwl_mvm_set_hw_ctkill_state(struct iwl_mvm *mvm, bool state)
757static bool iwl_mvm_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state) 758static bool iwl_mvm_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state)
758{ 759{
759 struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode); 760 struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode);
761 bool calibrating = ACCESS_ONCE(mvm->calibrating);
760 762
761 if (state) 763 if (state)
762 set_bit(IWL_MVM_STATUS_HW_RFKILL, &mvm->status); 764 set_bit(IWL_MVM_STATUS_HW_RFKILL, &mvm->status);
@@ -765,7 +767,15 @@ static bool iwl_mvm_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state)
765 767
766 wiphy_rfkill_set_hw_state(mvm->hw->wiphy, iwl_mvm_is_radio_killed(mvm)); 768 wiphy_rfkill_set_hw_state(mvm->hw->wiphy, iwl_mvm_is_radio_killed(mvm));
767 769
768 return state && mvm->cur_ucode != IWL_UCODE_INIT; 770 /* iwl_run_init_mvm_ucode is waiting for results, abort it */
771 if (calibrating)
772 iwl_abort_notification_waits(&mvm->notif_wait);
773
774 /*
775 * Stop the device if we run OPERATIONAL firmware or if we are in the
776 * middle of the calibrations.
777 */
778 return state && (mvm->cur_ucode != IWL_UCODE_INIT || calibrating);
769} 779}
770 780
771static void iwl_mvm_free_skb(struct iwl_op_mode *op_mode, struct sk_buff *skb) 781static void iwl_mvm_free_skb(struct iwl_op_mode *op_mode, struct sk_buff *skb)