Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp13850rdg; Wed, 11 Oct 2023 18:49:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEfQdrG4rVEIB63vXf0Efd7k0KMNtChEpYoNVuL6vxsVnW8GI0SLZG2+cGHeqH5lRzxYIqV X-Received: by 2002:a05:6358:528f:b0:13f:411:c1a9 with SMTP id g15-20020a056358528f00b0013f0411c1a9mr30745697rwa.17.1697075391773; Wed, 11 Oct 2023 18:49:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697075391; cv=none; d=google.com; s=arc-20160816; b=F/yxjEVU0Ql8iFKAEoFZiYCpfDyjUFnH+xeCuhtHrGO8WcGJ32MXPE+0iNDv8P9N74 I6Ie3Y0roWLWuAlGIOGyvLv6zIO1H65uqnP40xI21oOKZKZJd3InR7+wgUugIyFTRvwP s9fJW8jtlcfBNfXwX5+pdipQ/UkUjjxYVuDl8YS6Xprd0JAJZR9w+kYF8oDpJU77JE/L O0FQsgPx+VgUyhtsuYnpg6LllMR0l9F0HO9UWkDnoU7v9Pe+X4/G0fYQctt6BKlJxQEG x5/KigChSawt08mUo0mxRhuKJjgJsZIsPKKpRBmNDX6+QYb3XExgCkOOhAeVLN0/olbY 8sSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=VQtZQRPLsSttaMdqw2+i/CMDv9eISA/eJIb0lAMizTg=; fh=TSuyMlfOTyCx0zt3ucDyTttlN37QPvmvgk5pf20rBgY=; b=Iq53ESoVHDWRHLRe/rgr7xCBHxDPClVXlqHZOLtmOu5A+mUA7HXFALXymc4+W3WbG8 tZHHg/Yg3F1m4SPVMtbeuCQ6zGuUP6/ElQj4NbcRq9foJ8OT7xWQ3/xxVWjOpuRfJKXQ gzLdcp/77pI37Gt3KsHgK926DBeoR9eerCx44rSfF7AKHvGsN2QDV+VEq7Ljz2IIOiY0 /IIhLPQ5qREQ6WVbRbp/A+h7TV555CqWByIKvLnT0wlTLQGX0fa1CkIefMvy4Mljvq1c md0xjkBheMJsO86FwjkBK9wxbwgkjby4ihk4XNqCauUsz447aXYm6GCZFWha/UBJ3aqi oc0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id a187-20020a6390c4000000b0056a8dc222f1si1064395pge.259.2023.10.11.18.49.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 18:49:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 0FE7A8028F66; Wed, 11 Oct 2023 18:49:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235267AbjJLBtq (ORCPT + 52 others); Wed, 11 Oct 2023 21:49:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233269AbjJLBtm (ORCPT ); Wed, 11 Oct 2023 21:49:42 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFA08B8 for ; Wed, 11 Oct 2023 18:49:40 -0700 (PDT) X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 39C1nXzaD585829, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.92/5.92) with ESMTPS id 39C1nXzaD585829 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 12 Oct 2023 09:49:33 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Thu, 12 Oct 2023 09:49:33 +0800 Received: from [127.0.1.1] (172.21.69.25) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Thu, 12 Oct 2023 09:49:33 +0800 From: Ping-Ke Shih To: CC: , Subject: [PATCH 6/6] wifi: rtw89: mac: do bf_monitor only if WiFi 6 chips Date: Thu, 12 Oct 2023 09:49:02 +0800 Message-ID: <20231012014902.18523-7-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231012014902.18523-1-pkshih@realtek.com> References: <20231012014902.18523-1-pkshih@realtek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [172.21.69.25] X-ClientProxiedBy: RTEXMBS02.realtek.com.tw (172.21.6.95) To RTEXMBS04.realtek.com.tw (172.21.6.97) X-KSE-ServerInfo: RTEXMBS04.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 11 Oct 2023 18:49:48 -0700 (PDT) X-Spam-Level: ** From: Zong-Zhe Yang Beamforming monitor is used to adjust registers to fine tune performance and power save, and currently only existing WiFi 6 chips need it. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw89/mac.c | 3 +++ drivers/net/wireless/realtek/rtw89/mac.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/net/wireless/realtek/rtw89/mac.c b/drivers/net/wireless/realtek/rtw89/mac.c index b55f1844f653..0c5768f41d55 100644 --- a/drivers/net/wireless/realtek/rtw89/mac.c +++ b/drivers/net/wireless/realtek/rtw89/mac.c @@ -5195,6 +5195,9 @@ static void rtw89_mac_bfee_standby_timer(struct rtw89_dev *rtwdev, u8 mac_idx, { u32 reg; + if (rtwdev->chip->chip_gen != RTW89_CHIP_AX) + return; + rtw89_debug(rtwdev, RTW89_DBG_BF, "set bfee standby_timer to %d\n", keep); reg = rtw89_mac_reg_by_idx(rtwdev, R_AX_BFMEE_RESP_OPTION, mac_idx); if (keep) { diff --git a/drivers/net/wireless/realtek/rtw89/mac.h b/drivers/net/wireless/realtek/rtw89/mac.h index 2ddf1f8d0a42..c11c904f87fe 100644 --- a/drivers/net/wireless/realtek/rtw89/mac.h +++ b/drivers/net/wireless/realtek/rtw89/mac.h @@ -1068,6 +1068,9 @@ int rtw89_mac_set_macid_pause(struct rtw89_dev *rtwdev, u8 macid, bool pause); static inline void rtw89_mac_bf_monitor_track(struct rtw89_dev *rtwdev) { + if (rtwdev->chip->chip_gen != RTW89_CHIP_AX) + return; + if (!test_bit(RTW89_FLAG_BFEE_MON, rtwdev->flags)) return; -- 2.25.1