Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp987rdb; Wed, 7 Feb 2024 18:30:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IFsMaSV7j6y9iHd0vAG8FsQexB0Y3xKiyNsxiLl5KGSc+CSgGMVbjiiJ7eDTQYkkrcqPIrG X-Received: by 2002:a17:902:e890:b0:1d9:f798:d1e3 with SMTP id w16-20020a170902e89000b001d9f798d1e3mr3214684plg.9.1707359450554; Wed, 07 Feb 2024 18:30:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707359450; cv=pass; d=google.com; s=arc-20160816; b=A0Zz1ft7u1wcfdKxNWqOsMneHAt4HpvXtfrzztVfx/vPaBwHdZKVbZrxjcQkmPc4Im Tp9WAecZV7g2Y8LZaM/Sy47lrpXiv66slnY2DRsLjPBFaH3r159e4tdqZTMSUK5lfgrF LWETWWLGzgjtKpcIXJQJgf84Mer6vA1syKUb1nG2mqZYq3qaVvajtkvmMGEnTgnLNse4 zTbLTjEF81+/B0BWYO0UFE6dGvwc/dg7KJFeyVKiNEhTadsa50WeCbzfVHO5i/z5GAnj 6lCllLK1hCX5TWcpV0jJHqRMjWTbuKoFMJHeaU0/tBOPQ8cfl/B2rAvj0s32v0kBDowH ZAvQ== 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; bh=iWVF+lX752jp1t/mb93dtybr96aJJJBWzuAf5wSlsvA=; fh=B0+RUGFa4+AGILSGpvnskQkZEvieIrVE3pmmp971PRo=; b=yapJmGIpiLiMg4ZuW5SBYOBhiz5Z63Ni0LRmPWIsd3AIYm+zOV6pUrayFKULxRp5LB l0+pCr4yaQxaLUENIyp/d1Sh8NyU4DZ0V2vbP9jLTtnSjUmhPXI8+NOf+PBA6qwVwa9y pKKpI/wjN2vUZjlhxLgXz552lTgUj/Nb5iv/gQMRNEfGHcfuSnF+xr+j5VaF5WjZ1fTv B5J67jbzzuGvLVTwg+sRtmfq8aWo30I37sDuOInWdeetIEeOqDT1aYx+mGyE4r7n0330 OBtjmsRSaWLbUw5LuK6gPIkz23o9p4Z6KlBeb7gwWACIxJIafpPi0vXdKT7Ok8NxMrQD Txkg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-3322-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3322-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCVLuU2STeW6Xf7vEeAaQPE7Grssssuz3b6Xt8feJXBrf9xJjhyVwF56jdM3AhiIfj0sfKl90Btq8sonGhZZ8Y/DdQ4+MffbNztihA9duQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x8-20020a170902ec8800b001d9c0a76cffsi3309479plg.126.2024.02.07.18.30.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 18:30:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3322-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-3322-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3322-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 373D428719B for ; Thu, 8 Feb 2024 02:30:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E5030200AE; Thu, 8 Feb 2024 02:30:38 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 70A4B1E89E for ; Thu, 8 Feb 2024 02:30:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707359438; cv=none; b=oa1SQ71eJ78JtDxIkDIWSaalcRXitn/0zJRsUVr7sq9t1OlxxD38eTRXuITXbrHsVk82SEsGKQwfwW4my6e6pdUdJQ2Rtqmj3JOcrUsElSQOEMDnnz7cXWsrNyO07Q6vni1G0TDlcWaA1IISZ2D193MPMMrhLIMC94goHQBzFVs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707359438; c=relaxed/simple; bh=/aLcYv5SaWRp5DwEd0pGRpAS1JIHIRTGJfEV4cA/Vno=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=e3RZucY1MFXNfqufksdHCmRHoTceyByYUYCLdHPbcJWmUMaUnGHwZCFiwHVDxubI5zp5CjOztvfHy9f3JxyosFIcoqb0fRACZ9q79OCai98tM0uHmLVYrn4eZ6Fbt7MXlLHtrLkBJA8lyMhaVPfwG1rNrnsg0q6EPEGmXubioRg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 4182UWSW0192115, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.95/5.92) with ESMTPS id 4182UWSW0192115 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 8 Feb 2024 10:30:32 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.32; Thu, 8 Feb 2024 10:30:32 +0800 Received: from [127.0.1.1] (172.16.17.45) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 8 Feb 2024 10:30:32 +0800 From: Ping-Ke Shih To: CC: , , , Subject: [PATCH 10/11] wifi: rtw89: reference quota mode when setting Tx power Date: Thu, 8 Feb 2024 10:28:56 +0800 Message-ID: <20240208022857.14379-11-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240208022857.14379-1-pkshih@realtek.com> References: <20240208022857.14379-1-pkshih@realtek.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: RTEXMBS02.realtek.com.tw (172.21.6.95) To RTEXMBS04.realtek.com.tw (172.21.6.97) X-KSE-ServerInfo: RTEXH36505.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback From: Po-Hao Huang Reference the current quota mode to avoid misleading warnings. This patch is required after supporting DBCC quota mode. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw89/mac.c | 3 +-- drivers/net/wireless/realtek/rtw89/mac_be.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw89/mac.c b/drivers/net/wireless/realtek/rtw89/mac.c index 33cc2ce4bb74..917bbc482560 100644 --- a/drivers/net/wireless/realtek/rtw89/mac.c +++ b/drivers/net/wireless/realtek/rtw89/mac.c @@ -5221,8 +5221,7 @@ bool rtw89_mac_get_txpwr_cr_ax(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx, u32 reg_base, u32 *cr) { - const struct rtw89_dle_mem *dle_mem = rtwdev->chip->dle_mem; - enum rtw89_qta_mode mode = dle_mem->mode; + enum rtw89_qta_mode mode = rtwdev->mac.qta_mode; u32 addr = rtw89_mac_reg_by_idx(rtwdev, reg_base, phy_idx); if (addr < R_AX_PWR_RATE_CTRL || addr > CMAC1_END_ADDR_AX) { diff --git a/drivers/net/wireless/realtek/rtw89/mac_be.c b/drivers/net/wireless/realtek/rtw89/mac_be.c index 6447353d35d3..320e88229971 100644 --- a/drivers/net/wireless/realtek/rtw89/mac_be.c +++ b/drivers/net/wireless/realtek/rtw89/mac_be.c @@ -1896,8 +1896,7 @@ static bool rtw89_mac_get_txpwr_cr_be(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx, u32 reg_base, u32 *cr) { - const struct rtw89_dle_mem *dle_mem = rtwdev->chip->dle_mem; - enum rtw89_qta_mode mode = dle_mem->mode; + enum rtw89_qta_mode mode = rtwdev->mac.qta_mode; int ret; ret = rtw89_mac_check_mac_en(rtwdev, (enum rtw89_mac_idx)phy_idx, -- 2.25.1