From c4a7e54a5d599098b2a12c7dae11c3e583b38719 Mon Sep 17 00:00:00 2001 From: Thomas Deppe Date: Thu, 6 Mar 2025 16:07:47 +0100 Subject: [PATCH] [nrf fromlist] Bluetooth: Host: Fix Advertising Coding Selection as peripheral Fix mistake in host implementation of Advertising Coding Selection. The host should only try set the BT_LE_FEAT_BIT_ADV_CODING_SEL_HOST when the observer role is enabled. If a broadcaster enables the CONFIG_BT_EXT_ADV_CODING_SELECTION Kconfig option bluetooth will fail to initialise. Upstream PR #: 86731 Signed-off-by: Thomas Deppe --- subsys/bluetooth/host/hci_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/subsys/bluetooth/host/hci_core.c b/subsys/bluetooth/host/hci_core.c index b01c49d3243b..338cff5ba883 100644 --- a/subsys/bluetooth/host/hci_core.c +++ b/subsys/bluetooth/host/hci_core.c @@ -3684,6 +3684,7 @@ static int le_init(void) } if (IS_ENABLED(CONFIG_BT_EXT_ADV_CODING_SELECTION) && + IS_ENABLED(CONFIG_BT_OBSERVER) && BT_FEAT_LE_ADV_CODING_SEL(bt_dev.le.features)) { err = le_set_host_feature(BT_LE_FEAT_BIT_ADV_CODING_SEL_HOST, 1); if (err) {