mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 12:03:54 +02:00
wifi: rtw89: set force HE TB mode when connecting to 11ax AP
Some of 11ax AP set the UL HE-SIG-A2 reserved subfield to all 0s, which will cause the 11be chip to recognize trigger frame as EHT. We propose a method to bypass the "UL HE-SIG-A2 reserved subfield" and always uses HE TB in response to the AP's trigger frame. Signed-off-by: Dian-Syuan Yang <dian_syuan0116@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250306021144.12854-6-pkshih@realtek.com
This commit is contained in:
parent
6f039d9ba9
commit
a9b56f219a
|
|
@ -4837,6 +4837,32 @@ void rtw89_mac_set_he_obss_narrow_bw_ru(struct rtw89_dev *rtwdev,
|
|||
rtw89_write32_set(rtwdev, reg, mac->narrow_bw_ru_dis.mask);
|
||||
}
|
||||
|
||||
void rtw89_mac_set_he_tb(struct rtw89_dev *rtwdev,
|
||||
struct rtw89_vif_link *rtwvif_link)
|
||||
{
|
||||
struct ieee80211_bss_conf *bss_conf;
|
||||
bool set;
|
||||
u32 reg;
|
||||
|
||||
if (rtwdev->chip->chip_gen != RTW89_CHIP_BE)
|
||||
return;
|
||||
|
||||
rcu_read_lock();
|
||||
|
||||
bss_conf = rtw89_vif_rcu_dereference_link(rtwvif_link, true);
|
||||
set = bss_conf->he_support && !bss_conf->eht_support;
|
||||
|
||||
rcu_read_unlock();
|
||||
|
||||
reg = rtw89_mac_reg_by_idx(rtwdev, R_BE_CLIENT_OM_CTRL,
|
||||
rtwvif_link->mac_idx);
|
||||
|
||||
if (set)
|
||||
rtw89_write32_set(rtwdev, reg, B_BE_TRIG_DIS_EHTTB);
|
||||
else
|
||||
rtw89_write32_clr(rtwdev, reg, B_BE_TRIG_DIS_EHTTB);
|
||||
}
|
||||
|
||||
void rtw89_mac_stop_ap(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rtwvif_link)
|
||||
{
|
||||
rtw89_mac_port_cfg_func_sw(rtwdev, rtwvif_link);
|
||||
|
|
|
|||
|
|
@ -1188,6 +1188,8 @@ void rtw89_mac_port_cfg_rx_sync(struct rtw89_dev *rtwdev,
|
|||
struct rtw89_vif_link *rtwvif_link, bool en);
|
||||
void rtw89_mac_set_he_obss_narrow_bw_ru(struct rtw89_dev *rtwdev,
|
||||
struct rtw89_vif_link *rtwvif_link);
|
||||
void rtw89_mac_set_he_tb(struct rtw89_dev *rtwdev,
|
||||
struct rtw89_vif_link *rtwvif_link);
|
||||
void rtw89_mac_stop_ap(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rtwvif_link);
|
||||
void rtw89_mac_enable_beacon_for_ap_vifs(struct rtw89_dev *rtwdev, bool en);
|
||||
int rtw89_mac_remove_vif(struct rtw89_dev *rtwdev, struct rtw89_vif_link *vif);
|
||||
|
|
|
|||
|
|
@ -656,6 +656,7 @@ static void __rtw89_ops_bss_link_assoc(struct rtw89_dev *rtwdev,
|
|||
rtw89_chip_cfg_txpwr_ul_tb_offset(rtwdev, rtwvif_link);
|
||||
rtw89_mac_port_update(rtwdev, rtwvif_link);
|
||||
rtw89_mac_set_he_obss_narrow_bw_ru(rtwdev, rtwvif_link);
|
||||
rtw89_mac_set_he_tb(rtwdev, rtwvif_link);
|
||||
}
|
||||
|
||||
static void __rtw89_ops_bss_assoc(struct rtw89_dev *rtwdev,
|
||||
|
|
|
|||
|
|
@ -7102,6 +7102,10 @@
|
|||
#define B_BE_MACLBK_RDY_NUM_MASK GENMASK(7, 3)
|
||||
#define B_BE_MACLBK_EN BIT(0)
|
||||
|
||||
#define R_BE_CLIENT_OM_CTRL 0x11040
|
||||
#define R_BE_CLIENT_OM_CTRL_C1 0x15040
|
||||
#define B_BE_TRIG_DIS_EHTTB BIT(24)
|
||||
|
||||
#define R_BE_WMAC_NAV_CTL 0x11080
|
||||
#define R_BE_WMAC_NAV_CTL_C1 0x15080
|
||||
#define B_BE_WMAC_NAV_UPPER_EN BIT(26)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user