The address space of WiFi 7 chips is changed from WiFi 6, and the layout looks like below. +---------------------+ 0x0_0000 MAC base address (WiFi 6: 0x0_0000 the same) | | | | | +-----------+ ----|-------+ | | BAND0 | | | offset = 0x0_4000 (WiFi 6: 0x0_2000) | +-----------+ <---|-------+ | | BAND1 | | | +-----------+ | | | +---------------------+ 0x2_0000 PHY0 base address (WiFi 6: 0x1_0000) | | | | +---------------------+ 0x4_0000 PHY1 base address (WiFi 6: not simple offset) | | | | +---------------------+ Thus, introduce struct {mac,phy}_gen_def to define these addresses, and also registers addresses are changed after WiFi 7, so add fields to the struct to reuse codes. More functions will be added into the struct afterward, because register settings and flows are also changed. Currently, we add mac_be.c and phy_be.c for WiFi 7 chips, and the share code and WiFi 6 specified code still locate on existing mac.c and phy.c. In the future, we might move WiFi 6 part into mac_ax.c and phy_ax.c in one go if needed. Cheng-Chieh Hsieh (1): wifi: rtw89: phy: modify register setting of ENV_MNTR, PHYSTS and DIG Ping-Ke Shih (5): wifi: rtw89: mac: add mac_gen_def::band1_offset to map MAC band1 register address wifi: rtw89: mac: generalize code to indirectly access WiFi internal memory wifi: rtw89: mac: define internal memory address for WiFi 7 chip wifi: rtw89: mac: define register address of rx_filter to generalize code wifi: rtw89: phy: add phy_gen_def::cr_base to support WiFi 7 chips drivers/net/wireless/realtek/rtw89/core.c | 6 +- drivers/net/wireless/realtek/rtw89/core.h | 8 + drivers/net/wireless/realtek/rtw89/debug.c | 13 +- drivers/net/wireless/realtek/rtw89/fw.c | 6 +- drivers/net/wireless/realtek/rtw89/mac.c | 197 ++++++++------- drivers/net/wireless/realtek/rtw89/mac.h | 69 ++++- drivers/net/wireless/realtek/rtw89/mac80211.c | 7 +- drivers/net/wireless/realtek/rtw89/mac_be.c | 38 +++ drivers/net/wireless/realtek/rtw89/phy.c | 239 +++++++++++++----- drivers/net/wireless/realtek/rtw89/phy.h | 114 ++++++++- drivers/net/wireless/realtek/rtw89/phy_be.c | 77 ++++++ drivers/net/wireless/realtek/rtw89/reg.h | 34 +++ drivers/net/wireless/realtek/rtw89/rtw8851b.c | 18 +- drivers/net/wireless/realtek/rtw89/rtw8852a.c | 19 +- drivers/net/wireless/realtek/rtw89/rtw8852b.c | 18 +- drivers/net/wireless/realtek/rtw89/rtw8852c.c | 24 +- drivers/net/wireless/realtek/rtw89/ser.c | 20 +- drivers/net/wireless/realtek/rtw89/wow.c | 3 +- 18 files changed, 680 insertions(+), 230 deletions(-) create mode 100644 drivers/net/wireless/realtek/rtw89/mac_be.c create mode 100644 drivers/net/wireless/realtek/rtw89/phy_be.c -- 2.25.1