Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH 7.3.y] wifi: ath12k: Increase RXDMA buffer ring size for default memory profile
@ 2026-10-29  9:55 Shawn Guo
  2026-10-29 10:14 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Shawn Guo @ 2026-10-29  9:55 UTC (permalink / raw)
  To: stable
  Cc: Greg Kroah-Hartman, Sasha Levin, Jeff Johnson,
	Rameshkumar Sundaram, Yingying Tang, Baochen Qiang,
	Manivannan Sadhasivam, ath12k, linux-wireless, linux-arm-msm,
	linux-kernel, Pavankumar Nandeshwar, Aaradhana Sahu, Jeff Johnson,
	Shawn Guo

From: Pavankumar Nandeshwar <pavankumar.nandeshwar@oss.qualcomm.com>

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@oss.qualcomm.com>
Signed-off-by: Aaradhana Sahu <aaradhana.sahu@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Link: https://patch.msgid.link/20261007-mpp_ws-v1-2-739b1fb87d24@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

Backport rationale:

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 Baochen
Qiang, 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.

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.

Fixes: 58aeb412495a ("wifi: ath12k: change MAC buffer ring size to 4096")
Signed-off-by: Shawn Guo <shengchao.guo@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


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

* Re: [PATCH 7.3.y] wifi: ath12k: Increase RXDMA buffer ring size for default memory profile
  2026-10-29  9:55 [PATCH 7.3.y] wifi: ath12k: Increase RXDMA buffer ring size for default memory profile Shawn Guo
@ 2026-10-29 10:14 ` Greg Kroah-Hartman
  2026-10-29 13:29   ` Shawn Guo
  0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2026-10-29 10:14 UTC (permalink / raw)
  To: Shawn Guo
  Cc: stable, Sasha Levin, Jeff Johnson, Rameshkumar Sundaram,
	Yingying Tang, Baochen Qiang, Manivannan Sadhasivam, ath12k,
	linux-wireless, linux-arm-msm, linux-kernel,
	Pavankumar Nandeshwar, Aaradhana Sahu, Jeff Johnson

On Thu, Oct 29, 2026 at 05:55:41PM +0800, Shawn Guo wrote:
> From: Pavankumar Nandeshwar <pavankumar.nandeshwar@oss.qualcomm.com>
> 
> commit 15f7603b69a83a0acc7fcc8992ecbea6110f9424 upstream.
> commit 643f0bf936176c114d5631da7547e991b5d99f10 upstream.

Huh?


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

* Re: [PATCH 7.3.y] wifi: ath12k: Increase RXDMA buffer ring size for default memory profile
  2026-10-29 10:14 ` Greg Kroah-Hartman
@ 2026-10-29 13:29   ` Shawn Guo
  2026-10-29 13:52     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Shawn Guo @ 2026-10-29 13:29 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: stable, Sasha Levin, Jeff Johnson, Rameshkumar Sundaram,
	Yingying Tang, Baochen Qiang, Manivannan Sadhasivam, ath12k,
	linux-wireless, linux-arm-msm, linux-kernel,
	Pavankumar Nandeshwar, Aaradhana Sahu, Jeff Johnson

On Thu, Oct 29, 2026 at 11:14:27AM +0100, Greg Kroah-Hartman wrote:
> On Thu, Oct 29, 2026 at 05:55:41PM +0800, Shawn Guo wrote:
> > From: Pavankumar Nandeshwar <pavankumar.nandeshwar@oss.qualcomm.com>
> > 
> > commit 15f7603b69a83a0acc7fcc8992ecbea6110f9424 upstream.
> > commit 643f0bf936176c114d5631da7547e991b5d99f10 upstream.
> 
> Huh?

Hi Greg,

These two commits landed on upstream as a series [1], which doesn't
apply to 7.3.y, due to missing prerequisite changes below.

  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

So I adapted them into one backporting commit. I'm open to suggestions
how this should be handled.

Shawn

[1] https://lore.kernel.org/all/20261007-mpp_ws-v1-0-739b1fb87d24@oss.qualcomm.com/

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

* Re: [PATCH 7.3.y] wifi: ath12k: Increase RXDMA buffer ring size for default memory profile
  2026-10-29 13:29   ` Shawn Guo
@ 2026-10-29 13:52     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2026-10-29 13:52 UTC (permalink / raw)
  To: Shawn Guo
  Cc: stable, Sasha Levin, Jeff Johnson, Rameshkumar Sundaram,
	Yingying Tang, Baochen Qiang, Manivannan Sadhasivam, ath12k,
	linux-wireless, linux-arm-msm, linux-kernel,
	Pavankumar Nandeshwar, Aaradhana Sahu, Jeff Johnson

On Thu, Oct 29, 2026 at 09:29:11PM +0800, Shawn Guo wrote:
> On Thu, Oct 29, 2026 at 11:14:27AM +0100, Greg Kroah-Hartman wrote:
> > On Thu, Oct 29, 2026 at 05:55:41PM +0800, Shawn Guo wrote:
> > > From: Pavankumar Nandeshwar <pavankumar.nandeshwar@oss.qualcomm.com>
> > > 
> > > commit 15f7603b69a83a0acc7fcc8992ecbea6110f9424 upstream.
> > > commit 643f0bf936176c114d5631da7547e991b5d99f10 upstream.
> > 
> > Huh?
> 
> Hi Greg,
> 
> These two commits landed on upstream as a series [1], which doesn't
> apply to 7.3.y, due to missing prerequisite changes below.
> 
>   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
> 
> So I adapted them into one backporting commit. I'm open to suggestions
> how this should be handled.

Backport them all please.

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

end of thread, other threads:[~2026-10-29 13:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-29  9:55 [PATCH 7.3.y] wifi: ath12k: Increase RXDMA buffer ring size for default memory profile Shawn Guo
2026-10-29 10:14 ` Greg Kroah-Hartman
2026-10-29 13:29   ` Shawn Guo
2026-10-29 13:52     ` Greg Kroah-Hartman

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