btdev: Fix handling of BT_HCI_CMD_LE_SET_RESOLV_ENABLE
Luiz Augusto von Dentz
maintainerPATCH 1/2 btdev: Fix handling of BT_HCI_CMD_LE_SET_RESOLV_ENABLE
From: Luiz Augusto von Dentz <[email protected]>
Checking for le_adv_enable alone is not valid considering the comments itself states that peridic advertising shall be allowed.
--- emulator/btdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
emulator/btdev.c +1 -1
@@ -4273,7 +4273,7 @@ static int cmd_set_rl_enable(struct btdev *dev, const void *data, uint8_t len)* • an HCI_LE_Create_Connection, HCI_LE_Extended_Create_Connection, * or HCI_LE_Periodic_Advertising_Create_Sync command is outstanding. */ -if (dev->le_adv_enable || dev->le_scan_enable) +if ((dev->le_adv_enable && !dev->le_pa_enable) || dev->le_scan_enable)return -EPERM ;/* Valid range for address resolution enable is 0x00 to 0x01 */
Signature · 1 line
2.51.0
Luiz Augusto von Dentz
maintainerPATCH 2/2 btdev: Fix advertisement state
From: Luiz Augusto von Dentz <[email protected]>
The LE Advertisement state shall be updated whenever an advertisement is disabled since if all advertisments sets are disabled it shall be reflected in le_adv_enable.
--- emulator/btdev.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
emulator/btdev.c +15 -0
@@ -4789,9 +4789,17 @@ static bool match_ext_adv_handle(const void *data, const void *match_data)return ext_adv->handle == handle; } +static bool match_ext_adv_enable (const void *data,const void *match_data) +{ +const struct le_ext_adv *ext_adv = data; + +return ext_adv->enable; +} +static void ext_adv_disable (void *data,void *user_data) {struct le_ext_adv *ext_adv = data; +struct btdev *btdev = ext_adv->dev;uint8_t handle =PTR_TO_UINT (user_data);if (handle && ext_adv->handle != handle)
@@ -4807,6 +4815,13 @@ static void ext_adv_disable(void *data, void *user_data) } ext_adv->enable =0x00 ; + +/* Consider le_adv_enable disabled if all advertising sets are +* disabled. +*/ + ext_adv =queue_find (btdev->le_ext_adv, match_ext_adv_enable,NULL ); +if (!ext_adv) + btdev->le_adv_enable =0x00 ; }static bool ext_adv_is_connectable (struct le_ext_adv *ext_adv)
Signature · 1 line
2.51.0
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/project/bluetooth/list/?series=1006636
---Test result---
Test Summary:
CheckPatch PENDING 0.36 seconds GitLint PENDING 0.39 seconds BuildEll PASS 18.51 seconds BluezMake PASS 4365.77 seconds MakeCheck PASS 19.86 seconds MakeDistcheck PASS 175.19 seconds CheckValgrind PASS 233.22 seconds CheckSmatch WARNING 273.46 seconds bluezmakeextell PASS 124.03 seconds IncrementalBuild PENDING 0.45 seconds ScanBuild PASS 866.50 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:emulator/btdev.c:456:29: warning: Variable length array is used.emulator/btdev.c:456:29: warning: Variable length array is used.
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Hello:
This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Quoted 7 lines · On Fri, 26 Sep 2025 12:20:01 -0400 you wrote:
From: Luiz Augusto von Dentz <[email protected]>
Checking for
le_adv_enablealone is not valid considering the comments itself states that peridic advertising shall be allowed.--- emulator/btdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [BlueZ,v1,1/2] btdev: Fix handling of BT_HCI_CMD_LE_SET_RESOLV_ENABLE
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=a6d35e91b80b - [BlueZ,v1,2/2] btdev: Fix advertisement state https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=e7c77f80787d
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html