From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA7E946A600 for ; Wed, 7 Oct 2026 09:23:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791365069; cv=none; b=YNqcaW4pkfX1WgqcUai+2P4R5ErLUTk6cPWQKX0JvvXwNkPIP9AYqQCrHnhteovTJQj1cxfNczGiBeMOpXgEJ6ckmb+fGKaJ5SNFwWNC899x7Zt+3KhcsbyySq2URqTuqdA8n/bpryYZtSko4ddD694hvsXg8vIbQPsap+Cu+Pc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791365069; c=relaxed/simple; bh=36BExIcS3er/y0jorYgoz0YcrCOEOstH66XbKIRSceQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=G+vWu64Az/J+7F7344tgQkApjYXWTtUcSxcHtApz+XbWg+tpxs92q5OdSlHMuFQj5VGnlmV8sC+PPRjbKbu+yTcbdgcGRpyEO6ZxrIl9sxpR1nAObfb6Zh2hVNDvPq8n6RaiRUh/m4NsYmRDhoeyErCUwm7ZLbi2jtKysH2TL/Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=dL+TY5DM; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Hi0qa8ID; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="dL+TY5DM"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Hi0qa8ID" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6977jmWE3686138 for ; Wed, 7 Oct 2026 09:23:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= nfH7JOcpjrJI7edYv859MWGoxNpJwE5LbQPeiejX188=; b=dL+TY5DMr94OyHV1 zFtpHaewGEBY5fmV0lDs5JmKK+Y6M0QgFFPSsZLlhYD3jTa1NW5ZSCpCXh8cyBQV jJnt5hFYcopZfUQ+Pm7W3XRh+mqLWIHXXM5DhWx1d0+WwcJj0nBoVzJuq4IuCUSq wkgEa+Vb8jG7jMf6Z69pQk4P+Crsb7Y/YeM4FlMuCNF/IBNrwxj1oSYcDo137r+3 S5mo4ZoSGerUV0RrvPlaK84C45IZkhNP2Bm7XOab3SCDBc3nwwFxnOwZhUxJj0gP eyzxQeRhY0Xk9yX8vt64WLlA8axwYVDAtowXnXcf6uZcLvg1dGuEGpmV8gfqVMrf XEyXHQ== Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4h5c609eyq-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 07 Oct 2026 09:23:56 +0000 (GMT) Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-890a9a4e168so1064225b3a.2 for ; Wed, 07 Oct 2026 02:23:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1791365035; x=1791969835; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=nfH7JOcpjrJI7edYv859MWGoxNpJwE5LbQPeiejX188=; b=Hi0qa8IDT6pzf/rE6852JiwTP7A9IixDYYrvQEY3FgPgvaCM7yTHVIlbit1IVAv8Zv KSbZ8nOrIhUfaq/dKJqscIv1/2M2x7ib5tFwwnoRt1iBVFZjc/sUhYuOzMFudrM8+6oM onk0jTEBL64CRs1se8QnbeNI9PatyYlF2JvFU4fp2/uMdXFFCMh6Q/qdgGi7RdHkhSuo diP3K4MmXlybtJsOYSV8w13lQbM782pM1GTa47N/9eRFixE7GOvL6I8cdJklst7f3sC+ rRm4Qv8JXcQHXahxjXkcIfPVY5MiTtxEgMPYQrs5adwZ5usZ3AKRIpe0I6H4+YFfnqjd GhMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791365035; x=1791969835; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=nfH7JOcpjrJI7edYv859MWGoxNpJwE5LbQPeiejX188=; b=JPG7A8U/fM/X+v87sNxYyuB1DW5dNl/9CLRojurCH0iYIIP6Q4uCD/drFJ+A5FMjMh 0CDQiYtZUxAyScrW3qMGVNeHLNUtdD8xq0kyU0rjH/uZ/nbOu+gY6kndMO+tjilkUrD2 8FDQQvmPcU+G28jzDtzu0zxeU/xxhtm+qyvAh7pFSiDi5SioF6Kt3IhMPeHj4emsg3Aj xPF36SMbQ5bicF8uvvZwh664I//FKLzt+fjpgvgZYgD9iRkEdW7tWVPjiChagpAQtWYw mskUdc89cIPxy8o8f9idQYpwX9omet9C69tboA1wkC19PfSCrp7nrI/lZB5fNEzVFHKo hITQ== X-Forwarded-Encrypted: i=1; AKwUvBzXcteWd0On/oFEmsO/GD1sR+GTt/+JXEFZYrVVrFkErcje+X9uedFDEGNyh4FzJqUa2P5Dt5/sssg1Bik=@vger.kernel.org X-Gm-Message-State: AFuF++mOx63sZUwtzyy5x7hgoUC6zQRkgSCCgeCarUDR/X0sEzfSXM7r rS3VWLHd05oF6hcZoU4iQQALwnzfUXUjgh8tWurunqbxclZU8kmtvkO+s4czSNSiPKxwKMBgWrj ffC9CiXcbQ9ZPReUs3fTR1xEZFEAeja02nGPFioav880UewK+FlB0BqCAwB8dR1RLrmU= X-Gm-Gg: AYBFou29OyRE7wDU+y/aITdqXaOSmdaXFQcEYBUHuaOy6i4tc4WHE16th8eYckYs2vy DNQYLHiY5ZP+NZIkf9P1slGOuTH0ql+DHAv4Y7CRCVVMgzl6yQv1sq3sjr9cEms+XeAEZ+6tycT waK8pn9QO3nUWoHpjhlsJMbrFPDLPYHv3Y2goWgpcrdyAfUZZIJ5SdhePhJ39ki9ssPwrTkThjj DrAM3KXahwK9g8KTYg9DrnTyIwvgCU7KYgBzooBqO+EDDPAlMseuOWL+wILjx6ReafJTA9Y07jZ MDv8gqEv8NHcyMDoKTioPkyluwu1PX0+rQywGjd/gpwgnDAkJKHblRP/FYkHbNhhngiQSS22OT9 TQXNBy6n0QWumImo+frkst486DiVL0fsZzXBezt/u16JOWMtIExlgpd4JsTQFiVBeZtjOMceOs4 iisjislj65s3jVuIJUUVPUURs= X-Received: by 2002:a05:6a00:950a:b0:881:4b47:f30b with SMTP id d2e1a72fcca58-891b354d5d4mr1318712b3a.12.1791365035322; Wed, 07 Oct 2026 02:23:55 -0700 (PDT) X-Received: by 2002:a05:6a00:950a:b0:881:4b47:f30b with SMTP id d2e1a72fcca58-891b354d5d4mr1318696b3a.12.1791365034890; Wed, 07 Oct 2026 02:23:54 -0700 (PDT) Received: from hu-aarasahu-blr.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-89271257af8sm119128b3a.41.2026.10.07.02.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Oct 2026 02:23:54 -0700 (PDT) From: Aaradhana Sahu Date: Wed, 07 Oct 2026 14:53:32 +0530 Subject: [PATCH ath-next 1/2] wifi: ath12k: Make RXDMA buffer ring size configurable per memory profile Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261007-mpp_ws-v1-1-739b1fb87d24@oss.qualcomm.com> References: <20261007-mpp_ws-v1-0-739b1fb87d24@oss.qualcomm.com> In-Reply-To: <20261007-mpp_ws-v1-0-739b1fb87d24@oss.qualcomm.com> To: Jeff Johnson Cc: linux-wireless@vger.kernel.org, ath12k@lists.infradead.org, linux-kernel@vger.kernel.org, Aaradhana Sahu X-Mailer: b4 0.15.2 X-Proofpoint-ORIG-GUID: DzZOZEXx1KZ7VVSCx-tmqIuwPC9FOLXT X-Proofpoint-Spam-Info: AW1haW4tMjYxMDA3MDAzNyBTYWx0ZWRfX22bJ8htpAH65 MicKdAEC1dQyizgfDV+RN4ZDxeQyBzAcwRaP9rN0TVOq9rkeE1M2uIYYCsqmHWqJ/KW5Z+749ek VBordO/r8LSBMy0pYzb4nYEH923rWl0= X-Authority-Analysis: v=2.4 cv=PM+aavqC c=1 sm=1 tr=0 ts=6ac60fac cx=c_pps a=WW5sKcV1LcKqjgzy2JUPuA==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8 a=mg1aV8qigFYmQh57PbIA:9 a=QEXdDO2ut3YA:10 a=OpyuDcXvxspvyRM73sMx:22 X-Proofpoint-GUID: DzZOZEXx1KZ7VVSCx-tmqIuwPC9FOLXT X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDA3MDAzNyBTYWx0ZWRfX6DdCYufkg3w3 mU2LVYIB0tgr5OCHbUghA3IWttt5epfVRD+SxRVZKcDjNmfouxYrBMWDN2H/11Pn3f+Kp1qJ7b0 0wl5gJ3+2IicCpsF49KaC8jYw6Qu2X/qBPDehvgia84NE0pVXPAok4B4lybtpwhMvHTUA5m/XO9 MrPvvUvLTcfBEK6FvifAOLpLfDixR+VbLJPVsukNNPJbsZZQPLli7uYsPGa6Ttwpitj+ZA/iJN6 KoqKeRyY/nBf3lwkar9QdB2k6NZo6g1ulX5gYmvOErSKAjlrHF2AeNW7OqXchysc1FTnUAJaCCl InFOzuAZul7DYeMqQXFL+65Rm2dmjHQWOh6Ky4Dju+SeW5OaQSt8e/HqgQfw/5Td1vm0cAyQlms 3y0Nw7zLEYy9WoNC1/zdMuc68701CY+7aC5ED4ckxsiNSoelD2Wp0puqXZ1Olu3dcX9o0dVKjgB zxwNNBsNrt+2Tb1H+PQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-10-07_03,2026-10-06_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 clxscore=1015 adultscore=0 bulkscore=0 phishscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 lowpriorityscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2609040000 definitions=main-2610070037 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 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 --- 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; -- 2.34.1