]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: rtw89: SNIFFER_MODE bit along IEEE80211_CONF_MONITOR
authorPing-Ke Shih <pkshih@realtek.com>
Wed, 6 May 2026 13:09:49 +0000 (21:09 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Wed, 13 May 2026 03:32:43 +0000 (11:32 +0800)
The SNIFFER_MODE bit can ignore filter rules, and receive packets to
driver, so set the bit to accept all packets.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260506131000.1706298-4-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/mac80211.c

index b72f6661fbd1a76e3c6a68ff121adcdba5d5514d..2c6711133c803481a6cbbbb58fef7bea1056c7ee 100644 (file)
@@ -356,6 +356,11 @@ static void rtw89_ops_configure_filter(struct ieee80211_hw *hw,
                }
        }
 
+       if (rtwdev->hw->conf.flags & IEEE80211_CONF_MONITOR)
+               rtwdev->hal.rx_fltr |= B_AX_SNIFFER_MODE;
+       else
+               rtwdev->hal.rx_fltr &= ~B_AX_SNIFFER_MODE;
+
        rx_fltr = rtwdev->hal.rx_fltr;
 
        /* mac80211 doesn't configure filter when HW scan, driver need to