ath10k.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath10k: Fix tx hanging
@ 2021-05-05  8:58 Sebastian Gottschall
  2021-12-08  8:38 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Gottschall @ 2021-05-05  8:58 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Sebastian Gottschall

While running stress tests in roaming scenarios (switching ap's every 5
seconds, we discovered a issue which leads to tx hangings of exactly 5
seconds while or after scanning for new accesspoints. We found out that
this hanging is triggered by ath10k_mac_wait_tx_complete since the
empty_tx_wq was not wake when the num_tx_pending counter reaches zero.
To fix this, we simply move the wake_up call to htt_tx_dec_pending,
since this call was missed on several locations within the ath10k code.

Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
---
 drivers/net/wireless/ath/ath10k/htt_tx.c | 3 +++
 drivers/net/wireless/ath/ath10k/txrx.c   | 2 --
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c
index d6b8bdcef416..b793eac2cfac 100644
--- a/drivers/net/wireless/ath/ath10k/htt_tx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_tx.c
@@ -147,6 +147,9 @@ void ath10k_htt_tx_dec_pending(struct ath10k_htt *htt)
 	htt->num_pending_tx--;
 	if (htt->num_pending_tx == htt->max_num_pending_tx - 1)
 		ath10k_mac_tx_unlock(htt->ar, ATH10K_TX_PAUSE_Q_FULL);
+
+	if (htt->num_pending_tx == 0)
+		wake_up(&htt->empty_tx_wq);
 }
 
 int ath10k_htt_tx_inc_pending(struct ath10k_htt *htt)
diff --git a/drivers/net/wireless/ath/ath10k/txrx.c b/drivers/net/wireless/ath/ath10k/txrx.c
index 7c9ea0c073d8..6f8b64218894 100644
--- a/drivers/net/wireless/ath/ath10k/txrx.c
+++ b/drivers/net/wireless/ath/ath10k/txrx.c
@@ -82,8 +82,6 @@ int ath10k_txrx_tx_unref(struct ath10k_htt *htt,
 	flags = skb_cb->flags;
 	ath10k_htt_tx_free_msdu_id(htt, tx_done->msdu_id);
 	ath10k_htt_tx_dec_pending(htt);
-	if (htt->num_pending_tx == 0)
-		wake_up(&htt->empty_tx_wq);
 	spin_unlock_bh(&htt->tx_lock);
 
 	rcu_read_lock();
-- 
2.31.1


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ath10k: Fix tx hanging
  2021-05-05  8:58 [PATCH] ath10k: Fix tx hanging Sebastian Gottschall
@ 2021-12-08  8:38 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2021-12-08  8:38 UTC (permalink / raw)
  To: Sebastian Gottschall; +Cc: ath10k, linux-wireless, Sebastian Gottschall

Sebastian Gottschall <s.gottschall@dd-wrt.com> wrote:

> While running stress tests in roaming scenarios (switching ap's every 5
> seconds, we discovered a issue which leads to tx hangings of exactly 5
> seconds while or after scanning for new accesspoints. We found out that
> this hanging is triggered by ath10k_mac_wait_tx_complete since the
> empty_tx_wq was not wake when the num_tx_pending counter reaches zero.
> To fix this, we simply move the wake_up call to htt_tx_dec_pending,
> since this call was missed on several locations within the ath10k code.
> 
> Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Patch applied to ath-next branch of ath.git, thanks.

e8a91863eba3 ath10k: Fix tx hanging

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20210505085806.11474-1-s.gottschall@dd-wrt.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-08  8:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-05  8:58 [PATCH] ath10k: Fix tx hanging Sebastian Gottschall
2021-12-08  8:38 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).