[PATCH AUTOSEL 6.17-6.6] wifi: ath12k: Increase DP_REO_CMD_RING_SIZE to 256

Sasha Levin sashal at kernel.org
Sat Oct 25 08:55:31 PDT 2025


From: Nithyanantham Paramasivam <nithyanantham.paramasivam at oss.qualcomm.com>

[ Upstream commit 82993345aef6987a916337ebd2fca3ff4a6250a7 ]

Increase DP_REO_CMD_RING_SIZE from 128 to 256 to avoid
queuing failures observed during stress test scenarios.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

Signed-off-by: Nithyanantham Paramasivam <nithyanantham.paramasivam at oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang at oss.qualcomm.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan at oss.qualcomm.com>
Link: https://patch.msgid.link/20250806111750.3214584-2-nithyanantham.paramasivam@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson at oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal at kernel.org>
---

LLM Generated explanations, may be completely bogus:

YES
- Bumping `DP_REO_CMD_RING_SIZE` to 256 in
  `drivers/net/wireless/ath/ath12k/dp.h:187` directly enlarges the REO
  command SRNG that `ath12k_dp_srng_setup()` provisions in
  `drivers/net/wireless/ath/ath12k/dp.c:555-563`, so the host can queue
  twice as many HAL_REO commands (peer/TID deletes, cache flushes, stats
  reads) before the hardware must drain them.
- Under the current 128-entry limit, heavy peer churn makes
  `ath12k_hal_reo_cmd_send()` fall off the ring and return `-ENOBUFS`
  (`drivers/net/wireless/ath/ath12k/hal_rx.c:223-236`), which propagates
  straight back to callers via `ath12k_dp_reo_cmd_send()`
  (`drivers/net/wireless/ath/ath12k/dp_rx.c:650-667`) and leaves TID
  teardown paths dropping the descriptor while firmware still references
  it—exactly the “queuing failures” and memory corruption observed
  during stress.
- Ath11k has already shipped with the same 256-entry setting
  (`drivers/net/wireless/ath/ath11k/dp.h:218`), so the larger ring size
  is a proven, firmware-compatible configuration for this hardware
  family rather than a new feature.
- The cost of doubling this DMA ring is only ~6 KiB (256 × 48-byte
  entries), and the SRNG limits in `hal.c/hal.h` leave ample headroom,
  so the change is low risk and entirely contained to ath12k datapath
  setup.
- Because it prevents a real-world failure that can take the device
  down, while touching only one constant, the patch squarely fits the
  stable rules (important bugfix, minimal surface area, no architectural
  churn).

Natural follow-up for stable maintainers:
1. Consider also backporting the subsequent ath12k retry fix for REO RX
   queue updates to cover any residual overflow scenarios that might
   still appear beyond the expanded ring capacity.

 drivers/net/wireless/ath/ath12k/dp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath12k/dp.h b/drivers/net/wireless/ath/ath12k/dp.h
index 7baa48b86f7ad..10093b4515882 100644
--- a/drivers/net/wireless/ath/ath12k/dp.h
+++ b/drivers/net/wireless/ath/ath12k/dp.h
@@ -184,7 +184,7 @@ struct ath12k_pdev_dp {
 #define DP_REO_REINJECT_RING_SIZE	32
 #define DP_RX_RELEASE_RING_SIZE		1024
 #define DP_REO_EXCEPTION_RING_SIZE	128
-#define DP_REO_CMD_RING_SIZE		128
+#define DP_REO_CMD_RING_SIZE		256
 #define DP_REO_STATUS_RING_SIZE		2048
 #define DP_RXDMA_BUF_RING_SIZE		4096
 #define DP_RX_MAC_BUF_RING_SIZE		2048
-- 
2.51.0




More information about the ath12k mailing list