public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v1 1/2] btdev: Fix handling of BT_HCI_CMD_LE_SET_RESOLV_ENABLE
@ 2025-09-26 16:20 Luiz Augusto von Dentz
  2025-09-26 16:20 ` [PATCH BlueZ v1 2/2] btdev: Fix advertisement state Luiz Augusto von Dentz
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2025-09-26 16:20 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

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(-)

diff --git a/emulator/btdev.c b/emulator/btdev.c
index 99e3e5cfa754..67c932d53d59 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -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 */
-- 
2.51.0


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

end of thread, other threads:[~2025-09-29 13:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-26 16:20 [PATCH BlueZ v1 1/2] btdev: Fix handling of BT_HCI_CMD_LE_SET_RESOLV_ENABLE Luiz Augusto von Dentz
2025-09-26 16:20 ` [PATCH BlueZ v1 2/2] btdev: Fix advertisement state Luiz Augusto von Dentz
2025-09-26 18:05 ` [BlueZ,v1,1/2] btdev: Fix handling of BT_HCI_CMD_LE_SET_RESOLV_ENABLE bluez.test.bot
2025-09-29 13:40 ` [PATCH BlueZ v1 1/2] " patchwork-bot+bluetooth

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