ath11k: Fix "failed to synchronize setup for vdev" warn
PATCH 1/1 ath11k: Fix "failed to synchronize setup for vdev" warn
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
--- drivers/net/wireless/ath/ath11k/mac.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-)
drivers/net/wireless/ath/ath11k/mac.c +15 -7
@@ -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,
Signature · 7 lines
1.9.1 _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Kalle Valo
AppliedQuoted 8 lines · Karthikeyan Periyasamy
In
ath11k_mac_vdev_stop(),vdev_stop_statusget marked after the WMI vdev stop success. In concurrent scenario,ath11k_vdev_stopped_event()get called before the above mark get enabled inath11k_mac_vdev_stop(). which leads to fail vdev stop, sinceath11k_get_ar_vdev_stop_status()not able to find thevdev_stop_statusmark. Enabled thevdev_stop_statusmark before requesting the WMI vdev stop, so that we ensurevdev_stop_statusmark get available in all concurrent scenario.
Quoted 6 lines
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: -110Signed-off-by Karthikeyan Periyasamy <[email protected]>
Applied.
Signature · 6 lines
Kalle Valo _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k