[PATCH ath-next] wifi: ath12k: change MAC buffer ring size to 4096
Shawn Guo
shengchao.guo at oss.qualcomm.com
Tue Oct 27 08:36:40 PDT 2026
+ stable list
On Mon, Oct 26, 2026 at 05:47:31PM -0700, Jeff Johnson wrote:
> On 10/22/2026 8:44 PM, Shawn Guo wrote:
> > + Jeff
> >
> > On Fri, Oct 23, 2026 at 11:13:56AM +0800, Baochen Qiang wrote:
> >>
> >>
> >> On 10/23/2026 10:43 AM, Shawn Guo wrote:
> >>> On Fri, Oct 23, 2026 at 10:13:18AM +0800, Baochen Qiang wrote:
> >>>> On 10/22/2026 9:44 PM, Shawn Guo wrote:
> >>>
> >>> [...]
> >>>
> >>>>> I bisected drivers/net/wireless/ath/ath12k between v7.3 (broken) and
> >>>>> the ath tag (working). It lands on:
> >>>>>
> >>>>> 15f7603b69a8 ("wifi: ath12k: Increase RXDMA buffer ring size for default memory profile")
> >>>>>
> >>>>> The previous commit, 643f0bf93617, still has 4096 entries and is broken.
> >>>>> 15f7603b69a8 changes one line, .rxdma_buf_ring_size from 4096 to 8192,
> >>>>> and works.
> >>>>
> >>>> thanks for sharing this. I can repro it using the 481 firmware once get 15f7603b69a8 reverted.
> >>>
> >>> Thanks for confirming!
> >>>
> >>>> so the rule here seems that rxdma_buf_ring_size must be at least twice as large as
> >>>> DP_RX_MAC_BUF_RING_SIZE (I also tries four times large, it works). This rule looks
> >>>> reasonable to me, since WCN7850 get twos HW MACs and its firmware setups rx_mac_buf ring
> >>>> for each, and each ring fills itself using the buffers all from the single RXDMA buffer ring.
> >>>>
> >>>> maybe I should submit a patch mandate this rule.
> >>>
> >>> I'm more concerned about how we would fix the regression for 7.3.x stable
> >>> kernel.
> >>
> >> we can try to ask stable team to backport 15f7603b69a8 ?
> >
> > Ok, I can do the backport after the commit lands mainline, assuming it's
> > part of Jeff's PR for 7.4 merge window.
> It's in Linus' tree now
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=15f7603b69a83a0acc7fcc8992ecbea6110f9424
>
> Would obviously need to backport the entire series:
> https://lore.kernel.org/all/20261007-mpp_ws-v1-0-739b1fb87d24@oss.qualcomm.com/
Thanks for the pointers, Jeff!
If we want to backport the series as it is, we will need to cherry pick
the following 9 commits onto 7.3 stable kernel.
wifi: ath12k: Increase RXDMA buffer ring size for default memory profile
wifi: ath12k: Make RXDMA buffer ring size configurable per memory profile
wifi: ath12k: convert DP_RX_RELEASE_RING_SIZE to inline helper
wifi: ath12k: convert ATH12K_RX_DESC_COUNT to inline helper
wifi: ath12k: convert ATH12K_NUM_POOL_TX_DESC to inline helper
wifi: ath12k: convert DP_RXDMA_MONITOR_DST_RING_SIZE to inline helper
wifi: ath12k: convert DP_RXDMA_MONITOR_BUF_RING_SIZE to inline helper
wifi: ath12k: convert DP_TX_COMP_RING_SIZE to inline helper
wifi: ath12k: move dp_profile_params to dp.h
Since most of them are not qualified as stable materials, I'm considering
the adapted patch below. What do you think?
Shawn
---8<------
>From 7cb5ef07401ce8c8f0d512bb3a6521a5451046d7 Mon Sep 17 00:00:00 2001
From: Pavankumar Nandeshwar <pavankumar.nandeshwar at oss.qualcomm.com>
Date: Wed, 7 Oct 2026 14:53:33 +0530
Subject: [PATCH] wifi: ath12k: Increase RXDMA buffer ring size for default
memory profile
commit 15f7603b69a83a0acc7fcc8992ecbea6110f9424 upstream.
commit 643f0bf936176c114d5631da7547e991b5d99f10 upstream.
The default RXDMA buffer ring size of 4096 entries can become a
bottleneck under high RX traffic load, resulting in reduced receive
throughput due to limited buffer availability.
Increase the RXDMA buffer ring size to 8192 entries for the default
memory profile to provide additional RX buffering and improve RX packet
processing efficiency.
This increases memory consumption by approximately 9-10 MiB and improves
RX throughput by ~20% with the default memory profile
(ATH12K_QMI_MEMORY_MODE_DEFAULT).
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3
Tested-on: QCC2072 hw1.0 PCI WLAN.COL.1.0.c2-00074-QCACOLSWPL_V1_TO_SILICONZ-1
Signed-off-by: Pavankumar Nandeshwar <pavankumar.nandeshwar at oss.qualcomm.com>
Signed-off-by: Aaradhana Sahu <aaradhana.sahu at oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang at oss.qualcomm.com>
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram at oss.qualcomm.com>
Link: https://patch.msgid.link/20261007-mpp_ws-v1-2-739b1fb87d24@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson at oss.qualcomm.com>
Backport rationale (not part of the upstream message):
v7.3 contains 58aeb412495a ("wifi: ath12k: change MAC buffer ring size
to 4096"), which sets DP_RX_MAC_BUF_RING_SIZE to 4096 while the RXDMA
buffer ring is also 4096 entries. With WCN7850 hw2.0 and the older
firmware WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 (still
shipped by Debian trixie, firmware-atheros 20250410-2), every WMI
command then times out once the interface is brought up:
ath12k_wifi7_pci 0004:01:00.0: wmi command 16387 timeout
ath12k_wifi7_pci 0004:01:00.0: failed to send WMI_PDEV_SET_PARAM cmd
ath12k_wifi7_pci 0004:01:00.0: failed to enable PMF QOS: -11
ath12k_wifi7_pci 0004:01:00.0: fail to start mac operations in pdev idx 0 ret -11
so WiFi does not work at all on affected systems. With the RXDMA buffer
ring at 8192 entries, v7.3 works with the same firmware. Per Yingying
Tang, the RXDMA buffer ring needs to be at least twice
DP_RX_MAC_BUF_RING_SIZE (four times also works): WCN7850 has two
hardware MACs, the firmware sets up an rx_mac_buf ring for each, and
both fill themselves from the single RXDMA buffer ring. Newer firmware
(WLAN.HMT.1.1.c5-00302 and later) is not affected.
Reverting 58aeb412495a is not preferable, as that gives up the
throughput improvement it provides for newer firmware.
Fixes: 58aeb412495a ("wifi: ath12k: change MAC buffer ring size to 4096")
[ Adapted for 7.3: 643f0bf93617 ("wifi: ath12k: Make RXDMA buffer ring
size configurable per memory profile"), on which this commit depends,
is not in 7.3 and does not apply because the profile parameters
structure lives in core.h here. Fold its rxdma_buf_ring_size field
and DP_RXDMA_BUF_RING_SIZE(ab) accessor into this backport. Values are
as upstream after both commits: 8192 for the default profile and 4096
for the low-512M profile. ]
Signed-off-by: Shawn Guo <shengchao.guo at oss.qualcomm.com>
---
drivers/net/wireless/ath/ath12k/core.c | 2 ++
drivers/net/wireless/ath/ath12k/core.h | 1 +
drivers/net/wireless/ath/ath12k/dp.h | 3 ++-
drivers/net/wireless/ath/ath12k/dp_rx.c | 2 +-
4 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c
index b0107cde99ff..b25202effb00 100644
--- a/drivers/net/wireless/ath/ath12k/core.c
+++ b/drivers/net/wireless/ath/ath12k/core.c
@@ -54,6 +54,7 @@ ath12k_mem_profile_based_param ath12k_mem_profile_based_param[] = {
.num_pool_tx_desc = 32768,
.rx_desc_count = 12288,
.rx_release_ring_size = 16384,
+ .rxdma_buf_ring_size = 8192,
},
},
[ATH12K_QMI_MEMORY_MODE_LOW_512_M] = {
@@ -68,6 +69,7 @@ ath12k_mem_profile_based_param ath12k_mem_profile_based_param[] = {
.num_pool_tx_desc = 16384,
.rx_desc_count = 6144,
.rx_release_ring_size = 8192,
+ .rxdma_buf_ring_size = 4096,
},
},
};
diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h
index 93fd227b4d19..6941cd41551d 100644
--- a/drivers/net/wireless/ath/ath12k/core.h
+++ b/drivers/net/wireless/ath/ath12k/core.h
@@ -934,6 +934,7 @@ struct ath12k_dp_profile_params {
u32 num_pool_tx_desc;
u32 rx_desc_count;
u32 rx_release_ring_size;
+ u32 rxdma_buf_ring_size;
};
struct ath12k_mem_profile_based_param {
diff --git a/drivers/net/wireless/ath/ath12k/dp.h b/drivers/net/wireless/ath/ath12k/dp.h
index bef0f2ba0560..53f7cd990892 100644
--- a/drivers/net/wireless/ath/ath12k/dp.h
+++ b/drivers/net/wireless/ath/ath12k/dp.h
@@ -202,10 +202,11 @@ struct ath12k_pdev_dp {
#define DP_REO_REINJECT_RING_SIZE 32
#define DP_RX_RELEASE_RING_SIZE(ab) \
((ab)->profile_param->dp_params.rx_release_ring_size)
+#define DP_RXDMA_BUF_RING_SIZE(ab) \
+ ((ab)->profile_param->dp_params.rxdma_buf_ring_size)
#define DP_REO_EXCEPTION_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 4096
#define DP_RXDMA_REFILL_RING_SIZE 2048
#define DP_RXDMA_ERR_DST_RING_SIZE 1024
diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
index 8fa0e90b4531..d1f0ac152dd4 100644
--- a/drivers/net/wireless/ath/ath12k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
@@ -1702,7 +1702,7 @@ int ath12k_dp_rx_alloc(struct ath12k_base *ab)
ret = ath12k_dp_srng_setup(ab,
&dp->rx_refill_buf_ring.refill_buf_ring,
HAL_RXDMA_BUF, 0, 0,
- DP_RXDMA_BUF_RING_SIZE);
+ DP_RXDMA_BUF_RING_SIZE(ab));
if (ret) {
ath12k_warn(ab, "failed to setup rx_refill_buf_ring\n");
return ret;
--
2.47.3
More information about the ath12k
mailing list