Thread (7 messages) 7 messages, 3 authors, 2018-05-25

Re: [PATCH] ath10k: transmit queued frames after waking queues

From: Bob Copeland <me@bobcopeland.com>
Date: 2018-05-24 15:50:39
Also in: linux-wireless, lkml

On Mon, May 21, 2018 at 10:37:01PM +0200, Niklas Cassel wrote:
On Thu, May 17, 2018 at 03:26:25PM -0700, Adrian Chadd wrote:
quoted
On Thu, 17 May 2018 at 16:16, Niklas Cassel [off-list ref]
wrote:
quoted
diff --git a/drivers/net/wireless/ath/ath10k/txrx.c
b/drivers/net/wireless/ath/ath10k/txrx.c
quoted
index cda164f6e9f6..1d3b2d2c3fee 100644
--- a/drivers/net/wireless/ath/ath10k/txrx.c
+++ b/drivers/net/wireless/ath/ath10k/txrx.c
@@ -95,6 +95,9 @@ int ath10k_txrx_tx_unref(struct ath10k_htt *htt,
                 wake_up(&htt->empty_tx_wq);
         spin_unlock_bh(&htt->tx_lock);
quoted
+       if (htt->num_pending_tx <= 3 && !list_empty(&ar->txqs))
+               ath10k_mac_tx_push_pending(ar);
+
Just sanity checking - what's protecting htt->num_pending_tx? or is it
serialised some other way?
[...]
I can't see that any of the examples applies, but let's add READ_ONCE(),
to make sure that the compiler doesn't try to optimize this.
Couldn't you just move the num_pending_tx read inside tx_lock which is 2 lines
above?  I think all the other manipulations are protected by tx_lock.

-- 
Bob Copeland %% https://bobcopeland.com/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help