From a6d35e91b80b6f52323003254affa944bdee6287 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 26 Sep 2025 12:00:43 -0400 Subject: [PATCH] btdev: Fix handling of BT_HCI_CMD_LE_SET_RESOLV_ENABLE 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 99e3e5cfa..67c932d53 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.47.3