|
@@ -519,6 +519,9 @@ static inline int ath10k_vdev_setup_sync(struct ath10k *ar)
|
|
|
|
|
|
lockdep_assert_held(&ar->conf_mutex);
|
|
|
|
|
|
+ if (test_bit(ATH10K_FLAG_CRASH_FLUSH, &ar->dev_flags))
|
|
|
+ return -ESHUTDOWN;
|
|
|
+
|
|
|
ret = wait_for_completion_timeout(&ar->vdev_setup_done,
|
|
|
ATH10K_VDEV_SETUP_TIMEOUT_HZ);
|
|
|
if (ret == 0)
|
|
@@ -551,6 +554,8 @@ static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id)
|
|
|
arg.channel.max_reg_power = channel->max_reg_power * 2;
|
|
|
arg.channel.max_antenna_gain = channel->max_antenna_gain * 2;
|
|
|
|
|
|
+ reinit_completion(&ar->vdev_setup_done);
|
|
|
+
|
|
|
ret = ath10k_wmi_vdev_start(ar, &arg);
|
|
|
if (ret) {
|
|
|
ath10k_warn(ar, "failed to request monitor vdev %i start: %d\n",
|
|
@@ -598,6 +603,8 @@ static int ath10k_monitor_vdev_stop(struct ath10k *ar)
|
|
|
ath10k_warn(ar, "failed to put down monitor vdev %i: %d\n",
|
|
|
ar->monitor_vdev_id, ret);
|
|
|
|
|
|
+ reinit_completion(&ar->vdev_setup_done);
|
|
|
+
|
|
|
ret = ath10k_wmi_vdev_stop(ar, ar->monitor_vdev_id);
|
|
|
if (ret)
|
|
|
ath10k_warn(ar, "failed to to request monitor vdev %i stop: %d\n",
|
|
@@ -2350,7 +2357,7 @@ static void ath10k_tx(struct ieee80211_hw *hw,
|
|
|
}
|
|
|
|
|
|
/* Must not be called with conf_mutex held as workers can use that also. */
|
|
|
-static void ath10k_drain_tx(struct ath10k *ar)
|
|
|
+void ath10k_drain_tx(struct ath10k *ar)
|
|
|
{
|
|
|
/* make sure rcu-protected mac80211 tx path itself is drained */
|
|
|
synchronize_net();
|
|
@@ -3910,7 +3917,9 @@ static void ath10k_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
|
|
empty = (ar->htt.num_pending_tx == 0);
|
|
|
spin_unlock_bh(&ar->htt.tx_lock);
|
|
|
|
|
|
- skip = (ar->state == ATH10K_STATE_WEDGED);
|
|
|
+ skip = (ar->state == ATH10K_STATE_WEDGED) ||
|
|
|
+ test_bit(ATH10K_FLAG_CRASH_FLUSH,
|
|
|
+ &ar->dev_flags);
|
|
|
|
|
|
(empty || skip);
|
|
|
}), ATH10K_FLUSH_TIMEOUT_HZ);
|
|
@@ -4007,6 +4016,7 @@ static void ath10k_restart_complete(struct ieee80211_hw *hw)
|
|
|
if (ar->state == ATH10K_STATE_RESTARTED) {
|
|
|
ath10k_info(ar, "device successfully recovered\n");
|
|
|
ar->state = ATH10K_STATE_ON;
|
|
|
+ ieee80211_wake_queues(ar->hw);
|
|
|
}
|
|
|
|
|
|
mutex_unlock(&ar->conf_mutex);
|