Loading system/btif/src/stack_manager.cc +9 −1 Original line number Diff line number Diff line Loading @@ -65,6 +65,7 @@ #endif #include "bta/sys/bta_sys_int.h" #include "bta_dm_int.h" #include "main/shim/controller.h" using bluetooth::common::MessageLoopThread; Loading Loading @@ -227,7 +228,14 @@ static void event_start_up_stack(UNUSED_ATTR void* context) { bta_dm_enable(bte_dm_evt); bta_sys_set_state(BTA_SYS_HW_STARTING); BTM_DeviceReset(); btm_acl_device_down(); BTM_db_reset(); if (bluetooth::shim::is_gd_controller_enabled()) { CHECK(module_start_up(get_module(GD_CONTROLLER_MODULE))); } else { CHECK(module_start_up(get_module(CONTROLLER_MODULE))); } BTM_reset_complete(); if (future_await(local_hack_future) != FUTURE_SUCCESS) { LOG_ERROR("%s failed to start up the stack", __func__); Loading system/main/shim/btm_api.h +3 −12 Original line number Diff line number Diff line Loading @@ -895,18 +895,9 @@ void BTM_BleEnableDisableFilterFeature(uint8_t enable, ******************************************************************************/ uint8_t BTM_BleMaxMultiAdvInstanceCount(); /******************************************************************************* * * Function BTM_DeviceReset * * Description This function is called to reset the controller. The * Callback function if provided is called when startup of the * device has completed. * * Returns void * ******************************************************************************/ void BTM_DeviceReset(); void BTM_db_reset(void); void BTM_reset_complete(); /******************************************************************************* * Loading system/stack/btm/btm_devctl.cc +2 −24 Original line number Diff line number Diff line Loading @@ -111,14 +111,10 @@ void btm_dev_init() { * * Function btm_db_reset * * Description This function is called by BTM_DeviceReset and clears out * any pending callbacks for inquiries, discoveries, other * pending functions that may be in progress. * * Returns void * ******************************************************************************/ static void btm_db_reset(void) { void BTM_db_reset(void) { tBTM_CMPL_CB* p_cb; btm_inq_db_reset(); Loading Loading @@ -170,8 +166,7 @@ bool set_sec_state_idle(void* data, void* context) { return true; } static void reset_complete(void* result) { CHECK(result == FUTURE_SUCCESS); void BTM_reset_complete() { const controller_t* controller = controller_get_interface(); /* Tell L2CAP that all connections are gone */ Loading Loading @@ -223,23 +218,6 @@ static void reset_complete(void* result) { send_bta_sys_hw_event(BTA_SYS_EVT_STACK_ENABLED_EVT); } // TODO(zachoverflow): remove this function void BTM_DeviceReset() { /* Flush all ACL connections */ btm_acl_device_down(); /* Clear the callback, so application would not hang on reset */ btm_db_reset(); if (bluetooth::shim::is_gd_controller_enabled()) { module_start_up_callbacked_wrapper(get_module(GD_CONTROLLER_MODULE), &bt_startup_thread, reset_complete); } else { module_start_up_callbacked_wrapper(get_module(CONTROLLER_MODULE), &bt_startup_thread, reset_complete); } } /******************************************************************************* * * Function BTM_IsDeviceUp Loading system/stack/include/btm_api.h +3 −12 Original line number Diff line number Diff line Loading @@ -44,18 +44,9 @@ * DEVICE CONTROL and COMMON FUNCTIONS ****************************************************************************/ /******************************************************************************* * * Function BTM_DeviceReset * * Description This function is called to reset the controller. The * Callback function if provided is called when startup of the * device has completed. * * Returns void * ******************************************************************************/ void BTM_DeviceReset(); void BTM_db_reset(void); void BTM_reset_complete(); /******************************************************************************* * Loading Loading
system/btif/src/stack_manager.cc +9 −1 Original line number Diff line number Diff line Loading @@ -65,6 +65,7 @@ #endif #include "bta/sys/bta_sys_int.h" #include "bta_dm_int.h" #include "main/shim/controller.h" using bluetooth::common::MessageLoopThread; Loading Loading @@ -227,7 +228,14 @@ static void event_start_up_stack(UNUSED_ATTR void* context) { bta_dm_enable(bte_dm_evt); bta_sys_set_state(BTA_SYS_HW_STARTING); BTM_DeviceReset(); btm_acl_device_down(); BTM_db_reset(); if (bluetooth::shim::is_gd_controller_enabled()) { CHECK(module_start_up(get_module(GD_CONTROLLER_MODULE))); } else { CHECK(module_start_up(get_module(CONTROLLER_MODULE))); } BTM_reset_complete(); if (future_await(local_hack_future) != FUTURE_SUCCESS) { LOG_ERROR("%s failed to start up the stack", __func__); Loading
system/main/shim/btm_api.h +3 −12 Original line number Diff line number Diff line Loading @@ -895,18 +895,9 @@ void BTM_BleEnableDisableFilterFeature(uint8_t enable, ******************************************************************************/ uint8_t BTM_BleMaxMultiAdvInstanceCount(); /******************************************************************************* * * Function BTM_DeviceReset * * Description This function is called to reset the controller. The * Callback function if provided is called when startup of the * device has completed. * * Returns void * ******************************************************************************/ void BTM_DeviceReset(); void BTM_db_reset(void); void BTM_reset_complete(); /******************************************************************************* * Loading
system/stack/btm/btm_devctl.cc +2 −24 Original line number Diff line number Diff line Loading @@ -111,14 +111,10 @@ void btm_dev_init() { * * Function btm_db_reset * * Description This function is called by BTM_DeviceReset and clears out * any pending callbacks for inquiries, discoveries, other * pending functions that may be in progress. * * Returns void * ******************************************************************************/ static void btm_db_reset(void) { void BTM_db_reset(void) { tBTM_CMPL_CB* p_cb; btm_inq_db_reset(); Loading Loading @@ -170,8 +166,7 @@ bool set_sec_state_idle(void* data, void* context) { return true; } static void reset_complete(void* result) { CHECK(result == FUTURE_SUCCESS); void BTM_reset_complete() { const controller_t* controller = controller_get_interface(); /* Tell L2CAP that all connections are gone */ Loading Loading @@ -223,23 +218,6 @@ static void reset_complete(void* result) { send_bta_sys_hw_event(BTA_SYS_EVT_STACK_ENABLED_EVT); } // TODO(zachoverflow): remove this function void BTM_DeviceReset() { /* Flush all ACL connections */ btm_acl_device_down(); /* Clear the callback, so application would not hang on reset */ btm_db_reset(); if (bluetooth::shim::is_gd_controller_enabled()) { module_start_up_callbacked_wrapper(get_module(GD_CONTROLLER_MODULE), &bt_startup_thread, reset_complete); } else { module_start_up_callbacked_wrapper(get_module(CONTROLLER_MODULE), &bt_startup_thread, reset_complete); } } /******************************************************************************* * * Function BTM_IsDeviceUp Loading
system/stack/include/btm_api.h +3 −12 Original line number Diff line number Diff line Loading @@ -44,18 +44,9 @@ * DEVICE CONTROL and COMMON FUNCTIONS ****************************************************************************/ /******************************************************************************* * * Function BTM_DeviceReset * * Description This function is called to reset the controller. The * Callback function if provided is called when startup of the * device has completed. * * Returns void * ******************************************************************************/ void BTM_DeviceReset(); void BTM_db_reset(void); void BTM_reset_complete(); /******************************************************************************* * Loading