hci: assert hci_run is executed once after transition to working state

This commit is contained in:
Matthias Ringwald 2022-05-04 11:25:04 +02:00
parent 3086bccee3
commit d0dea5fb1d

View File

@ -6052,21 +6052,25 @@ static bool hci_run_general_pending_commands(void){
static void hci_run(void){
// stack state sub statemachines
// halting needs to be called even if we cannot send command packet now
switch (hci_stack->state) {
case HCI_STATE_INITIALIZING:
hci_initializing_run();
return;
break;
case HCI_STATE_HALTING:
hci_halting_run();
return;
break;
case HCI_STATE_FALLING_ASLEEP:
hci_falling_asleep_run();
return;
break;
default:
break;
}
// allow to run after initialization to working transition
if (hci_stack->state != HCI_STATE_WORKING){
return;
}
bool done;
// send continuation fragments first, as they block the prepared packet buffer