mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 12:31:52 -04:00
wifi: rtw89: disable EHT protocol by chip capabilities
For certain chip models, EHT protocol is disabled, and driver must follow the capabilities. Otherwise, chips become unusable. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260110022019.2254969-5-pkshih@realtek.com
This commit is contained in:
@@ -5395,7 +5395,7 @@ static void rtw89_init_eht_cap(struct rtw89_dev *rtwdev,
|
||||
u8 val, val_mcs13;
|
||||
int sts = 8;
|
||||
|
||||
if (chip->chip_gen == RTW89_CHIP_AX)
|
||||
if (chip->chip_gen == RTW89_CHIP_AX || hal->no_eht)
|
||||
return;
|
||||
|
||||
if (hal->no_mcs_12_13)
|
||||
|
||||
@@ -5130,6 +5130,7 @@ struct rtw89_hal {
|
||||
bool support_cckpd;
|
||||
bool support_igi;
|
||||
bool no_mcs_12_13;
|
||||
bool no_eht;
|
||||
|
||||
atomic_t roc_chanctx_idx;
|
||||
u8 roc_link_index;
|
||||
|
||||
@@ -42,6 +42,10 @@ struct rtw89_c2hreg_phycap {
|
||||
#define RTW89_C2HREG_PHYCAP_W0_BW GENMASK(31, 24)
|
||||
#define RTW89_C2HREG_PHYCAP_W1_TX_NSS GENMASK(7, 0)
|
||||
#define RTW89_C2HREG_PHYCAP_W1_PROT GENMASK(15, 8)
|
||||
#define RTW89_C2HREG_PHYCAP_W1_PROT_11N 1
|
||||
#define RTW89_C2HREG_PHYCAP_W1_PROT_11AC 2
|
||||
#define RTW89_C2HREG_PHYCAP_W1_PROT_11AX 3
|
||||
#define RTW89_C2HREG_PHYCAP_W1_PROT_11BE 4
|
||||
#define RTW89_C2HREG_PHYCAP_W1_NIC GENMASK(23, 16)
|
||||
#define RTW89_C2HREG_PHYCAP_W1_WL_FUNC GENMASK(31, 24)
|
||||
#define RTW89_C2HREG_PHYCAP_W2_HW_TYPE GENMASK(7, 0)
|
||||
|
||||
@@ -3116,6 +3116,7 @@ static int rtw89_mac_setup_phycap_part0(struct rtw89_dev *rtwdev)
|
||||
struct rtw89_efuse *efuse = &rtwdev->efuse;
|
||||
struct rtw89_mac_c2h_info c2h_info = {};
|
||||
struct rtw89_hal *hal = &rtwdev->hal;
|
||||
u8 protocol;
|
||||
u8 tx_nss;
|
||||
u8 rx_nss;
|
||||
u8 tx_ant;
|
||||
@@ -3163,6 +3164,10 @@ static int rtw89_mac_setup_phycap_part0(struct rtw89_dev *rtwdev)
|
||||
rtw89_debug(rtwdev, RTW89_DBG_FW, "TX path diversity=%d\n", hal->tx_path_diversity);
|
||||
rtw89_debug(rtwdev, RTW89_DBG_FW, "Antenna diversity=%d\n", hal->ant_diversity);
|
||||
|
||||
protocol = u32_get_bits(phycap->w1, RTW89_C2HREG_PHYCAP_W1_PROT);
|
||||
if (protocol < RTW89_C2HREG_PHYCAP_W1_PROT_11BE)
|
||||
hal->no_eht = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user