diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/ops.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/ops.c | 12 |
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 48cb25a93591..5b719ee8e789 100644 --- a/drivers/net/wireless/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/iwlwifi/mvm/ops.c | |||
@@ -424,6 +424,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, | |||
424 | } | 424 | } |
425 | mvm->sf_state = SF_UNINIT; | 425 | mvm->sf_state = SF_UNINIT; |
426 | mvm->low_latency_agg_frame_limit = 6; | 426 | mvm->low_latency_agg_frame_limit = 6; |
427 | mvm->cur_ucode = IWL_UCODE_INIT; | ||
427 | 428 | ||
428 | mutex_init(&mvm->mutex); | 429 | mutex_init(&mvm->mutex); |
429 | mutex_init(&mvm->d0i3_suspend_mutex); | 430 | mutex_init(&mvm->d0i3_suspend_mutex); |
@@ -752,6 +753,7 @@ void iwl_mvm_set_hw_ctkill_state(struct iwl_mvm *mvm, bool state) | |||
752 | static bool iwl_mvm_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state) | 753 | static bool iwl_mvm_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state) |
753 | { | 754 | { |
754 | struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode); | 755 | struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode); |
756 | bool calibrating = ACCESS_ONCE(mvm->calibrating); | ||
755 | 757 | ||
756 | if (state) | 758 | if (state) |
757 | set_bit(IWL_MVM_STATUS_HW_RFKILL, &mvm->status); | 759 | set_bit(IWL_MVM_STATUS_HW_RFKILL, &mvm->status); |
@@ -760,7 +762,15 @@ static bool iwl_mvm_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state) | |||
760 | 762 | ||
761 | wiphy_rfkill_set_hw_state(mvm->hw->wiphy, iwl_mvm_is_radio_killed(mvm)); | 763 | wiphy_rfkill_set_hw_state(mvm->hw->wiphy, iwl_mvm_is_radio_killed(mvm)); |
762 | 764 | ||
763 | return state && mvm->cur_ucode != IWL_UCODE_INIT; | 765 | /* iwl_run_init_mvm_ucode is waiting for results, abort it */ |
766 | if (calibrating) | ||
767 | iwl_abort_notification_waits(&mvm->notif_wait); | ||
768 | |||
769 | /* | ||
770 | * Stop the device if we run OPERATIONAL firmware or if we are in the | ||
771 | * middle of the calibrations. | ||
772 | */ | ||
773 | return state && (mvm->cur_ucode != IWL_UCODE_INIT || calibrating); | ||
764 | } | 774 | } |
765 | 775 | ||
766 | static void iwl_mvm_free_skb(struct iwl_op_mode *op_mode, struct sk_buff *skb) | 776 | static void iwl_mvm_free_skb(struct iwl_op_mode *op_mode, struct sk_buff *skb) |