Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp840647rwb; Fri, 28 Jul 2023 00:03:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlHjECfum5DD/q/xBajEqtIBZJLtT2GvXP5cpnYL86fYvknZO1TXc9WN32Nfeisd+EnzRAau X-Received: by 2002:a17:902:7486:b0:1b9:c205:a876 with SMTP id h6-20020a170902748600b001b9c205a876mr1070754pll.29.1690527830630; Fri, 28 Jul 2023 00:03:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690527830; cv=none; d=google.com; s=arc-20160816; b=aZk0alfzn2vvNXpyieUVsbb3kXf6N8D8FhFCyiNEWA/UGT29sfCUDjt9ktZoBXEOh1 kp4Ai70xwqTvibGzQ8r6C5M6v8jXKLIYkcZ3rSsh70DyGYkkRLC53TGvsiNilJeTGS5Q 7u6kszJtTjovNN50pXM7sIoyEhaDYlpYgf6r1I3q+zyOEeJd2Lm30KPqWfM4MLC4Iuip cNZJoBt0SY7B84W9fJzP8fT5faZonupkkHay/3tMt2DPHxVnS/Noy2FDo94n/LTU538A BXUYI/UvQXm7cKZMbz4OGq3ypNsGjI/VYQ81NLF90t5zxJyZgSMgXN5waej1Cw67vOcQ V8dg== 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 :authenticated-by; bh=keL15/vcE4GeJ/qrQgNMZm7AemBe/s+2WK3F6AmaMU0=; fh=G9/r3ObHYeTjMuQu/3KWxKBH2+wucEcPGH5YyCDrlVw=; b=wOyZ+4I6QuBYQG1p+Hrfog0pY4v46cEsZ5Caxvv6I84gTSZUui1nwqgNxspL2VZiIo 8U8X/pQJi/h8mazT+Jj0Qbn5Iq8nVwoB2GMAdJ3+XYyw+5XAaLZdkKrWb3TtcqDo2/Gy E2+JNLMhzYmwPAhCNFTp3KOl8L1ALEV/GLshezafdzceNG6+JWMwGLWHkC17hzW2+itr MxyTBAdf6aUX4I7/0wraI6RsRiXavj9IrURv6wCwptw6KfZcbM97YvYBKPrjQ4Ff6JJr EOS4dXHKcH067Jdi66Pqr/sgLxnwj1FLCRJE8Ua/+v9rORf35DsQ1gdHXvUdaLZybtbX TSiw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ij6-20020a170902ab4600b001bbaa5e95fdsi2640391plb.102.2023.07.28.00.03.36; Fri, 28 Jul 2023 00:03:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233532AbjG1HDf (ORCPT + 59 others); Fri, 28 Jul 2023 03:03:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233162AbjG1HDe (ORCPT ); Fri, 28 Jul 2023 03:03:34 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 752FD1FFF for ; Fri, 28 Jul 2023 00:03:30 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 36S73AmA4031347, 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.81/5.90) with ESMTPS id 36S73AmA4031347 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Fri, 28 Jul 2023 15:03:10 +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; Fri, 28 Jul 2023 15:03:22 +0800 Received: from [127.0.1.1] (172.21.69.188) 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; Fri, 28 Jul 2023 15:03:21 +0800 From: Ping-Ke Shih To: CC: , Subject: [PATCH 01/10] wifi: rtw89: add chip_info::chip_gen to determine chip generation Date: Fri, 28 Jul 2023 15:02:43 +0800 Message-ID: <20230728070252.66525-2-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230728070252.66525-1-pkshih@realtek.com> References: <20230728070252.66525-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.188] 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=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The coming WiFi 7 chip is 8922AE which uses different hardware rate and register naming rule. Adding a chip_info::chip_gen field can help to do things by generations accordingly. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw89/core.h | 9 +++++++++ drivers/net/wireless/realtek/rtw89/rtw8851b.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852a.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852b.c | 1 + drivers/net/wireless/realtek/rtw89/rtw8852c.c | 1 + 5 files changed, 13 insertions(+) diff --git a/drivers/net/wireless/realtek/rtw89/core.h b/drivers/net/wireless/realtek/rtw89/core.h index d2c67db97db1a..d44f428d30b45 100644 --- a/drivers/net/wireless/realtek/rtw89/core.h +++ b/drivers/net/wireless/realtek/rtw89/core.h @@ -109,6 +109,14 @@ enum rtw89_core_chip_id { RTL8852B, RTL8852C, RTL8851B, + RTL8922A, +}; + +enum rtw89_chip_gen { + RTW89_CHIP_AX, + RTW89_CHIP_BE, + + RTW89_CHIP_GEN_NUM, }; enum rtw89_cv { @@ -3177,6 +3185,7 @@ struct rtw89_antdiv_info { struct rtw89_chip_info { enum rtw89_core_chip_id chip_id; + enum rtw89_chip_gen chip_gen; const struct rtw89_chip_ops *ops; const char *fw_basename; u8 fw_format_max; diff --git a/drivers/net/wireless/realtek/rtw89/rtw8851b.c b/drivers/net/wireless/realtek/rtw89/rtw8851b.c index c3ffcb645ebf7..456b8369fb068 100644 --- a/drivers/net/wireless/realtek/rtw89/rtw8851b.c +++ b/drivers/net/wireless/realtek/rtw89/rtw8851b.c @@ -2334,6 +2334,7 @@ static const struct wiphy_wowlan_support rtw_wowlan_stub_8851b = { const struct rtw89_chip_info rtw8851b_chip_info = { .chip_id = RTL8851B, + .chip_gen = RTW89_CHIP_AX, .ops = &rtw8851b_chip_ops, .fw_basename = RTW8851B_FW_BASENAME, .fw_format_max = RTW8851B_FW_FORMAT_MAX, diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852a.c b/drivers/net/wireless/realtek/rtw89/rtw8852a.c index 6257414a3b4bd..0fc5eb777a4aa 100644 --- a/drivers/net/wireless/realtek/rtw89/rtw8852a.c +++ b/drivers/net/wireless/realtek/rtw89/rtw8852a.c @@ -2071,6 +2071,7 @@ static const struct rtw89_chip_ops rtw8852a_chip_ops = { const struct rtw89_chip_info rtw8852a_chip_info = { .chip_id = RTL8852A, + .chip_gen = RTW89_CHIP_AX, .ops = &rtw8852a_chip_ops, .fw_basename = RTW8852A_FW_BASENAME, .fw_format_max = RTW8852A_FW_FORMAT_MAX, diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852b.c b/drivers/net/wireless/realtek/rtw89/rtw8852b.c index 718f993da62af..d76d74cc867ad 100644 --- a/drivers/net/wireless/realtek/rtw89/rtw8852b.c +++ b/drivers/net/wireless/realtek/rtw89/rtw8852b.c @@ -2503,6 +2503,7 @@ static const struct wiphy_wowlan_support rtw_wowlan_stub_8852b = { const struct rtw89_chip_info rtw8852b_chip_info = { .chip_id = RTL8852B, + .chip_gen = RTW89_CHIP_AX, .ops = &rtw8852b_chip_ops, .fw_basename = RTW8852B_FW_BASENAME, .fw_format_max = RTW8852B_FW_FORMAT_MAX, diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852c.c b/drivers/net/wireless/realtek/rtw89/rtw8852c.c index 9c7c9812d4f45..f269832b2bc6f 100644 --- a/drivers/net/wireless/realtek/rtw89/rtw8852c.c +++ b/drivers/net/wireless/realtek/rtw89/rtw8852c.c @@ -2802,6 +2802,7 @@ static const struct rtw89_chip_ops rtw8852c_chip_ops = { const struct rtw89_chip_info rtw8852c_chip_info = { .chip_id = RTL8852C, + .chip_gen = RTW89_CHIP_AX, .ops = &rtw8852c_chip_ops, .fw_basename = RTW8852C_FW_BASENAME, .fw_format_max = RTW8852C_FW_FORMAT_MAX, -- 2.25.1