]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
wifi: rtl8xxxu: support multiple interfaces in configure_filter()
authorMartin Kaistra <martin.kaistra@linutronix.de>
Fri, 22 Dec 2023 10:14:33 +0000 (11:14 +0100)
committerKalle Valo <kvalo@kernel.org>
Wed, 10 Jan 2024 14:52:57 +0000 (16:52 +0200)
As we only want to support AP mode/sending beacons on port 0, change
from priv->vif to priv->vifs[0] in the check for AP mode.
Additionally, if we are in AP mode, don't filter RX beacon and probe
response frames to still allow working STATION mode on the other
interface.

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231222101442.626837-13-martin.kaistra@linutronix.de
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c

index aeac40a892ffd813de5b39a7157fe3f8d1573262..16a87e1cef61bb15d903aee8cd2a21fa37c1dd6f 100644 (file)
@@ -6794,8 +6794,8 @@ static void rtl8xxxu_configure_filter(struct ieee80211_hw *hw,
        else
                rcr |= RCR_CHECK_BSSID_BEACON | RCR_CHECK_BSSID_MATCH;
 
-       if (priv->vif && priv->vif->type == NL80211_IFTYPE_AP)
-               rcr &= ~RCR_CHECK_BSSID_MATCH;
+       if (priv->vifs[0] && priv->vifs[0]->type == NL80211_IFTYPE_AP)
+               rcr &= ~(RCR_CHECK_BSSID_MATCH | RCR_CHECK_BSSID_BEACON);
 
        if (*total_flags & FIF_CONTROL)
                rcr |= RCR_ACCEPT_CTRL_FRAME;