Loading system/hci/include/hci_layer.h +2 −0 Original line number Diff line number Diff line Loading @@ -110,3 +110,5 @@ const hci_t *hci_layer_get_test_interface( const packet_fragmenter_t *packet_fragmenter_interface, const vendor_t *vendor_interface, const low_power_manager_t *low_power_manager_interface); void hci_layer_cleanup_interface(); system/hci/src/hci_layer.c +15 −0 Original line number Diff line number Diff line Loading @@ -777,6 +777,21 @@ static void init_layer_interface() { } } void hci_layer_cleanup_interface() { if (interface_created) { interface.send_low_power_command = NULL; interface.do_postload = NULL; data_dispatcher_free(interface.event_dispatcher); interface.set_data_queue = NULL; interface.transmit_command = NULL; interface.transmit_command_futured = NULL; interface.transmit_downward = NULL; interface_created = false; } } static const hci_hal_callbacks_t hal_callbacks = { hal_says_data_ready }; Loading system/hci/test/hci_layer_test.cpp +2 −4 Original line number Diff line number Diff line Loading @@ -520,6 +520,7 @@ class HciLayerTest : public AlarmTestHarness { protected: virtual void SetUp() { AlarmTestHarness::SetUp(); module_management_start(); hci = hci_layer_get_test_interface( &buffer_allocator, Loading @@ -531,10 +532,6 @@ class HciLayerTest : public AlarmTestHarness { &low_power_manager ); // Make sure the data dispatcher allocation isn't tracked allocation_tracker_reset(); module_management_start(); packet_index = 0; data_size_sum = 0; Loading Loading @@ -584,6 +581,7 @@ class HciLayerTest : public AlarmTestHarness { EXPECT_CALL_COUNT(vendor_close, 1); semaphore_free(done); hci_layer_cleanup_interface(); module_management_stop(); AlarmTestHarness::TearDown(); } Loading Loading
system/hci/include/hci_layer.h +2 −0 Original line number Diff line number Diff line Loading @@ -110,3 +110,5 @@ const hci_t *hci_layer_get_test_interface( const packet_fragmenter_t *packet_fragmenter_interface, const vendor_t *vendor_interface, const low_power_manager_t *low_power_manager_interface); void hci_layer_cleanup_interface();
system/hci/src/hci_layer.c +15 −0 Original line number Diff line number Diff line Loading @@ -777,6 +777,21 @@ static void init_layer_interface() { } } void hci_layer_cleanup_interface() { if (interface_created) { interface.send_low_power_command = NULL; interface.do_postload = NULL; data_dispatcher_free(interface.event_dispatcher); interface.set_data_queue = NULL; interface.transmit_command = NULL; interface.transmit_command_futured = NULL; interface.transmit_downward = NULL; interface_created = false; } } static const hci_hal_callbacks_t hal_callbacks = { hal_says_data_ready }; Loading
system/hci/test/hci_layer_test.cpp +2 −4 Original line number Diff line number Diff line Loading @@ -520,6 +520,7 @@ class HciLayerTest : public AlarmTestHarness { protected: virtual void SetUp() { AlarmTestHarness::SetUp(); module_management_start(); hci = hci_layer_get_test_interface( &buffer_allocator, Loading @@ -531,10 +532,6 @@ class HciLayerTest : public AlarmTestHarness { &low_power_manager ); // Make sure the data dispatcher allocation isn't tracked allocation_tracker_reset(); module_management_start(); packet_index = 0; data_size_sum = 0; Loading Loading @@ -584,6 +581,7 @@ class HciLayerTest : public AlarmTestHarness { EXPECT_CALL_COUNT(vendor_close, 1); semaphore_free(done); hci_layer_cleanup_interface(); module_management_stop(); AlarmTestHarness::TearDown(); } Loading