[PATCH ath-next 1/2] wifi: ath12k: Make RXDMA buffer ring size configurable per memory profile

Rameshkumar Sundaram rameshkumar.sundaram at oss.qualcomm.com
Thu Oct 8 09:23:09 PDT 2026


On 10/7/2026 2:53 PM, Aaradhana Sahu wrote:
> Currently, the RXDMA buffer ring size is hardcoded to 4096 and shared
> across all memory profiles. This prevents individual profiles from tuning
> the ring size based on their memory and performance requirements.
> 
> Add the RXDMA buffer ring size to the memory profile configuration and
> implement ath12k_dp_rxdma_buf_ring_size() static inline function to
> access the configured value. This allows different memory profiles to
> select an appropriate ring size based on available system resources.
> 
> The function follows the pattern established in the previous patch for

Previous patch? Did you forget to add a reference?

Or maybe we can just say:
"The function follows the existing pattern of DP ring size helpers, 
taking struct ..."

TBH, I'd prefer to drop this paragraph entirely since it's already 
apparent from the code.


> other DP profile parameters, taking struct ath12k_dp_profile_params
> pointer as argument.
> 
> 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: Aaradhana Sahu <aaradhana.sahu at oss.qualcomm.com>
> ---
>   drivers/net/wireless/ath/ath12k/core.c  | 2 ++
>   drivers/net/wireless/ath/ath12k/dp.h    | 8 +++++++-
>   drivers/net/wireless/ath/ath12k/dp_rx.c | 2 +-
>   3 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c
> index e527b59ecba5..764e646d0090 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 = 4096,
>   		},
>   	},
>   [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/dp.h b/drivers/net/wireless/ath/ath12k/dp.h
> index c53eac20b989..108e27dd5797 100644
> --- a/drivers/net/wireless/ath/ath12k/dp.h
> +++ b/drivers/net/wireless/ath/ath12k/dp.h
> @@ -31,6 +31,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;
>   };
>   
>   #define DP_MON_PURGE_TIMEOUT_MS     100
> @@ -210,7 +211,6 @@ struct ath12k_pdev_dp {
>   #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
> @@ -730,6 +730,12 @@ ath12k_dp_rx_release_ring_size(const struct ath12k_dp_profile_params *p)
>   	return p->rx_release_ring_size;
>   }
>   
> +static inline u32
> +ath12k_dp_rxdma_buf_ring_size(const struct ath12k_dp_profile_params *p)
> +{
> +	return p->rxdma_buf_ring_size;
> +}
> +
>   void ath12k_dp_vdev_tx_attach(struct ath12k *ar, struct ath12k_link_vif *arvif);
>   void ath12k_dp_partner_cc_init(struct ath12k_base *ab);
>   int ath12k_dp_pdev_alloc(struct ath12k_base *ab);
> diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
> index cfaf26ae2720..36be543b7c50 100644
> --- a/drivers/net/wireless/ath/ath12k/dp_rx.c
> +++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
> @@ -1699,7 +1699,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);
> +				   ath12k_dp_rxdma_buf_ring_size(dp_params));
>   	if (ret) {
>   		ath12k_warn(ab, "failed to setup rx_refill_buf_ring\n");
>   		return ret;
> 


-- 
Ramesh



More information about the ath12k mailing list