Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: hci_sync: Fix start/stop logic of default advertising
@ 2026-11-22 14:54 Simon Mikuda
  2026-11-22 17:33 ` bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Mikuda @ 2026-11-22 14:54 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Simon Mikuda, Marcel Holtmann, Luiz Augusto von Dentz

Default advertising (instance 0x00) was started even when it shouldn't.
Setup:
* adapter that supports extended commands
* connectable off
* advertising off

Steps to reproduce:
* add advertising with instance 1
* set connectable on

The kernel started advertising with instance 0x00, even when the
advertising property is off. We should only update the default
advertisement when the proper flag is set, and that is HCI_ADVERTISING.

Other advertisements (with instance > 0) have a separate connectable
flag, so we shouldn't update them at all when the connectable property
changes.

Fixes: 37adf701dd87 ("Bluetooth: Add per-instance adv disable/remove")
Signed-off-by: Simon Mikuda <simon.mikuda@streamunlimited.com>
---
 net/bluetooth/hci_sync.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 638589f77081..efcca81ce284 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -6648,11 +6648,9 @@ int hci_update_connectable_sync(struct hci_dev *hdev)
 		err = hci_update_adv_data_sync(hdev, hdev->cur_adv_instance);
 
 	/* Update the advertising parameters if necessary */
-	if (hci_dev_test_flag(hdev, HCI_ADVERTISING) ||
-	    !list_empty(&hdev->adv_instances)) {
+	if (hci_dev_test_flag(hdev, HCI_ADVERTISING)) {
 		if (ext_adv_capable(hdev))
-			err = hci_start_ext_adv_sync(hdev,
-						     hdev->cur_adv_instance);
+			err = hci_start_ext_adv_sync(hdev, 0x00);
 		else
 			err = hci_enable_advertising_sync(hdev);
 

base-commit: 4fe38719e6738feaa90486e36b0790dd5d960a96
-- 
2.43.0


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

* RE: Bluetooth: hci_sync: Fix start/stop logic of default advertising
  2026-11-22 14:54 [PATCH] Bluetooth: hci_sync: Fix start/stop logic of default advertising Simon Mikuda
@ 2026-11-22 17:33 ` bluez.test.bot
  0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2026-11-22 17:33 UTC (permalink / raw)
  To: linux-bluetooth, simon.mikuda

[-- Attachment #1: Type: text/plain, Size: 2285 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/1218676/

---Test result---

Test Summary:
CheckPatch                    PASS      0.78 seconds
VerifyFixes                   PASS      0.13 seconds
VerifySignedoff               PASS      0.13 seconds
GitLint                       PASS      0.35 seconds
SubjectPrefix                 PASS      0.12 seconds
BuildKernel                   PASS      31.87 seconds
CheckAllWarning               PASS      35.43 seconds
CheckSparse                   PASS      39.15 seconds
BuildKernel32                 PASS      32.38 seconds
CheckKernelLLVM               PASS      33.96 seconds
TestRunnerSetup               PASS      762.81 seconds
TestRunner_l2cap-tester       PASS      15.14 seconds
TestRunner_iso-tester         PASS      13.01 seconds
TestRunner_bnep-tester        PASS      3.19 seconds
TestRunner_mgmt-tester        FAIL      101.09 seconds
TestRunner_rfcomm-tester      PASS      4.55 seconds
TestRunner_sco-tester         PASS      5.66 seconds
TestRunner_ioctl-tester       PASS      4.72 seconds
TestRunner_mesh-tester        PASS      4.55 seconds
TestRunner_smp-tester         PASS      4.42 seconds
TestRunner_userchan-tester    PASS      3.29 seconds
TestRunner_6lowpan-tester     PASS      4.48 seconds
IncrementalBuild              PASS      29.18 seconds

Details
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 529, Passed: 523 (98.9%), Failed: 6, Not Run: 0

Failed Test Cases
Add Advertising - Success 16 (Connectable -> on)     Timed out    2.008 seconds
Add Advertising - Success 17 (Connectable -> off)    Timed out    2.008 seconds
Add Ext Advertising - Success 16 (Connectable -> on) Timed out    2.007 seconds
Add Ext Advertising - Success 17 (Connectable -> off) Timed out    2.007 seconds
Add Ext Advertising - Success (1m Connectable -> on) Timed out    2.006 seconds
Add Ext Advertising - Success (1m Connectable -> off) Timed out    2.006 seconds


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

---
Regards,
Linux Bluetooth


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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-22 14:54 [PATCH] Bluetooth: hci_sync: Fix start/stop logic of default advertising Simon Mikuda
2026-11-22 17:33 ` 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