mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 02:53:36 +02:00
wifi: rtw89: fix group frames loss when connected to non-transmitted BSSID
When STA connects to AP with dot11MultiBSSIDImplemented set to true, the layout of the TIM element's Partial Virtual Bitmap changes. Bits 1 to (2^n - 1) are used to indicate buffered group addressed frames (e.g., broadcast/multicast) for non-transmitted BSSIDs. Fix the interpretation of this field to ensure group addressed frames are correctly received. Signed-off-by: Kuan-Chung Chen <damon.chen@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250811124001.15774-1-pkshih@realtek.com
This commit is contained in:
parent
c4c16c88e7
commit
bf02a01d1d
|
|
@ -1011,6 +1011,7 @@ struct rtw89_port_reg {
|
|||
u32 ptcl_dbg;
|
||||
u32 ptcl_dbg_info;
|
||||
u32 bcn_drop_all;
|
||||
u32 bcn_psr_rpt;
|
||||
u32 hiq_win[RTW89_PORT_NUM];
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -4197,6 +4197,7 @@ static const struct rtw89_port_reg rtw89_port_base_ax = {
|
|||
.ptcl_dbg = R_AX_PTCL_DBG,
|
||||
.ptcl_dbg_info = R_AX_PTCL_DBG_INFO,
|
||||
.bcn_drop_all = R_AX_BCN_DROP_ALL0,
|
||||
.bcn_psr_rpt = R_AX_BCN_PSR_RPT_P0,
|
||||
.hiq_win = {R_AX_P0MB_HGQ_WINDOW_CFG_0, R_AX_PORT_HGQ_WINDOW_CFG,
|
||||
R_AX_PORT_HGQ_WINDOW_CFG + 1, R_AX_PORT_HGQ_WINDOW_CFG + 2,
|
||||
R_AX_PORT_HGQ_WINDOW_CFG + 3},
|
||||
|
|
@ -4649,6 +4650,30 @@ static void rtw89_mac_port_cfg_bcn_early(struct rtw89_dev *rtwdev,
|
|||
BCN_ERLY_DEF);
|
||||
}
|
||||
|
||||
static void rtw89_mac_port_cfg_bcn_psr_rpt(struct rtw89_dev *rtwdev,
|
||||
struct rtw89_vif_link *rtwvif_link)
|
||||
{
|
||||
const struct rtw89_mac_gen_def *mac = rtwdev->chip->mac_def;
|
||||
const struct rtw89_port_reg *p = mac->port_base;
|
||||
struct ieee80211_bss_conf *bss_conf;
|
||||
u8 bssid_index;
|
||||
u32 reg;
|
||||
|
||||
rcu_read_lock();
|
||||
|
||||
bss_conf = rtw89_vif_rcu_dereference_link(rtwvif_link, true);
|
||||
if (bss_conf->nontransmitted)
|
||||
bssid_index = bss_conf->bssid_index;
|
||||
else
|
||||
bssid_index = 0;
|
||||
|
||||
rcu_read_unlock();
|
||||
|
||||
reg = rtw89_mac_reg_by_idx(rtwdev, p->bcn_psr_rpt + rtwvif_link->port * 4,
|
||||
rtwvif_link->mac_idx);
|
||||
rtw89_write32_mask(rtwdev, reg, B_AX_BCAID_P0_MASK, bssid_index);
|
||||
}
|
||||
|
||||
void rtw89_mac_port_tsf_sync(struct rtw89_dev *rtwdev,
|
||||
struct rtw89_vif_link *rtwvif_link,
|
||||
struct rtw89_vif_link *rtwvif_src,
|
||||
|
|
@ -4805,6 +4830,7 @@ int rtw89_mac_port_update(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rtwvi
|
|||
rtw89_mac_port_tsf_resync_all(rtwdev);
|
||||
fsleep(BCN_ERLY_SET_DLY);
|
||||
rtw89_mac_port_cfg_bcn_early(rtwdev, rtwvif_link);
|
||||
rtw89_mac_port_cfg_bcn_psr_rpt(rtwdev, rtwvif_link);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ static const struct rtw89_port_reg rtw89_port_base_be = {
|
|||
.ptcl_dbg = R_BE_PTCL_DBG,
|
||||
.ptcl_dbg_info = R_BE_PTCL_DBG_INFO,
|
||||
.bcn_drop_all = R_BE_BCN_DROP_ALL0,
|
||||
.bcn_psr_rpt = R_BE_BCN_PSR_RPT_P0,
|
||||
.hiq_win = {R_BE_P0MB_HGQ_WINDOW_CFG_0, R_BE_PORT_HGQ_WINDOW_CFG,
|
||||
R_BE_PORT_HGQ_WINDOW_CFG + 1, R_BE_PORT_HGQ_WINDOW_CFG + 2,
|
||||
R_BE_PORT_HGQ_WINDOW_CFG + 3},
|
||||
|
|
|
|||
|
|
@ -3370,6 +3370,10 @@
|
|||
#define B_AX_CSIPRT_HESU_AID_EN BIT(25)
|
||||
#define B_AX_CSIPRT_VHTSU_AID_EN BIT(24)
|
||||
|
||||
#define R_AX_BCN_PSR_RPT_P0 0xCE84
|
||||
#define R_AX_BCN_PSR_RPT_P0_C1 0xEE84
|
||||
#define B_AX_BCAID_P0_MASK GENMASK(10, 0)
|
||||
|
||||
#define R_AX_RX_STATE_MONITOR 0xCEF0
|
||||
#define R_AX_RX_STATE_MONITOR_C1 0xEEF0
|
||||
#define B_AX_RX_STATE_MONITOR_MASK GENMASK(31, 0)
|
||||
|
|
@ -7494,6 +7498,10 @@
|
|||
#define R_BE_DRV_INFO_OPTION_C1 0x15470
|
||||
#define B_BE_DRV_INFO_PHYRPT_EN BIT(0)
|
||||
|
||||
#define R_BE_BCN_PSR_RPT_P0 0x11484
|
||||
#define R_BE_BCN_PSR_RPT_P0_C1 0x15484
|
||||
#define B_BE_BCAID_P0_MASK GENMASK(10, 0)
|
||||
|
||||
#define R_BE_RX_ERR_ISR 0x114F4
|
||||
#define R_BE_RX_ERR_ISR_C1 0x154F4
|
||||
#define B_BE_RX_ERR_TRIG_ACT_TO BIT(9)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user