Commit f698afa7 authored by Ping-Ke Shih's avatar Ping-Ke Shih Committed by Kalle Valo

wifi: rtw89: add chip_info::chip_gen to determine chip generation

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: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230728070252.66525-2-pkshih@realtek.com
parent 942999c4
...@@ -109,6 +109,14 @@ enum rtw89_core_chip_id { ...@@ -109,6 +109,14 @@ enum rtw89_core_chip_id {
RTL8852B, RTL8852B,
RTL8852C, RTL8852C,
RTL8851B, RTL8851B,
RTL8922A,
};
enum rtw89_chip_gen {
RTW89_CHIP_AX,
RTW89_CHIP_BE,
RTW89_CHIP_GEN_NUM,
}; };
enum rtw89_cv { enum rtw89_cv {
...@@ -3177,6 +3185,7 @@ struct rtw89_antdiv_info { ...@@ -3177,6 +3185,7 @@ struct rtw89_antdiv_info {
struct rtw89_chip_info { struct rtw89_chip_info {
enum rtw89_core_chip_id chip_id; enum rtw89_core_chip_id chip_id;
enum rtw89_chip_gen chip_gen;
const struct rtw89_chip_ops *ops; const struct rtw89_chip_ops *ops;
const char *fw_basename; const char *fw_basename;
u8 fw_format_max; u8 fw_format_max;
......
...@@ -2334,6 +2334,7 @@ static const struct wiphy_wowlan_support rtw_wowlan_stub_8851b = { ...@@ -2334,6 +2334,7 @@ static const struct wiphy_wowlan_support rtw_wowlan_stub_8851b = {
const struct rtw89_chip_info rtw8851b_chip_info = { const struct rtw89_chip_info rtw8851b_chip_info = {
.chip_id = RTL8851B, .chip_id = RTL8851B,
.chip_gen = RTW89_CHIP_AX,
.ops = &rtw8851b_chip_ops, .ops = &rtw8851b_chip_ops,
.fw_basename = RTW8851B_FW_BASENAME, .fw_basename = RTW8851B_FW_BASENAME,
.fw_format_max = RTW8851B_FW_FORMAT_MAX, .fw_format_max = RTW8851B_FW_FORMAT_MAX,
......
...@@ -2071,6 +2071,7 @@ static const struct rtw89_chip_ops rtw8852a_chip_ops = { ...@@ -2071,6 +2071,7 @@ static const struct rtw89_chip_ops rtw8852a_chip_ops = {
const struct rtw89_chip_info rtw8852a_chip_info = { const struct rtw89_chip_info rtw8852a_chip_info = {
.chip_id = RTL8852A, .chip_id = RTL8852A,
.chip_gen = RTW89_CHIP_AX,
.ops = &rtw8852a_chip_ops, .ops = &rtw8852a_chip_ops,
.fw_basename = RTW8852A_FW_BASENAME, .fw_basename = RTW8852A_FW_BASENAME,
.fw_format_max = RTW8852A_FW_FORMAT_MAX, .fw_format_max = RTW8852A_FW_FORMAT_MAX,
......
...@@ -2503,6 +2503,7 @@ static const struct wiphy_wowlan_support rtw_wowlan_stub_8852b = { ...@@ -2503,6 +2503,7 @@ static const struct wiphy_wowlan_support rtw_wowlan_stub_8852b = {
const struct rtw89_chip_info rtw8852b_chip_info = { const struct rtw89_chip_info rtw8852b_chip_info = {
.chip_id = RTL8852B, .chip_id = RTL8852B,
.chip_gen = RTW89_CHIP_AX,
.ops = &rtw8852b_chip_ops, .ops = &rtw8852b_chip_ops,
.fw_basename = RTW8852B_FW_BASENAME, .fw_basename = RTW8852B_FW_BASENAME,
.fw_format_max = RTW8852B_FW_FORMAT_MAX, .fw_format_max = RTW8852B_FW_FORMAT_MAX,
......
...@@ -2802,6 +2802,7 @@ static const struct rtw89_chip_ops rtw8852c_chip_ops = { ...@@ -2802,6 +2802,7 @@ static const struct rtw89_chip_ops rtw8852c_chip_ops = {
const struct rtw89_chip_info rtw8852c_chip_info = { const struct rtw89_chip_info rtw8852c_chip_info = {
.chip_id = RTL8852C, .chip_id = RTL8852C,
.chip_gen = RTW89_CHIP_AX,
.ops = &rtw8852c_chip_ops, .ops = &rtw8852c_chip_ops,
.fw_basename = RTW8852C_FW_BASENAME, .fw_basename = RTW8852C_FW_BASENAME,
.fw_format_max = RTW8852C_FW_FORMAT_MAX, .fw_format_max = RTW8852C_FW_FORMAT_MAX,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment