[PATCH 0/2] Bluetooth: MSFT: Only enable the advertisement filter with monitors

From: Thomas de Gruijter via B4 Relay

Date: Thu Nov 19 2026 - 20:13:46 EST


On MediaTek MT7922 (USB 0e8d:0616, BT firmware build 20260724) LE
discovery and passive scanning find nothing, because msft_do_open()
enables the MSFT advertisement filter on every power on even when no
advertisement monitor is registered, and this controller then drops
every advertisement.

Patch 2 only enables the filter while at least one monitor is offloaded.
It is the first user of msft->filter_enabled, which does not follow the
controller when it reports the filter as already being in the requested
state, so patch 1 fixes that first.

How the problem was found
-------------------------
- btmon showed LE Set Extended Scan Parameters/Enable completing with
status 0x00, followed by zero LE Extended Advertising Report events
while three BLE beacons and ~20 other devices were in range.
- With hci0 powered off in BlueZ, the controller was reset and driven
directly through the HCI user channel. Legacy and extended scanning
both delivered reports (~870-980 in 10 s from 23 devices). Adding the
kernel's init steps one at a time showed that only LE Set
Advertisement Filter Enable(0x01) stops all reports (0, versus
~520-540 with LE Set Address Resolution Enable or the CIS host
feature bit added instead).
- Disabling the filter on the running hci0 through a raw HCI socket made
BlueZ LE discovery see 22 devices instead of 0.

Testing
-------
- Patch 2 was tested on the MT7922 described
above: LE discovery works right after boot (22 devices instead of 0)
and BLE power control of Lighthouse base stations works again.

Not tested
----------
- Patch 1.
- Any setup with advertisement monitors registered (adding or removing
monitors, suspend/resume with monitors), any controller other than
the MT7922, and the Command Disallowed path of patch 1, which needs a
controller that starts with the filter enabled.

Tool assistance
---------------
The investigation and the creation test scripts were done using Claude Code.
I have reviewed the changes and the analysis and can answer questions about them.

---
Thomas de Gruijter (2):
Bluetooth: MSFT: Record the filter state on Command Disallowed
Bluetooth: MSFT: Only enable the advertisement filter with monitors

net/bluetooth/msft.c | 57 ++++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 49 insertions(+), 8 deletions(-)
---
base-commit: 1d79f61152c315e30e758116e525871732181a98
change-id: 20261120-msft-filter-monitors-05e7b8fb6175

Best regards,
--
Thomas de Gruijter <thomasdegruijter@xxxxx>