mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
wifi: rtw89: phy: define PHY status IE length for generations
Both RTL8922A and RTL8922D are WiFi 7 chips, but their IE length of PHY status are different. Define them accordingly. Generation 0: WiFi 6 chips Generation 1: WiFi 7 RTL8922A Generation 2: WiFi 7 RTL8922D Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260506131000.1706298-5-pkshih@realtek.com
This commit is contained in:
parent
a371139d8b
commit
c847d0c14c
|
|
@ -2040,29 +2040,14 @@ static void rtw89_core_rx_process_phy_ppdu_iter(void *data,
|
|||
}
|
||||
}
|
||||
|
||||
#define VAR_LEN 0xff
|
||||
#define VAR_LEN_UNIT 8
|
||||
static u16 rtw89_core_get_phy_status_ie_len(struct rtw89_dev *rtwdev,
|
||||
const struct rtw89_phy_sts_iehdr *iehdr)
|
||||
{
|
||||
static const u8 physts_ie_len_tabs[RTW89_CHIP_GEN_NUM][32] = {
|
||||
[RTW89_CHIP_AX] = {
|
||||
16, 32, 24, 24, 8, 8, 8, 8, VAR_LEN, 8, VAR_LEN, 176, VAR_LEN,
|
||||
VAR_LEN, VAR_LEN, VAR_LEN, VAR_LEN, VAR_LEN, 16, 24, VAR_LEN,
|
||||
VAR_LEN, VAR_LEN, 0, 24, 24, 24, 24, 32, 32, 32, 32
|
||||
},
|
||||
[RTW89_CHIP_BE] = {
|
||||
32, 40, 24, 24, 8, 8, 8, 8, VAR_LEN, 8, VAR_LEN, 176, VAR_LEN,
|
||||
VAR_LEN, VAR_LEN, VAR_LEN, VAR_LEN, VAR_LEN, 88, 56, VAR_LEN,
|
||||
VAR_LEN, VAR_LEN, 0, 24, 24, 24, 24, 32, 32, 32, 32
|
||||
},
|
||||
};
|
||||
const u8 *physts_ie_len_tab;
|
||||
const struct rtw89_phy_gen_def *phy = rtwdev->chip->phy_def;
|
||||
const u8 *physts_ie_len_tab = phy->physt_ie_len;
|
||||
u16 ie_len;
|
||||
u8 ie;
|
||||
|
||||
physts_ie_len_tab = physts_ie_len_tabs[rtwdev->chip->chip_gen];
|
||||
|
||||
ie = le32_get_bits(iehdr->w0, RTW89_PHY_STS_IEHDR_TYPE);
|
||||
if (physts_ie_len_tab[ie] != VAR_LEN)
|
||||
ie_len = physts_ie_len_tab[ie];
|
||||
|
|
|
|||
|
|
@ -8948,6 +8948,10 @@ const struct rtw89_phy_gen_def rtw89_phy_gen_ax = {
|
|||
.cr_base = 0x10000,
|
||||
.physt_bmp_start = R_PHY_STS_BITMAP_ADDR_START,
|
||||
.physt_bmp_eht = 0xfc,
|
||||
.physt_ie_len = {16, 32, 24, 24, 8, 8, 8, 8, VAR_LEN, 8, VAR_LEN, 176, VAR_LEN,
|
||||
VAR_LEN, VAR_LEN, VAR_LEN, VAR_LEN, VAR_LEN, 16, 24, VAR_LEN,
|
||||
VAR_LEN, VAR_LEN, 0, 24, 24, 24, 24, 32, 32, 32, 32},
|
||||
.physt_gen = 0,
|
||||
.ccx = &rtw89_ccx_regs_ax,
|
||||
.physts = &rtw89_physts_regs_ax,
|
||||
.cfo = &rtw89_cfo_regs_ax,
|
||||
|
|
|
|||
|
|
@ -154,6 +154,9 @@
|
|||
#define EDCCA_UNIT_CONVER 128
|
||||
#define EDCCA_PWROFST_DEFAULT 18
|
||||
|
||||
#define VAR_LEN 0xff
|
||||
#define VAR_LEN_UNIT 8
|
||||
|
||||
enum rtw89_phy_c2h_ra_func {
|
||||
RTW89_PHY_C2H_FUNC_STS_RPT,
|
||||
RTW89_PHY_C2H_FUNC_MU_GPTBL_RPT,
|
||||
|
|
@ -573,6 +576,8 @@ struct rtw89_phy_gen_def {
|
|||
u32 cr_base;
|
||||
u32 physt_bmp_start;
|
||||
u32 physt_bmp_eht;
|
||||
u8 physt_ie_len[32];
|
||||
u8 physt_gen;
|
||||
const struct rtw89_ccx_regs *ccx;
|
||||
const struct rtw89_physts_regs *physts;
|
||||
const struct rtw89_cfo_regs *cfo;
|
||||
|
|
|
|||
|
|
@ -1561,6 +1561,10 @@ const struct rtw89_phy_gen_def rtw89_phy_gen_be = {
|
|||
.cr_base = 0x20000,
|
||||
.physt_bmp_start = R_PHY_STS_BITMAP_ADDR_START,
|
||||
.physt_bmp_eht = R_PHY_STS_BITMAP_EHT,
|
||||
.physt_ie_len = {32, 40, 24, 24, 8, 8, 8, 8, VAR_LEN, 8, VAR_LEN, 176, VAR_LEN,
|
||||
VAR_LEN, VAR_LEN, VAR_LEN, VAR_LEN, VAR_LEN, 88, 56, VAR_LEN,
|
||||
VAR_LEN, VAR_LEN, 0, 24, 24, 24, 24, 32, 32, 32, 32},
|
||||
.physt_gen = 1,
|
||||
.ccx = &rtw89_ccx_regs_be,
|
||||
.physts = &rtw89_physts_regs_be,
|
||||
.cfo = &rtw89_cfo_regs_be,
|
||||
|
|
@ -1582,6 +1586,10 @@ const struct rtw89_phy_gen_def rtw89_phy_gen_be_v1 = {
|
|||
.cr_base = 0x0,
|
||||
.physt_bmp_start = R_PHY_STS_BITMAP_ADDR_START_BE4,
|
||||
.physt_bmp_eht = R_PHY_STS_BITMAP_EHT_BE4,
|
||||
.physt_ie_len = {32, 40, 24, 24, 16, 16, 16, 16, VAR_LEN, VAR_LEN, VAR_LEN, 168,
|
||||
VAR_LEN, VAR_LEN, VAR_LEN, VAR_LEN, VAR_LEN, VAR_LEN, 32, 56,
|
||||
96, VAR_LEN, VAR_LEN, 0, 24, 24, 24, 24, 32, 32, 32, 32},
|
||||
.physt_gen = 2,
|
||||
.ccx = &rtw89_ccx_regs_be_v1,
|
||||
.physts = &rtw89_physts_regs_be_v1,
|
||||
.cfo = &rtw89_cfo_regs_be_v1,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user