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 <[email protected]>
---
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
Ping-Ke Shih <[email protected]> wrote:
> 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 <[email protected]>
10 patches applied to wireless-next.git, thanks.
f698afa7ce37 wifi: rtw89: add chip_info::chip_gen to determine chip generation
9e5c6c0df94e wifi: rtw89: define hardware rate v1 for WiFi 7 chips
2ef14155c29b wifi: rtw89: phy: rate pattern handles HW rate by chip gen
401b0c161b09 wifi: rtw89: use struct to set RA H2C command
c97683ff01a4 wifi: rtw89: add H2C RA command V1 to support WiFi 7 chips
c342ac219516 wifi: rtw89: use struct to access firmware C2H event header
57cafeb18f06 wifi: rtw89: use struct to access RA report
5c152231c341 wifi: rtw89: add C2H RA event V1 to support WiFi 7 chips
ae775faa8750 wifi: rtw89: add to display hardware rates v1 histogram in debugfs
023d2f14abf8 wifi: rtw89: get data rate mode/NSS/MCS v1 from RX descriptor
--
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches