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

* RE: Bluetooth: hci_sync: Don't filter duplicates while a PA sync is pending
  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
  0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2026-11-22 22:47 UTC (permalink / raw)
  To: linux-bluetooth, simon.mikuda

[-- Attachment #1: Type: text/plain, Size: 1879 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1218948/

---Test result---

Test Summary:
CheckPatch                    PASS      0.58 seconds
VerifyFixes                   PASS      0.11 seconds
VerifySignedoff               PASS      0.11 seconds
GitLint                       PASS      0.29 seconds
SubjectPrefix                 PASS      0.11 seconds
BuildKernel                   PASS      21.45 seconds
CheckAllWarning               PASS      24.62 seconds
CheckSparse                   PASS      26.05 seconds
BuildKernel32                 PASS      21.38 seconds
CheckKernelLLVM               PASS      22.03 seconds
TestRunnerSetup               PASS      497.75 seconds
TestRunner_l2cap-tester       PASS      14.24 seconds
TestRunner_iso-tester         PASS      11.88 seconds
TestRunner_bnep-tester        PASS      3.20 seconds
TestRunner_mgmt-tester        PASS      85.27 seconds
TestRunner_rfcomm-tester      PASS      4.44 seconds
TestRunner_sco-tester         PASS      5.49 seconds
TestRunner_ioctl-tester       PASS      4.54 seconds
TestRunner_mesh-tester        FAIL      3.45 seconds
TestRunner_smp-tester         PASS      4.37 seconds
TestRunner_userchan-tester    PASS      3.23 seconds
TestRunner_6lowpan-tester     PASS      4.40 seconds
IncrementalBuild              PASS      19.38 seconds

Details
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner
Output:
Total: 10, Passed: 9 (90.0%), Failed: 1, Not Run: 0

Failed Test Cases
Mesh - Send cancel - 2                               Failed       0.023 seconds


https://github.com/bluez/bluetooth-next/pull/1193

---
Regards,
Linux Bluetooth


^ permalink raw reply	[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