aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/mac80211.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mac80211.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac80211.c35
1 files changed, 22 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index 31a5b3f4266c..20915587c820 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -1004,8 +1004,13 @@ void __iwl_mvm_mac_stop(struct iwl_mvm *mvm)
1004{ 1004{
1005 lockdep_assert_held(&mvm->mutex); 1005 lockdep_assert_held(&mvm->mutex);
1006 1006
1007 /* disallow low power states when the FW is down */ 1007 /*
1008 iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN); 1008 * Disallow low power states when the FW is down by taking
1009 * the UCODE_DOWN ref. in case of ongoing hw restart the
1010 * ref is already taken, so don't take it again.
1011 */
1012 if (!test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status))
1013 iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN);
1009 1014
1010 /* async_handlers_wk is now blocked */ 1015 /* async_handlers_wk is now blocked */
1011 1016
@@ -1023,6 +1028,12 @@ void __iwl_mvm_mac_stop(struct iwl_mvm *mvm)
1023 /* the fw is stopped, the aux sta is dead: clean up driver state */ 1028 /* the fw is stopped, the aux sta is dead: clean up driver state */
1024 iwl_mvm_del_aux_sta(mvm); 1029 iwl_mvm_del_aux_sta(mvm);
1025 1030
1031 /*
1032 * Clear IN_HW_RESTART flag when stopping the hw (as restart_complete()
1033 * won't be called in this case).
1034 */
1035 clear_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status);
1036
1026 mvm->ucode_loaded = false; 1037 mvm->ucode_loaded = false;
1027} 1038}
1028 1039
@@ -3332,18 +3343,16 @@ static void iwl_mvm_mac_flush(struct ieee80211_hw *hw,
3332 msk |= mvmsta->tfd_queue_msk; 3343 msk |= mvmsta->tfd_queue_msk;
3333 } 3344 }
3334 3345
3335 if (drop) { 3346 msk &= ~BIT(vif->hw_queue[IEEE80211_AC_VO]);
3336 if (iwl_mvm_flush_tx_path(mvm, msk, true))
3337 IWL_ERR(mvm, "flush request fail\n");
3338 mutex_unlock(&mvm->mutex);
3339 } else {
3340 mutex_unlock(&mvm->mutex);
3341 3347
3342 /* this can take a while, and we may need/want other operations 3348 if (iwl_mvm_flush_tx_path(mvm, msk, true))
3343 * to succeed while doing this, so do it without the mutex held 3349 IWL_ERR(mvm, "flush request fail\n");
3344 */ 3350 mutex_unlock(&mvm->mutex);
3345 iwl_trans_wait_tx_queue_empty(mvm->trans, msk); 3351
3346 } 3352 /* this can take a while, and we may need/want other operations
3353 * to succeed while doing this, so do it without the mutex held
3354 */
3355 iwl_trans_wait_tx_queue_empty(mvm->trans, msk);
3347} 3356}
3348 3357
3349const struct ieee80211_ops iwl_mvm_hw_ops = { 3358const struct ieee80211_ops iwl_mvm_hw_ops = {