From f3b012f9c751214cad32f85758fbb939f3911c04 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Thu, 23 Feb 2017 14:50:59 +0100 Subject: [PATCH] hci: skip SCO over HCI commands if not defined --- src/hci.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/hci.c b/src/hci.c index 2f966945b..93238e84f 100644 --- a/src/hci.c +++ b/src/hci.c @@ -1507,15 +1507,21 @@ static void hci_initializing_event_handler(uint8_t * packet, uint16_t size){ return; } break; -#else + +#else /* !ENABLE_SCO_OVER_HCI */ + case HCI_INIT_W4_WRITE_SCAN_ENABLE: - if (!hci_le_supported()){ - // SKIP LE init for Classic only configuration - hci_init_done(); +#ifdef ENABLE_BLE + if (hci_le_supported()){ + hci_stack->substate = HCI_INIT_LE_READ_BUFFER_SIZE; return; } #endif - break; + // SKIP LE init for Classic only configuration + hci_init_done(); + return; +#endif /* ENABLE_SCO_OVER_HCI */ + // Response to command before init done state -> init done case (HCI_INIT_DONE-1): hci_init_done();