Skip to contentSkip to conversation

advertising: Refresh only advertisements that depend on discoverable

PATCH Applied Simon Mikuda 3 participants 3 messages Nov 22 – Nov 23 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 advertising: Refresh only advertisements that depend on discoverable

A change of the discoverable setting sets every advertisement again, although only a peripheral one without its own Flags depends on it. Some controllers can disturb a running BIG when the advertising set of its broadcast source is restarted (an NXP one skips every third BIG event after it).

Steps to reproduce:
1. Start a broadcast source whose announcement is a registered advertisement (LEAdvertisingManager1, Type "broadcast").
2. bluetoothctl discoverable on
3. The advertising set of the broadcast is disabled and enabled again (btmon), under the BIG.

Fixes 91d4b17160b8 ("advertising: Configure discoverable flag based on adapter settings")
Assisted-by Claude:claude-opus-5-5
---
 src/advertising.c | 4 ++++
 1 file changed, 4 insertions(+)
src/advertising.c +4 -0
index b68ff28f5..d07068c6c 100644
@@ -2180,6 +2180,10 @@ static void manager_refresh(void *data, void *user_data)
 {
 	struct btd_adv_client *client = data;
 
+	/* Only a peripheral without its own Flags depends on discoverable */
+	if (client->type != AD_TYPE_PERIPHERAL || bt_ad_has_flags(client->data))
+		return;
+
 	refresh_advertisement(client, NULL);
 }
 

base-commit: 1adfe662efeff12997df9ddd0960dbd0de9c8ea7

Signature · 1 line
2.43.0
#1 lore raw

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/1218566/

---Test result---

Test Summary:

CheckPatch                    PASS      0.31 seconds
GitLint                       PASS      0.22 seconds
BuildEll                      PASS      20.39 seconds
BluezMake                     PASS      312.91 seconds
CheckSmatch                   WARNING   318.49 seconds
bluezmakeextell               PASS      100.52 seconds
TestFunctional                PASS      1233.40 seconds
IncrementalBuild              PASS      313.26 seconds
ScanBuild                     PASS      1196.06 seconds

Details
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
src/advertising.c: note: in included file:./src/shared/mgmt.h:95:25: error: redefinition of unsigned int enum mgmt_io_capabilitysrc/advertising.c: note: in included file:./src/shared/mgmt.h:95:25: error: redefinition of unsigned int enum mgmt_io_capability

https://github.com/bluez/bluez/pull/2865

---
Regards,
Linux Bluetooth

#2 lore raw
In reply to Simon Mikuda
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 6 lines · On Sun, 22 Nov 2026 11:31:24 +0100 you wrote:

A change of the discoverable setting sets every advertisement again, although only a peripheral one without its own Flags depends on it. Some controllers can disturb a running BIG when the advertising set of its broadcast source is restarted (an NXP one skips every third BIG event after it).

Quoted 8 lines

Steps to reproduce:
1. Start a broadcast source whose announcement is a registered advertisement (LEAdvertisingManager1, Type "broadcast").
2. bluetoothctl discoverable on
3. The advertising set of the broadcast is disabled and enabled again (btmon), under the BIG.

[...]

Here is the summary with links:
- [BlueZ] advertising: Refresh only advertisements that depend on discoverable

    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=4242832ef817

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html