Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH v3 0/3] wifi: ath11k/ath12k: implement TX flow control
@ 2026-07-20  7:08 Jose Ignacio Tornos Martinez
  2026-07-20  7:08 ` [PATCH v3 1/3] wifi: mac80211: add ieee80211_tx_peek API Jose Ignacio Tornos Martinez
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jose Ignacio Tornos Martinez @ 2026-07-20  7:08 UTC (permalink / raw)
  To: jjohnson
  Cc: ath11k, ath12k, linux-wireless, linux-kernel,
	Jose Ignacio Tornos Martinez

This series implements custom wake_tx_queue operations for ath11k and
ath12k drivers to prevent hardware ring overflow issues under heavy
traffic.

Without proper flow control, both drivers experience -ENOMEM errors
("failed to transmit frame -12") when the hardware TCL ring fills up.
Additionally, ath12k can hang under sustained high throughput. These
issues are more commonly observed in VMs with PCIe passthrough but
also occur on bare metal systems.

The implementation follows the pattern used in the iwlwifi driver,
checking hardware ring space before dequeuing packets from mac80211.
Per-txq locking via txq->drv_priv serializes peek and dequeue
operations for the same txq, preventing use-after-free races while
keeping different txqs fully parallel.

Testing shows stable operation with eliminated -ENOMEM errors, no hangs,
and improved throughput under heavy traffic conditions.

Jose Ignacio Tornos Martinez (3):
  mac80211: add ieee80211_tx_peek API
  wifi: ath11k: implement custom wake_tx_queue with flow control
  wifi: ath12k: implement custom wake_tx_queue with flow control

v3: Address the review comments from Tamizh Raja:
    - ath11k/ath12k: replace per-ring wake_tx_lock with per-txq spinlock via
      txq->drv_priv to fix race condition between ieee80211_tx_peek() and
      ieee80211_tx_dequeue() when multiple CPUs process the same txq
    - ath12k: fix MLO link selection in wake_tx_queue to use
      rcu_dereference(ahvif->link[link_id]) instead of deflink, matching
      the link selection logic in op_tx
v2: https://lore.kernel.org/all/20260715125017.277242-1-jtornosm@redhat.com/

--
2.49.0


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

end of thread, other threads:[~2026-07-21 16:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-20  7:08 [PATCH v3 0/3] wifi: ath11k/ath12k: implement TX flow control Jose Ignacio Tornos Martinez
2026-07-20  7:08 ` [PATCH v3 1/3] wifi: mac80211: add ieee80211_tx_peek API Jose Ignacio Tornos Martinez
2026-07-21 16:28   ` Johannes Berg
2026-07-20  7:08 ` [PATCH v3 2/3] wifi: ath11k: implement custom wake_tx_queue with flow control Jose Ignacio Tornos Martinez
2026-07-20  7:08 ` [PATCH v3 3/3] wifi: ath12k: " Jose Ignacio Tornos Martinez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox