* [PATCH] Bluetooth: add passive-discovery quirk for Intel 9460/9560
2026-11-17 20:22 [PATCH 0/1] Bluetooth: add passive-discovery quirk for Intel 9460/9560 Ofir Mano
@ 2026-11-17 20:22 ` Ofir Mano
0 siblings, 0 replies; 2+ messages in thread
From: Ofir Mano @ 2026-11-17 20:22 UTC (permalink / raw)
To: linux-bluetooth; +Cc: netdev, Ofir Mano
Some Intel 9460/9560 (8087:0aaa) controllers stop reporting connectable
advertisers after the first active-scan SCAN_REQ/SCAN_RSP exchange, and
do not report them again until the controller is reset.
With WebAuthn hybrid (caBLE) this is fatal: the phone advertises a
connectable ADV_IND carrying the FIDO service data, the controller
reports it once, and every later operation times out even though the
phone keeps advertising. btmon shows the controller emits no
advertising report at all on failing attempts, i.e. the loss is before
the kernel's report path.
The same controller and firmware build work on Windows, which uses
passive scanning for discovery; Linux uses active scanning and hits the
controller state.
Add HCI_QUIRK_PASSIVE_DISCOVERY and set it for 8087:0aaa. When set,
discovery requests LE_SCAN_PASSIVE, and process_adv_report() delivers
passive reports during DISCOVERY_FINDING -- the existing passive filter
would otherwise drop them before they reach userspace. Other controllers
are unchanged.
Trade-off: on affected controllers, scan-response-only data (device
names, service UUIDs carried only in the SCAN_RSP) is not available
during discovery. This matches how the vendor stack drives the same
hardware.
Tested on Intel 9460/9560 (8087:0aaa), firmware 169 (2024-08-13):
- before: first hybrid operation succeeds, subsequent ones fail until
a controller reset;
- after: ~1 failure(timeout) in 18 consecutive operations.
Link: https://bbs.archlinux.org/viewtopic.php?id=298396
Link: https://discussion.fedoraproject.org/t/intel-bluetooth-wont-scan-ble-device-works-on-windows-blank-scan-on-linux/196326
Link: https://issues.chromium.org/issues/41485480
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2267051
Signed-off-by: Ofir Mano <ofir@xmousse.com>
---
drivers/bluetooth/btusb.c | 7 ++++++-
include/net/bluetooth/hci.h | 15 +++++++++++++++
net/bluetooth/hci_event.c | 9 ++++++++-
net/bluetooth/hci_sync.c | 6 +++++-
4 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index a6ab059..f7e3018 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -69,6 +69,7 @@ static struct usb_driver btusb_driver;
#define BTUSB_ACTIONS_SEMI BIT(27)
#define BTUSB_BARROT BIT(28)
#define BTUSB_BROKEN_EXT_SCAN BIT(29)
+#define BTUSB_INTEL_PASSIVE_DISCOVERY BIT(30)
static const struct usb_device_id btusb_table[] = {
/*
@@ -517,7 +518,8 @@ static const struct usb_device_id quirks_table[] = {
{ USB_DEVICE(0x8087, 0x0a2b), .driver_info = BTUSB_INTEL_COMBINED },
{ USB_DEVICE(0x8087, 0x0aa7), .driver_info = BTUSB_INTEL_COMBINED |
BTUSB_INTEL_BROKEN_SHUTDOWN_LED },
- { USB_DEVICE(0x8087, 0x0aaa), .driver_info = BTUSB_INTEL_COMBINED },
+ { USB_DEVICE(0x8087, 0x0aaa), .driver_info = BTUSB_INTEL_COMBINED |
+ BTUSB_INTEL_PASSIVE_DISCOVERY },
/* Other Intel Bluetooth devices */
{ USB_VENDOR_AND_INTERFACE_INFO(0x8087, 0xe0, 0x01, 0x01),
@@ -4356,6 +4358,9 @@ static int btusb_probe(struct usb_interface *intf,
if (id->driver_info & BTUSB_INTEL_BROKEN_SHUTDOWN_LED)
btintel_set_flag(hdev, INTEL_BROKEN_SHUTDOWN_LED);
+
+ if (id->driver_info & BTUSB_INTEL_PASSIVE_DISCOVERY)
+ hci_set_quirk(hdev, HCI_QUIRK_PASSIVE_DISCOVERY);
}
if (id->driver_info & BTUSB_MARVELL)
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 50f0eef..94c36c6 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -340,6 +340,21 @@ enum {
*/
HCI_QUIRK_BROKEN_LE_CODED,
+ /*
+ * When this quirk is set, LE discovery uses passive scanning.
+ *
+ * Some Intel controllers stop reporting connectable advertisers after
+ * the first active-scan SCAN_REQ/SCAN_RSP exchange, until the
+ * controller is reset. This breaks caBLE (WebAuthn hybrid) passkeys:
+ * the connectable advertisement is reported once and then never
+ * again. Passive scanning avoids the exchange and reports the advert
+ * reliably.
+ *
+ * This quirk can be set before hci_register_dev is called or
+ * during the hdev->setup vendor callback.
+ */
+ HCI_QUIRK_PASSIVE_DISCOVERY,
+
/*
* When this quirk is set, the HCI_OP_READ_ENC_KEY_SIZE command is
* skipped during an HCI_EV_ENCRYPT_CHANGE event. This is required
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index b39eac1..3aa4c8b 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -6310,7 +6310,14 @@ static void process_adv_report(struct hci_dev *hdev, u8 type, bdaddr_t *bdaddr,
if (type == LE_ADV_DIRECT_IND)
return;
- if (!hci_pend_le_action_lookup(&hdev->pend_le_reports,
+ /* Controllers with HCI_QUIRK_PASSIVE_DISCOVERY use passive
+ * scanning only because they stop reporting connectable
+ * advertisers after the first active-scan exchange; deliver
+ * those reports during discovery instead of dropping them.
+ */
+ if (!(hci_test_quirk(hdev, HCI_QUIRK_PASSIVE_DISCOVERY) &&
+ d->state == DISCOVERY_FINDING) &&
+ !hci_pend_le_action_lookup(&hdev->pend_le_reports,
bdaddr, bdaddr_type) &&
idr_is_empty(&hdev->adv_monitors_idr))
return;
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 1101358..9da2404 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -6182,6 +6182,7 @@ int hci_inquiry_sync(struct hci_dev *hdev, u8 length, u8 num_rsp)
static int hci_active_scan_sync(struct hci_dev *hdev, uint16_t interval)
{
u8 own_addr_type;
+ u8 scan_type = LE_SCAN_ACTIVE;
/* Accept list is not used for discovery */
u8 filter_policy = 0x00;
/* Default is to enable duplicates filter */
@@ -6234,7 +6235,10 @@ static int hci_active_scan_sync(struct hci_dev *hdev, uint16_t interval)
filter_dup = LE_SCAN_FILTER_DUP_DISABLE;
}
- err = hci_start_scan_sync(hdev, LE_SCAN_ACTIVE, interval,
+ if (hci_test_quirk(hdev, HCI_QUIRK_PASSIVE_DISCOVERY))
+ scan_type = LE_SCAN_PASSIVE;
+
+ err = hci_start_scan_sync(hdev, scan_type, interval,
hdev->le_scan_window_discovery,
own_addr_type, filter_policy, filter_dup);
if (!err)
^ permalink raw reply related [flat|nested] 2+ messages in thread