From: Thomas de Gruijter via B4 Relay <devnull+thomasdegruijter.pm.me@kernel.org>
To: Marcel Holtmann <marcel@holtmann.org>,
Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
Brian Gix <brian.gix@intel.com>,
Yun-Hao Chung <howardchung@google.com>,
Miao-chen Chou <mcchou@chromium.org>,
Archie Pusaka <apusaka@chromium.org>
Cc: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>,
linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
Thomas de Gruijter <thomasdegruijter@pm.me>
Subject: [PATCH 0/2] Bluetooth: MSFT: Only enable the advertisement filter with monitors
Date: Fri, 20 Nov 2026 02:13:34 +0100 [thread overview]
Message-ID: <20261120-msft-filter-monitors-v1-0-8192f0c0791a@pm.me> (raw)
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@pm.me>
next reply other threads:[~2026-11-20 1:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 1:13 Thomas de Gruijter via B4 Relay [this message]
2026-11-20 1:13 ` [PATCH 1/2] Bluetooth: MSFT: Record the filter state on Command Disallowed Thomas de Gruijter via B4 Relay
2026-11-20 1:13 ` [PATCH 2/2] Bluetooth: MSFT: Only enable the advertisement filter with monitors Thomas de Gruijter via B4 Relay
2026-11-20 17:20 ` [PATCH 0/2] " patchwork-bot+bluetooth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261120-msft-filter-monitors-v1-0-8192f0c0791a@pm.me \
--to=devnull+thomasdegruijter.pm.me@kernel.org \
--cc=apusaka@chromium.org \
--cc=brian.gix@intel.com \
--cc=howardchung@google.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=luiz.von.dentz@intel.com \
--cc=marcel@holtmann.org \
--cc=mcchou@chromium.org \
--cc=thomasdegruijter@pm.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®