From: Ton Sharp <66ton99@gmail.com>
To: Marcel Holtmann <marcel@holtmann.org>,
Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org,
Jose Miguel Ochoa <josemiguelo.ochoa@gmail.com>,
Aditya Garg <gargaditya08@live.com>,
Ton Sharp <66ton99@gmail.com>
Subject: [PATCH bluetooth-next] Bluetooth: hci_event: strip Broadcom vendor bits from legacy adv report type
Date: Thu, 15 Oct 2026 14:49:01 +0300 [thread overview]
Message-ID: <20261015114903.784731-1-66ton99@gmail.com> (raw)
Broadcom controllers running ROM firmware on Apple T2 Macs (where no
RAM patchram exists, e.g. BCM4364B3 on MacBookPro16,1) set vendor bits
0x10/0x20/0x80 in the legacy LE Advertising Report Event_Type.
As a result, directed advertisements (ADV_DIRECT_IND) arrive as
0x81/0x91/0xa1 instead of 0x01. Because process_adv_report() drops any
legacy report with type > LE_ADV_SCAN_RSP (0x04) as an unknown advertising
packet type, bonded LE peripherals (such as Apple Magic Mouse/Keyboard)
and Chrome passkey proximity scans fail to discover or reliably reconnect
to the host.
The valid legacy type is always located in the low nibble. Mask the type
field for Broadcom controllers (manufacturer 15) when it is out of range.
Valid legacy reports (0x00-0x04) remain untouched, low nibbles >= 5 remain
out of range and will continue to be dropped, and controllers from other
manufacturers are unaffected.
The fix is based on the initial t2linux patch from Jose Miguel Ochoa.
Link: https://lore.kernel.org/r/3352A23E-EA42-4366-BBAA-459CEAE6F51B@live.com
Suggested-by: Jose Miguel Ochoa <josemiguelo.ochoa@gmail.com>
Signed-off-by: Ton Sharp <66ton99@gmail.com>
---
net/bluetooth/hci_event.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index c055d16cfb8e..a03a33bca095 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -6593,6 +6593,17 @@ static void hci_le_adv_report_evt(struct hci_dev *hdev, void *data,
hci_store_wake_reason(hdev, &info->bdaddr, info->bdaddr_type);
+ /* Broadcom ROM firmware (BCM4364B3 on Apple T2 Macs, no
+ * patchram) sets vendor bits in the legacy Event_Type.
+ */
+ if (hdev->manufacturer == 15 && info->type > LE_ADV_SCAN_RSP) {
+ /* 0x0f masks out upper vendor bits (0x10, 0x20, 0x80),
+ * extracting the standard legacy advertising type
+ * (0x00-0x04) stored in the low nibble (bits 0-3).
+ */
+ info->type &= 0x0f;
+ }
+
if (info->length <= max_adv_len(hdev)) {
rssi = info->data[info->length];
process_adv_report(hdev, info->type, &info->bdaddr,
--
2.52.0
next reply other threads:[~2026-10-15 11:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 11:49 Ton Sharp [this message]
2026-10-15 12:44 ` [bluetooth-next] Bluetooth: hci_event: strip Broadcom vendor bits from legacy adv report type bluez.test.bot
2026-10-15 19:40 ` [PATCH bluetooth-next] " 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=20261015114903.784731-1-66ton99@gmail.com \
--to=66ton99@gmail.com \
--cc=gargaditya08@live.com \
--cc=josemiguelo.ochoa@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.