From 67494bc598450af4be2dbcd9a7b4de984bf829a5 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Thu, 2 Jun 2022 11:33:17 +0200 Subject: [PATCH] hci: remove hci_halting_defer --- src/hci.c | 13 ------------- src/hci.h | 7 ------- 2 files changed, 20 deletions(-) diff --git a/src/hci.c b/src/hci.c index d28317234..a359cd845 100644 --- a/src/hci.c +++ b/src/hci.c @@ -4682,8 +4682,6 @@ static void hci_halting_run(void) { btstack_run_loop_remove_timer(&hci_stack->timeout); - hci_stack->substate = HCI_HALTING_READY_FOR_CLOSE; - // no connections left, wait a bit to assert that btstack_cyrpto isn't waiting for an HCI event log_info("HCI_STATE_HALTING: wait 50 ms"); hci_stack->substate = HCI_HALTING_W4_CLOSE_TIMER; @@ -8299,17 +8297,6 @@ void gap_set_page_timeout(uint16_t page_timeout){ #endif -void hci_halting_defer(void){ - if (hci_stack->state != HCI_STATE_HALTING) return; - switch (hci_stack->substate){ - case HCI_HALTING_READY_FOR_CLOSE: - hci_stack->substate = HCI_HALTING_DEFER_CLOSE; - break; - default: - break; - } -} - #ifdef ENABLE_LE_PRIVACY_ADDRESS_RESOLUTION void hci_load_le_device_db_entry_into_resolving_list(uint16_t le_device_db_index){ if (le_device_db_index >= MAX_NUM_RESOLVING_LIST_ENTRIES) return; diff --git a/src/hci.h b/src/hci.h index 719eb0c06..4c7ddd896 100644 --- a/src/hci.h +++ b/src/hci.h @@ -816,8 +816,6 @@ typedef enum hci_init_state{ HCI_HALTING_LE_ADV_STOP, HCI_HALTING_LE_SCAN_STOP, HCI_HALTING_DISCONNECT_ALL, - HCI_HALTING_READY_FOR_CLOSE, - HCI_HALTING_DEFER_CLOSE, HCI_HALTING_W4_CLOSE_TIMER, HCI_HALTING_CLOSE, @@ -1612,11 +1610,6 @@ uint8_t gap_periodic_advertising_terminate_sync(uint16_t sync_handle); */ uint16_t hci_get_manufacturer(void); -/** - * Defer halt. Used by btstack_crypto to allow current HCI operation to complete - */ -void hci_halting_defer(void); - // Only for PTS testing /**