Re: [PATCH rtw-next v2 1/2] wifi: rtw88: 8822c: filter hardware-handled control frames on SDIO
From: Luka Gejak
Date: Mon Nov 16 2026 - 11:30:46 EST
Hi Leonard,
Thanks for the update. One comment below.
On November 16, 2026 11:08:03 AM GMT+01:00, Leonard Lausen
<leonard@xxxxxxxxx> wrote:
> @@ -2096,6 +2096,16 @@ static int rtw8822c_mac_init(struct rtw_dev *rtwdev)
[ ... ]
> rtwdev->hal.rxfltmap1 = WLAN_RX_FILTER1;
> + if (rtw_hci_type(rtwdev) == RTW_HCI_TYPE_SDIO) {
> + /*
> + * Hardware handles these frames; retain BAR and PS-Poll for
> + * mac80211. FIF_CONTROL restores all subtypes for monitors.
> + */
> + rtwdev->hal.rxfltmap1 &= ~(BIT_RXFLTMAP1_BACK |
> + BIT_RXFLTMAP1_RTS |
> + BIT_RXFLTMAP1_CTS |
> + BIT_RXFLTMAP1_ACK);
> + }
> rtw_write16(rtwdev, REG_RXFLTMAP1, rtwdev->hal.rxfltmap1);
[ ... ]
As far as I can see, later writes of this default can disable these frames
while a monitor still requests them.
For example, with an unassociated interface in IPS, bringing up a monitor
first calls ieee80211_configure_filter(). The following
ieee80211_recalc_idle() leaves IPS and runs rtw8822c_mac_init(), which
writes the reduced map again. A hardware restart or resume with an
existing monitor seems to have the same problem.
mac80211 keeps local->filter_flags, so FIF_CONTROL can still be set in
*new_flags but clear in changed_flags. Then rtw_ops_configure_filter()
skips restoring 0xffff.
There also seems to be a way to lose it while the radio stays on.
Associating a managed interface with an MU beamformer calls:
rtw_bf_enable_bfee_mu()
rtw_bf_cfg_sounding()
Both functions write hal.rxfltmap1 back to REG_RXFLTMAP1, replacing the
monitor's 0xffff with the reduced map. Before this patch those writes
left the four subtypes enabled.
Could we preserve the active FIF_CONTROL setting in the common filter
code and use it for MAC initialization and the writes in bf.c too?
Best regards,
Luka Gejak