Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3827553rdb; Mon, 11 Dec 2023 00:35:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IEsiGovSPGmsc2XxL3JVsFaZWvOpJqaEolrDAibsZ7izVd7HT+ji5wJwEcuE8O7YRuEuO8S X-Received: by 2002:a05:6e02:170f:b0:35d:7058:5ef0 with SMTP id u15-20020a056e02170f00b0035d70585ef0mr4351373ill.51.1702283709300; Mon, 11 Dec 2023 00:35:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702283709; cv=none; d=google.com; s=arc-20160816; b=CKqtE0XCnFEebScCVIhD3XuWJO+rr2+8OkGkI4MHBAuqa0FgewZMLroRT8WlYmFR+T hcW1gnpumFQ1YCZDVSYjOTM+KpBH+s0Hh7/qS2cONhcqTtjKSNuf+nsf6+ksP7TOKb9A YPOMNt9isiGbV8SM0NaKBW3CZsJmaA+2bu3pfOSGS5ag0yLpFZE16oxFTMlAvVhB02x5 yOhJUCyDQ5UZHneQGFH4m6UevrSFI8c1EbAgeUawW2IkJ96jaOBY+Rzs4vOty0ZEHRsj YOFjYTC8NpRTWIK5GFKN196FljiJfwzfLzyKsCMBddlArlZIToAZlq7DlL97iTUPeD2y 53Qw== ARC-Message-Signature: i=1; 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:message-id:date:subject:cc:to :from; bh=4gTSVkSnQIIFS2XZ/asAOaiLxmMjQeslRIq8B6rgtlw=; fh=119R0DZRwIns1LRpqAK2A6izyPVjL4TEe6VydCwW0T8=; b=vCKrnOUJQDFPSqqt+OXrlooBq0tWahtMRQkAugVHeD5yM+AaUYIoB/1jLSgRXw67G+ tXY+KjnUHSnVJpAttLK0enYtpcZU6eSPBCqyYXv4MIg3+RtaJ5xS8DXtA50ofAtM0IuU ksHRmz/1NYgNzNsdG9KDyt3wUmIsMnzHnvBAYtOEl8NxBiQGBxh0j73QjyNGjqBdh0Gb FEKbtVcAH9ssClcVQWRME1TCki9NbqRP9bcPfhNGIQpue09KouRlY8jErsCUTm/ESO3F QzcvG2Tab83r12O/CA2z6KPAbt5XpMkymsbx9EXohLwOl7VXTQkVHmNNK2/OyiWv3jyu brxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless+bounces-633-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-633-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i10-20020a63540a000000b005be03f0da65si5666718pgb.720.2023.12.11.00.35.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 00:35:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-633-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless+bounces-633-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-633-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 ECDBD280C2D for ; Mon, 11 Dec 2023 08:35:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2705720DE1; Mon, 11 Dec 2023 08:35:05 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6593E8E for ; Mon, 11 Dec 2023 00:35:01 -0800 (PST) X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 3BB8YqrI62598349, 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 3BB8YqrI62598349 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 11 Dec 2023 16:34:52 +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_128_GCM_SHA256) id 15.1.2375.32; Mon, 11 Dec 2023 16:34:52 +0800 Received: from [127.0.1.1] (172.21.69.94) 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; Mon, 11 Dec 2023 16:34:52 +0800 From: Ping-Ke Shih To: CC: Subject: [PATCH 0/6] wifi: rtw89: adjust mac init code to support WiFi 7 chips Date: Mon, 11 Dec 2023 16:33:35 +0800 Message-ID: <20231211083341.118047-1-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 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: RTEXMBS04.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback 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 The mac initial code is different between WiFi 6 and 7 chips, so add suffix _ax for WiFi 6 chips, and export shared functions. For WiFi 7, the code to initialize MAC is a little big, so I defer the patches to next submission. Other stuffs are to add necessary API used by initial flow. Include XTAL SI to control analog hardware, driver flags to reflect CMAC/DMAC status, DBCC H2C command to notify firmware current MAC quota mode, and avoid to additionally reset BB/RF while starting. Ping-Ke Shih (6): wifi: rtw89: add XTAL SI for WiFi 7 chips wifi: rtw89: 8922a: add power on/off functions wifi: rtw89: mac: add flags to check if CMAC and DMAC are enabled wifi: rtw89: mac: add suffix _ax to MAC functions wifi: rtw89: add DBCC H2C to notify firmware the status wifi: rtw89: only reset BB/RF for existing WiFi 6 chips while starting up drivers/net/wireless/realtek/rtw89/core.c | 5 +- drivers/net/wireless/realtek/rtw89/core.h | 3 + drivers/net/wireless/realtek/rtw89/fw.c | 35 +++ drivers/net/wireless/realtek/rtw89/fw.h | 8 + drivers/net/wireless/realtek/rtw89/mac.c | 184 +++++++------- drivers/net/wireless/realtek/rtw89/mac.h | 71 +++++- drivers/net/wireless/realtek/rtw89/mac_be.c | 71 ++++++ drivers/net/wireless/realtek/rtw89/reg.h | 176 +++++++++++++ drivers/net/wireless/realtek/rtw89/rtw8922a.c | 237 ++++++++++++++++++ drivers/net/wireless/realtek/rtw89/wow.c | 7 +- 10 files changed, 699 insertions(+), 98 deletions(-) -- 2.25.1