Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp298203lqg; Thu, 11 Apr 2024 03:22:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW5sn0fD6aEJ4TUnAf8GcTjnCIi0AHuQufKIY3JHdM50cIRviKvC4wEWQplBMabQYFvfdaa6UZR+1q8+XGtfNeQcdWAJ1rZy6VTmFzT9A== X-Google-Smtp-Source: AGHT+IE1h1MfGkIxnVpI2geCVWi4SW1yoUWBEf9DvS9zMG3vZRUafH+imHFyEUBRnJc0qFzATF7l X-Received: by 2002:a05:622a:188c:b0:434:f629:fa6c with SMTP id v12-20020a05622a188c00b00434f629fa6cmr6346952qtc.14.1712830974114; Thu, 11 Apr 2024 03:22:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712830974; cv=pass; d=google.com; s=arc-20160816; b=ztcsnrIix2GahJtyd6UVW5sx1lsi89RHfxBZd72JmP3mfkhtI7EcOcP0BOa9NTgQXF RQgOoQzYnIAlYVSQoK11/Nqb+E5yWbBLWYQsWdQ7KjRMqYLSaIZvxk3AZiteDuCmO6OS aRWzBpIvtQeUGH6Zv96qGC2RY+slOXmOt2WkRqM4Qc2Bfr3L0zmOnbIYIx9s6Z7ldLg0 iaYaIpqTe7mcYzLQaAQo7qAW61WuGr/pkN6NuzpV8BkrtQK3gq781MsPPRYS71ppY8X4 oXl6dOsCSKr4Ogyl1RRvn+68jFmnKq+Cb/yYQGZ92FBON7UlGXokeiWl3fRqXqbGOUXL ueSg== 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=Y+q6ux64b1oov8PENcN1JGR5QfreOWJYN4lzhPrIoxLoD/6/OUwSAgGPqi8xcj/tig T7aBJSeXzwEvEb49MUgEEZUTAhhFlfiCt2VSh+1jIrx5ImDRWDbRLbPX1guV3e7U0dZu /OxvnXKFT5c0NC3/C9cLW586jkD61nj4Nl9QFVBTACXX/ThoNDfvKoBPZwdAEvy78zhw YlMynEJKa7WIdTgPAmdv/e0LHgzLuA/2DF3V1tnO0G+TsLnGz4yoOcyw4md4mzwrkwJp 38wbJdrSinsQyinfzzn7zeHhTA1eJLeLYQhKld1M0YoS5aaKeItWjAQePcLQZN7wWMgk JHHA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=RrZFJyr6; 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-6160-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6160-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. [147.75.199.223]) by mx.google.com with ESMTPS id a15-20020a05622a02cf00b0043670f48cfesi391123qtx.398.2024.04.11.03.22.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 03:22:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6160-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=RrZFJyr6; 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-6160-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6160-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 C8D1C1C21711 for ; Thu, 11 Apr 2024 10:22:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 162DF1465BF; Thu, 11 Apr 2024 10:22:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="RrZFJyr6" 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 76D8613FD94 for ; Thu, 11 Apr 2024 10:22:51 +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=1712830973; cv=none; b=fHvGYOUK3UGyG2Wb7HTavN81D9qmQfFsVxQ1x9mNmbHnLZLTsXzNUptDH68o41eTZW1QcAXTFPLPR0Pyc3zWgTtSv6LKjIS/LA0Aq3hzZNeZ9nLq8sDZOdCBAmO73zppHwXScHmw2JqKa3rpYlgRvt4ALYeBK2WBUwa/6B/WkZ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712830973; c=relaxed/simple; bh=joqA+QmIExyf8fFXyuAS5nH1v09h2MJz4iZtb7rIZH0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=K5oQ7Zwm5ifkU20gAk+nVEyBosgCHj1QucL0nz5N5cPIgQYO5aFHhQTMJHQiht6+dhgjHdk3+soM6EkXaafBVEKD8FmtxsjlWyGnx2gHuDFtW5FzYVZq5uFb5uDhAgJeWxIsAsSrg7VlcSZcf5joky89m1NAxe3VvDcNqPjwXDM= 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=RrZFJyr6; 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 (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 43B8Eo5M032381; Thu, 11 Apr 2024 10:22:44 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=Rr ZFJyr6pYvpGWVRDHKO7V8fThyIKAZ47i34ObSwHLtHaDpMtS4u3IDD2TeE4rE5jW Ho1Zt4YjkjO1FyhOL8VsGgiiRjfUTVogXoO7fDBONOYOK4f6QvFKgTX1Dbf3ymD+ y3gSU8Q+tFJXFimXCdLl2II257/rEwL8cvzmOWz5GmJgVagRzAxeN06iq2XrwUdE WP7AgYSgel8ngBLzWwwDhIUufMFv8mtCIMwiqhXV+AmYX7b674OUmsyXFj4k7Dht VPXYDszUsrT2w9JJQzMI9YyS3tH/Kb0DE7JQQ8lRHBRxKCiMnBBALJ8yfexQ+gu1 XxL0lqJxcZaDTyq4hnsw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xec6dgjgc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 11 Apr 2024 10:22:44 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 43BAMh2O019661 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 11 Apr 2024 10:22:43 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; Thu, 11 Apr 2024 03:22:41 -0700 From: Karthikeyan Periyasamy To: CC: , Karthikeyan Periyasamy , Jeff Johnson Subject: [PATCH v3 1/4] wifi: ath12k: avoid redundant code in Rx cookie conversion init Date: Thu, 11 Apr 2024 15:52:23 +0530 Message-ID: <20240411102226.4045323-2-quic_periyasa@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240411102226.4045323-1-quic_periyasa@quicinc.com> References: <20240411102226.4045323-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: nasanex01a.na.qualcomm.com (10.52.223.231) 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-GUID: 9TZ6RCVvHO5ZHOpAeQqBrqF4f_R8bh93 X-Proofpoint-ORIG-GUID: 9TZ6RCVvHO5ZHOpAeQqBrqF4f_R8bh93 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-11_04,2024-04-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 phishscore=0 bulkscore=0 malwarescore=0 impostorscore=0 priorityscore=1501 mlxlogscore=895 lowpriorityscore=0 mlxscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404110074 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