* [PATCH] ath11k: Fix "failed to synchronize setup for vdev" warn
@ 2019-04-24 4:49 Karthikeyan Periyasamy
2019-05-02 13:37 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Karthikeyan Periyasamy @ 2019-04-24 4:49 UTC (permalink / raw)
To: ath11k; +Cc: Karthikeyan Periyasamy
In ath11k_mac_vdev_stop(), vdev_stop_status get marked after the
WMI vdev stop success. In concurrent scenario, ath11k_vdev_stopped_event()
get called before the above mark get enabled in ath11k_mac_vdev_stop().
which leads to fail vdev stop, since ath11k_get_ar_vdev_stop_status()
not able to find the vdev_stop_status mark. Enabled the vdev_stop_status
mark before requesting the WMI vdev stop, so that we ensure vdev_stop_status
mark get available in all concurrent scenario.
Warn:
ath11k c000000.wifi1: invalid vdev id in vdev stopped ev 0
ath11k c000000.wifi1: failed to synchronize setup for vdev 0: -110
ath11k c000000.wifi1: failed to stop vdev 0: -110
Signed-off-by: Karthikeyan Periyasamy <periyasa@codeaurora.org>
---
drivers/net/wireless/ath/ath11k/mac.c | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index ddb8beb..3dc830c 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -3910,23 +3910,25 @@ static int ath11k_mac_vdev_stop(struct ath11k_vif *arvif)
reinit_completion(&ar->vdev_setup_done);
+ spin_lock_bh(&ar->data_lock);
+
+ ar->vdev_stop_status.stop_in_progress = true;
+ ar->vdev_stop_status.vdev_id = arvif->vdev_id;
+
+ spin_unlock_bh(&ar->data_lock);
+
ret = ath11k_wmi_vdev_stop(ar, arvif->vdev_id);
if (ret) {
ath11k_warn(ar->ab, "failed to stop WMI vdev %i: %d\n",
arvif->vdev_id, ret);
- return ret;
+ goto err;
}
- spin_lock_bh(&ar->data_lock);
- ar->vdev_stop_status.stop_in_progress = true;
- ar->vdev_stop_status.vdev_id = arvif->vdev_id;
- spin_unlock_bh(&ar->data_lock);
-
ret = ath11k_mac_vdev_setup_sync(ar);
if (ret) {
ath11k_warn(ar->ab, "failed to synchronize setup for vdev %i: %d\n",
arvif->vdev_id, ret);
- return ret;
+ goto err;
}
WARN_ON(ar->num_started_vdevs == 0);
@@ -3936,6 +3938,12 @@ static int ath11k_mac_vdev_stop(struct ath11k_vif *arvif)
/* TODO: Recalc radar */
return 0;
+err:
+ spin_lock_bh(&ar->data_lock);
+ ar->vdev_stop_status.stop_in_progress = false;
+ spin_unlock_bh(&ar->data_lock);
+
+ return ret;
}
static int ath11k_mac_vdev_start(struct ath11k_vif *arvif,
--
1.9.1
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ath11k: Fix "failed to synchronize setup for vdev" warn
2019-04-24 4:49 [PATCH] ath11k: Fix "failed to synchronize setup for vdev" warn Karthikeyan Periyasamy
@ 2019-05-02 13:37 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2019-05-02 13:37 UTC (permalink / raw)
To: Karthikeyan Periyasamy; +Cc: ath11k
Karthikeyan Periyasamy <periyasa@codeaurora.org> writes:
> In ath11k_mac_vdev_stop(), vdev_stop_status get marked after the
> WMI vdev stop success. In concurrent scenario, ath11k_vdev_stopped_event()
> get called before the above mark get enabled in ath11k_mac_vdev_stop().
> which leads to fail vdev stop, since ath11k_get_ar_vdev_stop_status()
> not able to find the vdev_stop_status mark. Enabled the vdev_stop_status
> mark before requesting the WMI vdev stop, so that we ensure vdev_stop_status
> mark get available in all concurrent scenario.
>
> Warn:
> ath11k c000000.wifi1: invalid vdev id in vdev stopped ev 0
> ath11k c000000.wifi1: failed to synchronize setup for vdev 0: -110
> ath11k c000000.wifi1: failed to stop vdev 0: -110
>
> Signed-off-by: Karthikeyan Periyasamy <periyasa@codeaurora.org>
Applied.
--
Kalle Valo
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-02 13:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-24 4:49 [PATCH] ath11k: Fix "failed to synchronize setup for vdev" warn Karthikeyan Periyasamy
2019-05-02 13:37 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox