Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: hci_sync: Don't filter duplicates while a PA sync is pending
@ 2026-11-22 20:13 Simon Mikuda
  2026-11-22 22:47 ` bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Mikuda @ 2026-11-22 20:13 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Simon Mikuda, Marcel Holtmann, Luiz Augusto von Dentz

To sync to a broadcast, the controller needs an extended advertisement of
the source after LE Periodic Advertising Create Sync, because that carries
the SyncInfo. Some controllers, for example an NXP one and an Intel
BE200, only use the SyncInfo of an advertisement they report to
the host. With the duplicates filter on, they report a source once per
scan. Passive scanning starts right before Create Sync, so when the source
is reported in between, its later advertisements are filtered out and the
sync waits until the host cancels it after 20 seconds:

    21:59:14.147 > LE Extended Advertising Report  50:1E:2D:9F:95:23
    21:59:14.149 < LE Periodic Advertising Create Sync
    21:59:35.131 < LE Periodic Advertising Create Sync Cancel
    21:59:35.132 > LE Periodic Advertising Sync Established
                     Status: Operation Cancelled by Host (0x44)

Turn the filter off while a PA sync is pending. The accept list limits the
reports to the source being synced.

Steps to reproduce:
1. Start a broadcast on another device.
2. Join it, leave and join again, repeatedly. Rarely the sync takes more
   than 10 seconds, and until then there is no sound.

Fixes: eca0ae4aea66 ("Bluetooth: Add initial implementation of BIS connections")
Signed-off-by: Simon Mikuda <simon.mikuda@streamunlimited.com>
---
 net/bluetooth/hci_sync.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 638589f77081..88ce0ceef394 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -3645,6 +3645,12 @@ static int hci_passive_scan_sync(struct hci_dev *hdev)
 		filter_dups = LE_SCAN_FILTER_DUP_DISABLE;
 	}
 
+	/* The controller only syncs on a report it doesn't filter as a duplicate,
+	 * and that report can come before the sync is created.
+	 */
+	if (hci_dev_test_flag(hdev, HCI_PA_SYNC))
+		filter_dups = LE_SCAN_FILTER_DUP_DISABLE;
+
 	bt_dev_dbg(hdev, "LE passive scan with acceptlist = %d", filter_policy);
 
 	return hci_start_scan_sync(hdev, LE_SCAN_PASSIVE, interval, window,

base-commit: 4fe38719e6738feaa90486e36b0790dd5d960a96
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-22 22:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-22 20:13 [PATCH] Bluetooth: hci_sync: Don't filter duplicates while a PA sync is pending Simon Mikuda
2026-11-22 22:47 ` bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox