From: Karthikeyan Periyasamy <periyasa@codeaurora.org>
To: ath11k@lists.infradead.org
Cc: Karthikeyan Periyasamy <periyasa@codeaurora.org>
Subject: [PATCH] ath11k: Fix "failed to synchronize setup for vdev" warn
Date: Wed, 24 Apr 2019 10:19:33 +0530 [thread overview]
Message-ID: <1556081373-12635-1-git-send-email-periyasa@codeaurora.org> (raw)
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
next reply other threads:[~2019-04-24 4:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-24 4:49 Karthikeyan Periyasamy [this message]
2019-05-02 13:37 ` [PATCH] ath11k: Fix "failed to synchronize setup for vdev" warn Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1556081373-12635-1-git-send-email-periyasa@codeaurora.org \
--to=periyasa@codeaurora.org \
--cc=ath11k@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox