mac80211: rtl8xxxu: sync with linux-next 20240229
[openwrt/staging/mans0n.git] / package / kernel / mac80211 / patches / rtl / 001-12-v6.9-wifi-rtl8xxxu-support-multiple-interfaces-in-configu.patch
1 From 6b76638287055791e74b32c401a39ea1b91e7158 Mon Sep 17 00:00:00 2001
2 From: Martin Kaistra <martin.kaistra@linutronix.de>
3 Date: Fri, 22 Dec 2023 11:14:33 +0100
4 Subject: [PATCH 12/21] wifi: rtl8xxxu: support multiple interfaces in
5 configure_filter()
6
7 As we only want to support AP mode/sending beacons on port 0, change
8 from priv->vif to priv->vifs[0] in the check for AP mode.
9 Additionally, if we are in AP mode, don't filter RX beacon and probe
10 response frames to still allow working STATION mode on the other
11 interface.
12
13 Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
14 Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
15 Signed-off-by: Kalle Valo <kvalo@kernel.org>
16 Link: https://msgid.link/20231222101442.626837-13-martin.kaistra@linutronix.de
17 ---
18 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 4 ++--
19 1 file changed, 2 insertions(+), 2 deletions(-)
20
21 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
22 +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
23 @@ -6794,8 +6794,8 @@ static void rtl8xxxu_configure_filter(st
24 else
25 rcr |= RCR_CHECK_BSSID_BEACON | RCR_CHECK_BSSID_MATCH;
26
27 - if (priv->vif && priv->vif->type == NL80211_IFTYPE_AP)
28 - rcr &= ~RCR_CHECK_BSSID_MATCH;
29 + if (priv->vifs[0] && priv->vifs[0]->type == NL80211_IFTYPE_AP)
30 + rcr &= ~(RCR_CHECK_BSSID_MATCH | RCR_CHECK_BSSID_BEACON);
31
32 if (*total_flags & FIF_CONTROL)
33 rcr |= RCR_ACCEPT_CTRL_FRAME;