hci: emit HCI_STATE_WORKING after pending gap tasks have been completed

This commit is contained in:
Matthias Ringwald 2021-09-28 14:35:18 +02:00
parent ab4831a308
commit 25902c9660

View File

@ -1713,6 +1713,12 @@ static void hci_initializing_run(void){
} }
static void hci_init_done(void){ static void hci_init_done(void){
// init sequence complete, check if GAP Tasks are completed
if (hci_stack->gap_tasks != 0) {
hci_run_gap_tasks_classic();
return;
}
// done. tell the app // done. tell the app
log_info("hci_init_done -> HCI_STATE_WORKING"); log_info("hci_init_done -> HCI_STATE_WORKING");
hci_stack->state = HCI_STATE_WORKING; hci_stack->state = HCI_STATE_WORKING;