]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
ath10k: Fix tx hanging
authorSebastian Gottschall <s.gottschall@dd-wrt.com>
Wed, 5 May 2021 08:58:06 +0000 (15:58 +0700)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 7 Mar 2022 15:36:15 +0000 (16:36 +0100)
BugLink: https://bugs.launchpad.net/bugs/1960566
[ Upstream commit e8a91863eba3966a447d2daa1526082d52b5db2a ]

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>
Link: https://lore.kernel.org/r/20210505085806.11474-1-s.gottschall@dd-wrt.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/net/wireless/ath/ath10k/htt_tx.c
drivers/net/wireless/ath/ath10k/txrx.c

index c38e1963ebc05dfcbcc7128a9d09dda7a7303f29..f73ed1044390c7a675c825b89bc0dc98e0b56ee4 100644 (file)
@@ -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)
index f46b9083bbf10941bd60778cca6e66044aefa98f..2c254f43790d22abec1e40e2d037a8171488abd6 100644 (file)
@@ -80,8 +80,6 @@ int ath10k_txrx_tx_unref(struct ath10k_htt *htt,
 
        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();