From 6597896f0a89932bf5795362bf8b984760b0e75b Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Sun, 28 May 2017 12:18:53 +0300 Subject: [PATCH] Bluetooth: Fix missing test for BLUETOOTH_CONN with DLE There's no point in doing anything about DLE if connection support is not enabled. Signed-off-by: Johan Hedberg --- subsys/bluetooth/host/hci_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subsys/bluetooth/host/hci_core.c b/subsys/bluetooth/host/hci_core.c index 2c969a26d95..8afb128fc63 100644 --- a/subsys/bluetooth/host/hci_core.c +++ b/subsys/bluetooth/host/hci_core.c @@ -3338,7 +3338,8 @@ static int le_init(void) net_buf_unref(rsp); } - if (BT_FEAT_LE_DLE(bt_dev.le.features)) { + if (IS_ENABLED(CONFIG_BLUETOOTH_CONN) && + BT_FEAT_LE_DLE(bt_dev.le.features)) { struct bt_hci_cp_le_write_default_data_len *cp; struct bt_hci_rp_le_read_max_data_len *rp; struct net_buf *buf, *rsp;