diff mbox series

[01/19] rtw89: configure rx_filter according to FIF_PROBE_REQ

Message ID 20220107034239.22002-2-pkshih@realtek.com
State New
Headers show
Series rtw89: support AP mode | expand

Commit Message

Ping-Ke Shih Jan. 7, 2022, 3:42 a.m. UTC
With this patch, we can receive probe_req and reply probe_resp, and STA
can find us.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 drivers/net/wireless/realtek/rtw89/mac80211.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Comments

Kalle Valo Jan. 28, 2022, 3:57 p.m. UTC | #1
Ping-Ke Shih <pkshih@realtek.com> wrote:

> With this patch, we can receive probe_req and reply probe_resp, and STA
> can find us.
> 
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>

12 patches applied to wireless-next.git, thanks.

6629dc5697cc rtw89: configure rx_filter according to FIF_PROBE_REQ
91644020dbd9 rtw89: use hardware SSN to TX management frame
f7e76d13bb2b rtw89: download beacon content to firmware
fccca9345b25 rtw89: add C2H handle of BCN_CNT
d62816b4a44e rtw89: implement mac80211_ops::set_tim to indicate STA to receive packets
c7df64c194f6 rtw89: allocate mac_id for each station in AP mode
742c470b5773 rtw89: extend firmware commands on states of sta_assoc and sta_disconnect
8b252070d790 rtw89: rename vif_maintain to role_maintain
283c3d886fdf rtw89: configure mac port HIQ registers
11d261f24be6 rtw89: send broadcast/multicast packets via HIQ if STAs are in sleep mode
9eecaec238c8 rtw89: set mac_id and port ID to TXWD
14f0999d49e7 rtw89: separate {init,deinit}_addr_cam functions
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtw89/mac80211.c b/drivers/net/wireless/realtek/rtw89/mac80211.c
index 90b2e2e1473fc..f068c3008b06a 100644
--- a/drivers/net/wireless/realtek/rtw89/mac80211.c
+++ b/drivers/net/wireless/realtek/rtw89/mac80211.c
@@ -161,7 +161,7 @@  static void rtw89_ops_configure_filter(struct ieee80211_hw *hw,
 	rtw89_leave_ps_mode(rtwdev);
 
 	*new_flags &= FIF_ALLMULTI | FIF_OTHER_BSS | FIF_FCSFAIL |
-		      FIF_BCN_PRBRESP_PROMISC;
+		      FIF_BCN_PRBRESP_PROMISC | FIF_PROBE_REQ;
 
 	if (changed_flags & FIF_ALLMULTI) {
 		if (*new_flags & FIF_ALLMULTI)
@@ -192,6 +192,15 @@  static void rtw89_ops_configure_filter(struct ieee80211_hw *hw,
 			rtwdev->hal.rx_fltr |= B_AX_A_A1_MATCH;
 		}
 	}
+	if (changed_flags & FIF_PROBE_REQ) {
+		if (*new_flags & FIF_PROBE_REQ) {
+			rtwdev->hal.rx_fltr &= ~B_AX_A_BC_CAM_MATCH;
+			rtwdev->hal.rx_fltr &= ~B_AX_A_UC_CAM_MATCH;
+		} else {
+			rtwdev->hal.rx_fltr |= B_AX_A_BC_CAM_MATCH;
+			rtwdev->hal.rx_fltr |= B_AX_A_UC_CAM_MATCH;
+		}
+	}
 
 	rtw89_write32_mask(rtwdev,
 			   rtw89_mac_reg_by_idx(R_AX_RX_FLTR_OPT, RTW89_MAC_0),