Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp2054100lqe; Tue, 9 Apr 2024 08:18:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXoaCuqsWmqYp/A76KRek5N45o34xIfqpnjERd16KXZ+Q0JmYnmaOkbuh2CQqcq09eELWsfiIS5zf0UkC13d3bZHymtaF2C28L6zMHwpw== X-Google-Smtp-Source: AGHT+IEYWQIDZ8To4LaxkkbA0iUNZbuo1UR4LFHXseEdqldzvUPILXMMBgw4Xhd9G/69dPdII/17 X-Received: by 2002:a05:6870:d622:b0:229:f9fa:df52 with SMTP id a34-20020a056870d62200b00229f9fadf52mr13275830oaq.12.1712675911805; Tue, 09 Apr 2024 08:18:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712675911; cv=pass; d=google.com; s=arc-20160816; b=KP9poFaEJKKw9A7G39czlUDupgtbobEuL7kyps04c+LdRpw6YzclWOBcTtqkOu/rHi 5hZAmT86puB9BXGhalsO8r1f9224zlDw43Mc+eAtLRA5V6MbmYGkcfFSyfzevz27laWA 6SYpY+EAQo6nHNQsuOjAuTPBs6xNAy6C4QC9fjLqICR/gQgq1orIZeTaoNzOVEyRj3Nn rVuknf3AFea11TugBNjfiefPLPPN0OXwgB3zNpXpVOqqgzfYtZDjOXld1OZIwptAz8CP S2i3Tv9AZqK3tOVxhbSI0hP/ogIuhhnC7mEoc2PvKgigMMPxC/mW/WDvNk3A7Ghdrn2Y whMQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=awwxh7cg/+AvTEaIf5xaM20oDbqFazrBTIi79sYy7Hk=; fh=7iiypJ+oGt9UGx3nKIdasSzU1wwh8hqszmbHUQ8adLM=; b=dz8Z/ln6y1nSr6EQ5IH1g9ovy0J7IuiW4i//RjKO/EVk18GOsBmAtP2H0lYT1PnQoy u+YF0ktQVlho6RTCvvl2L2XMizDfI9mWi6ESks4QFx128ARwl+1NNdfoX3XnLNW3LUhc 9BlMniYKz/pEmUa0JN3eda731GPpwrl/BZ1qQNe3diqmcevDMPWEJbvH1RsV4LZRy5J5 WIUqTaHOyQow7bEv3SP2k82AetoufSmqKQkRRQoJUzHQT3lqZ1Zq7ct7r7BYGyWCntKq 7oXNXTOwTiPoo2ZGadb3JzuSgAOkt3ZpIXihHQ3lIf0LwwQElY1yzSuCmk4poJ/9tYtp PmKQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=GSajjFFO; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-6031-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6031-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id cz19-20020a056102291300b0047a19d27fe5si182489vsb.34.2024.04.09.08.18.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 08:18:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6031-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=GSajjFFO; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-6031-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6031-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6F91B1C2031B for ; Tue, 9 Apr 2024 15:18:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B4F6513C91E; Tue, 9 Apr 2024 15:14:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="GSajjFFO" X-Original-To: linux-wireless@vger.kernel.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 2407D13C906 for ; Tue, 9 Apr 2024 15:14:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712675678; cv=none; b=F36W1vphGbQW2gb2bedJA7OcA/2TdGEFV9v0HiE4P5VzlKORPzONyN4yu7vSg2LqDR8WPLEfIrSOAmt8Kx8mynunkKQ54y+q0szmpQqaCamHYPRe7eeuVEwCG4Se9THK5TaaQx7MCMnIogPmDcwJzeuGD7IExFfG538uPOO11WA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712675678; c=relaxed/simple; bh=joqA+QmIExyf8fFXyuAS5nH1v09h2MJz4iZtb7rIZH0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=mR6lqypnvjZOu/NRrk/1q+b131HVvu1FYjPrXpH6PAxdiRynJMzdD/KQi77fBPF67RjR3C0Vh97qAdLQcH+oiyWtJAwQuprhZW7hAMFAtW0wNIWb4480+e5VA5dzRJKqtTx1RdjLJN0Zd3gMbUPYGOipOWP6Re7mIXChcF9USG4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=GSajjFFO; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 439CpMAh016113; Tue, 9 Apr 2024 15:14:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= qcppdkim1; bh=awwxh7cg/+AvTEaIf5xaM20oDbqFazrBTIi79sYy7Hk=; b=GS ajjFFOmFCwuXCGFD4+gcMDPaw9vsnmnbyVQRKg36Zo+fE/iyWz9aXR0FFL1N/wHM gbpvvH4yJIG56XdQ14SgRVtBlBZHQ+2gdl7Rl8IMlP/OFLTWxoce6yMiYJGa/O52 dCTAhirYAllqml9g7HeOPtTliX3HXLlMqPS+0USaijZOgfKBUyZIwfbMP+baaJAO 1YBv5rjc0aNTur65vsdpB4+54zJzreniUSvfLnKCsp/ooppu3p9TOjUZU8u9YtbL hEcUD8SZuJa1rTqQVTRQpj/netUvs8rGHYyP6njHCgShvmO0EMNk6GsusUHCxFPZ /zhwuql/o1Sd71TrrW/A== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xd61v8baw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 09 Apr 2024 15:14:33 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 439FEWdH020465 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 9 Apr 2024 15:14:32 GMT Received: from hu-periyasa-blr.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Tue, 9 Apr 2024 08:14:30 -0700 From: Karthikeyan Periyasamy To: CC: , Karthikeyan Periyasamy , Jeff Johnson Subject: [PATCH v2 1/4] wifi: ath12k: avoid redundant code in Rx cookie conversion init Date: Tue, 9 Apr 2024 20:44:12 +0530 Message-ID: <20240409151415.1226109-2-quic_periyasa@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240409151415.1226109-1-quic_periyasa@quicinc.com> References: <20240409151415.1226109-1-quic_periyasa@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: NBNlOK4Z2qqHcU1m5qDG597R8pKtsYKS X-Proofpoint-GUID: NBNlOK4Z2qqHcU1m5qDG597R8pKtsYKS X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-09_10,2024-04-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 adultscore=0 mlxlogscore=895 impostorscore=0 phishscore=0 clxscore=1015 lowpriorityscore=0 spamscore=0 mlxscore=0 bulkscore=0 priorityscore=1501 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404090100 Currently, in the Rx data path cookie conversion initialization procedure, the primary page table index (ppt_idx) is computed within the secondary page table iteration. However this is invariant, and hence the ppt_idx should be calculated outside of the iteration to avoid repeated execution of the statement. Found in code review. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00188-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: Karthikeyan Periyasamy Acked-by: Jeff Johnson --- drivers/net/wireless/ath/ath12k/dp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath12k/dp.c b/drivers/net/wireless/ath/ath12k/dp.c index a0aa8c571867..796c757c0f58 100644 --- a/drivers/net/wireless/ath/ath12k/dp.c +++ b/drivers/net/wireless/ath/ath12k/dp.c @@ -1425,10 +1425,11 @@ static int ath12k_dp_cc_desc_init(struct ath12k_base *ab) } tx_spt_page = i + pool_id * ATH12K_TX_SPT_PAGES_PER_POOL; + ppt_idx = ATH12K_NUM_RX_SPT_PAGES + tx_spt_page; + dp->spt_info->txbaddr[tx_spt_page] = &tx_descs[0]; for (j = 0; j < ATH12K_MAX_SPT_ENTRIES; j++) { - ppt_idx = ATH12K_NUM_RX_SPT_PAGES + tx_spt_page; tx_descs[j].desc_id = ath12k_dp_cc_cookie_gen(ppt_idx, j); tx_descs[j].pool_id = pool_id; list_add_tail(&tx_descs[j].list, -- 2.34.1