linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Improve ath10k flush queue mechanism
@ 2024-10-12 14:13 Remi Pommarel
  2024-10-12 14:13 ` [PATCH 1/2] wifi: ath10k: Implement ieee80211 flush_sta callback Remi Pommarel
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Remi Pommarel @ 2024-10-12 14:13 UTC (permalink / raw)
  To: ath10k, linux-wireless, linux-kernel
  Cc: Kalle Valo, Jeff Johnson, Cedric Veilleux, Remi Pommarel

It has been reported [0] that a 3-4 seconds (actually up to 5 sec) of
radio silence could be observed followed by the error below on ath10k
devices:

 ath10k_pci 0000:04:00.0: failed to flush transmit queue (skip 0 ar-state 1): 0

This is due to how the TX queues are flushed in ath10k. When a STA is
removed, mac80211 need to flush queues [1], but because ath10k does not
have a lightweight .flush_sta operation, ieee80211_flush_queues() is
called instead effectively blocking the whole queue during the drain
causing this radio silence. Also because ath10k_flush() waits for all
queued to be emptied, not only the flushed ones it could more easily
take up to 5 seconds to finish making the whole situation worst.

The first patch of this series adds a .flush_sta operation to flush only
specific STA traffic avoiding the need to stop whole queues and should
be enough in itself to fix the reported issue.

The second patch of this series is a proposal to improve ath10k_flush so
that it will be less likely to timeout waiting for non related queues to
drain.

The abose kernel warning could still be observed (e.g. flushing a dead
STA) but should be now harmless.

[0]: https://lore.kernel.org/all/CA+Xfe4FjUmzM5mvPxGbpJsF3SvSdE5_wgxvgFJ0bsdrKODVXCQ@mail.gmail.com/
[1]: commit 0b75a1b1e42e ("wifi: mac80211: flush queues on STA removal")

Remi Pommarel (2):
  wifi: ath10k: Implement ieee80211 flush_sta callback
  wifi: ath10k: Flush only requested txq in ath10k_flush()

 drivers/net/wireless/ath/ath10k/core.h   |  4 ++
 drivers/net/wireless/ath/ath10k/htt.h    | 11 +++-
 drivers/net/wireless/ath/ath10k/htt_tx.c | 50 +++++++++++++++-
 drivers/net/wireless/ath/ath10k/mac.c    | 76 ++++++++++++++++++++----
 drivers/net/wireless/ath/ath10k/txrx.c   |  5 +-
 5 files changed, 129 insertions(+), 17 deletions(-)

-- 
2.40.0


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

end of thread, other threads:[~2024-10-18 16:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-12 14:13 [PATCH 0/2] Improve ath10k flush queue mechanism Remi Pommarel
2024-10-12 14:13 ` [PATCH 1/2] wifi: ath10k: Implement ieee80211 flush_sta callback Remi Pommarel
2024-10-17 21:19   ` Jeff Johnson
2024-10-18  7:32     ` Remi Pommarel
2024-10-18  7:27   ` Vasanthakumar Thiagarajan
2024-10-18  7:39     ` Remi Pommarel
2024-10-12 14:13 ` [PATCH 2/2] wifi: ath10k: Flush only requested txq in ath10k_flush() Remi Pommarel
2024-10-17 21:24   ` Jeff Johnson
2024-10-18 16:18   ` Vasanthakumar Thiagarajan
2024-10-17 21:25 ` [PATCH 0/2] Improve ath10k flush queue mechanism Jeff Johnson

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).