From 1200fd93148bd4090837494349f619639306f67b Mon Sep 17 00:00:00 2001 From: Andries Kruithof Date: Thu, 12 Jan 2023 14:55:07 +0100 Subject: [PATCH] Bluetooth: host: fix conditional compile for broadcaster role The call to bt_adv_reset_adv_pool is only required in the broadcaster role, and not in the observer role, regardless of the setting of CONFIG_BT_EXT_ADV As the code was this call was also made for the observer. Note: handling of the setting of CONFIG_BT_EXT_ADV is already handled in the bt_adv_reset_adv_pool function Signed-off-by: Andries Kruithof --- subsys/bluetooth/host/hci_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subsys/bluetooth/host/hci_core.c b/subsys/bluetooth/host/hci_core.c index 2b9c86436b9..07e9d1290b4 100644 --- a/subsys/bluetooth/host/hci_core.c +++ b/subsys/bluetooth/host/hci_core.c @@ -3796,9 +3796,9 @@ int bt_disable(void) bt_monitor_send(BT_MONITOR_CLOSE_INDEX, NULL, 0); -#if defined(CONFIG_BT_EXT_ADV) || defined(CONFIG_BT_BROADCASTER) +#if defined(CONFIG_BT_BROADCASTER) bt_adv_reset_adv_pool(); -#endif /* CONFIG_BT_EXT_ADV || CONFIG_BT_BROADCASTER */ +#endif /* CONFIG_BT_BROADCASTER */ #if defined(CONFIG_BT_PRIVACY) k_work_cancel_delayable(&bt_dev.rpa_update);