Bluetooth: controller: Fix compile error in observer only support

Fix compile error due to missing conditional compile of
connection related code when selecting only observer state
support.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2019-02-12 17:09:22 +05:30 committed by Anas Nashif
parent 7a99035515
commit dd25e59762

View file

@ -413,10 +413,16 @@ static u8_t disable(u16_t handle)
u8_t ret;
scan = ull_scan_is_enabled_get(handle);
if (!scan || scan->lll.conn) {
if (!scan) {
return BT_HCI_ERR_CMD_DISALLOWED;
}
#if defined(CONFIG_BT_CONN)
if (scan->lll.conn) {
return BT_HCI_ERR_CMD_DISALLOWED;
}
#endif
ret = ull_scan_disable(handle, scan);
if (ret) {
return ret;