Loading system/device/include/controller.h +0 −9 Original line number Diff line number Diff line Loading @@ -36,16 +36,7 @@ typedef struct controller_t { const uint8_t* (*get_ble_supported_states)(void); // Get the cached acl data sizes for the controller. uint16_t (*get_acl_data_size_classic)(void); uint16_t (*get_acl_data_size_ble)(void); uint16_t (*get_iso_data_size)(void); // Get the cached acl packet sizes for the controller. // This is a convenience function for the respective // acl data size + size of the acl header. uint16_t (*get_acl_packet_size_classic)(void); uint16_t (*get_acl_packet_size_ble)(void); uint16_t (*get_iso_packet_size)(void); uint16_t (*get_ble_default_data_packet_length)(void); Loading system/main/shim/controller.cc +0 −16 Original line number Diff line number Diff line Loading @@ -117,22 +117,10 @@ static const uint8_t* get_ble_supported_states(void) { #define FORWARD_GETTER(type, legacy, gd) \ static type legacy(void) { return gd; } FORWARD_GETTER(uint16_t, get_acl_buffer_length, GetController()->GetAclPacketLength()) FORWARD_GETTER(uint16_t, get_le_buffer_length, GetController()->GetLeBufferSize().le_data_packet_length_) FORWARD_GETTER( uint16_t, get_iso_buffer_length, GetController()->GetControllerIsoBufferSize().le_data_packet_length_) static uint16_t get_acl_packet_size_classic(void) { return get_acl_buffer_length() + kHciDataPreambleSize; } static uint16_t get_acl_packet_size_ble(void) { return get_le_buffer_length() + kHciDataPreambleSize; } static uint16_t get_iso_packet_size(void) { return get_iso_buffer_length() + kHciDataPreambleSize; } Loading Loading @@ -238,12 +226,8 @@ static const controller_t interface = { .get_ble_supported_states = get_ble_supported_states, .get_acl_data_size_classic = get_acl_buffer_length, .get_acl_data_size_ble = get_le_buffer_length, .get_iso_data_size = get_iso_buffer_length, .get_acl_packet_size_classic = get_acl_packet_size_classic, .get_acl_packet_size_ble = get_acl_packet_size_ble, .get_iso_packet_size = get_iso_packet_size, .get_ble_default_data_packet_length = get_le_suggested_default_data_length, Loading system/stack/Android.bp +9 −1 Original line number Diff line number Diff line Loading @@ -1438,7 +1438,6 @@ cc_test { "libbt-platform-protos-lite", "libbt_shim_bridge", "libchrome", "libflatbuffers-cpp", "libgmock", "liblog", "libosi", Loading Loading @@ -1466,6 +1465,7 @@ cc_test { unit_test: true, }, defaults: [ "bluetooth_flatbuffer_bundler_defaults", "fluoride_defaults", "mts_defaults", ], Loading @@ -1481,9 +1481,15 @@ cc_test { "packages/modules/Bluetooth/system", "packages/modules/Bluetooth/system/gd", ], generated_headers: [ "BluetoothGeneratedDumpsysDataSchema_h", ], srcs: [ ":TestCommonMainHandler", ":TestCommonMockFunctions", ":TestCommonStackConfig", ":TestMockMainShim", ":TestMockMainShimEntry", "eatt/eatt.cc", "test/common/mock_btif_storage.cc", "test/common/mock_btm_api_layer.cc", Loading @@ -1501,8 +1507,10 @@ cc_test { "libbase", "libbluetooth-types", "libbluetooth_gd", "libbluetooth_hci_pdl", "libbluetooth_log", "libbt-common", "libbt-platform-protos-lite", "libbt_shim_bridge", "libbt_shim_ffi", "libchrome", Loading system/stack/btm/btm_devctl.cc +4 −2 Original line number Diff line number Diff line Loading @@ -197,7 +197,7 @@ void BTM_reset_complete() { btm_pm_reset(); l2c_link_init(controller->get_acl_buffer_count_classic()); l2c_link_init(bluetooth::shim::GetController()->GetNumAclPacketBuffers()); // setup the random number generator std::srand(std::time(nullptr)); Loading @@ -216,7 +216,9 @@ void BTM_reset_complete() { } if (bluetooth::shim::GetController()->SupportsBle()) { l2c_link_processs_ble_num_bufs(controller->get_acl_buffer_count_ble()); l2c_link_processs_ble_num_bufs(bluetooth::shim::GetController() ->GetLeBufferSize() .total_num_le_packets_); } BTM_SetPinType(btm_sec_cb.cfg.pin_type, btm_sec_cb.cfg.pin_code, Loading system/stack/eatt/eatt_impl.h +6 −3 Original line number Diff line number Diff line Loading @@ -22,11 +22,12 @@ #include <vector> #include "bind_helpers.h" #include "device/include/controller.h" #include "eatt.h" #include "hci/controller_interface.h" #include "internal_include/bt_trace.h" #include "internal_include/stack_config.h" #include "l2c_api.h" #include "main/shim/entry.h" #include "os/log.h" #include "osi/include/alarm.h" #include "osi/include/allocator.h" Loading Loading @@ -150,7 +151,8 @@ struct eatt_impl { eatt_dev = add_eatt_device(bda); } uint16_t max_mps = controller_get_interface()->get_acl_data_size_ble(); uint16_t max_mps = shim::GetController()->GetLeBufferSize().le_data_packet_length_; tL2CAP_LE_CFG_INFO local_coc_cfg = { .mtu = eatt_dev->rx_mtu_, Loading Loading @@ -564,7 +566,8 @@ struct eatt_impl { uint8_t num_of_channels = L2CAP_CREDIT_BASED_MAX_CIDS) { /* Let us use maximum possible mps */ if (eatt_dev->rx_mps_ == EATT_MIN_MTU_MPS) eatt_dev->rx_mps_ = controller_get_interface()->get_acl_data_size_ble(); eatt_dev->rx_mps_ = shim::GetController()->GetLeBufferSize().le_data_packet_length_; tL2CAP_LE_CFG_INFO local_coc_cfg = { .mtu = eatt_dev->rx_mtu_, Loading Loading
system/device/include/controller.h +0 −9 Original line number Diff line number Diff line Loading @@ -36,16 +36,7 @@ typedef struct controller_t { const uint8_t* (*get_ble_supported_states)(void); // Get the cached acl data sizes for the controller. uint16_t (*get_acl_data_size_classic)(void); uint16_t (*get_acl_data_size_ble)(void); uint16_t (*get_iso_data_size)(void); // Get the cached acl packet sizes for the controller. // This is a convenience function for the respective // acl data size + size of the acl header. uint16_t (*get_acl_packet_size_classic)(void); uint16_t (*get_acl_packet_size_ble)(void); uint16_t (*get_iso_packet_size)(void); uint16_t (*get_ble_default_data_packet_length)(void); Loading
system/main/shim/controller.cc +0 −16 Original line number Diff line number Diff line Loading @@ -117,22 +117,10 @@ static const uint8_t* get_ble_supported_states(void) { #define FORWARD_GETTER(type, legacy, gd) \ static type legacy(void) { return gd; } FORWARD_GETTER(uint16_t, get_acl_buffer_length, GetController()->GetAclPacketLength()) FORWARD_GETTER(uint16_t, get_le_buffer_length, GetController()->GetLeBufferSize().le_data_packet_length_) FORWARD_GETTER( uint16_t, get_iso_buffer_length, GetController()->GetControllerIsoBufferSize().le_data_packet_length_) static uint16_t get_acl_packet_size_classic(void) { return get_acl_buffer_length() + kHciDataPreambleSize; } static uint16_t get_acl_packet_size_ble(void) { return get_le_buffer_length() + kHciDataPreambleSize; } static uint16_t get_iso_packet_size(void) { return get_iso_buffer_length() + kHciDataPreambleSize; } Loading Loading @@ -238,12 +226,8 @@ static const controller_t interface = { .get_ble_supported_states = get_ble_supported_states, .get_acl_data_size_classic = get_acl_buffer_length, .get_acl_data_size_ble = get_le_buffer_length, .get_iso_data_size = get_iso_buffer_length, .get_acl_packet_size_classic = get_acl_packet_size_classic, .get_acl_packet_size_ble = get_acl_packet_size_ble, .get_iso_packet_size = get_iso_packet_size, .get_ble_default_data_packet_length = get_le_suggested_default_data_length, Loading
system/stack/Android.bp +9 −1 Original line number Diff line number Diff line Loading @@ -1438,7 +1438,6 @@ cc_test { "libbt-platform-protos-lite", "libbt_shim_bridge", "libchrome", "libflatbuffers-cpp", "libgmock", "liblog", "libosi", Loading Loading @@ -1466,6 +1465,7 @@ cc_test { unit_test: true, }, defaults: [ "bluetooth_flatbuffer_bundler_defaults", "fluoride_defaults", "mts_defaults", ], Loading @@ -1481,9 +1481,15 @@ cc_test { "packages/modules/Bluetooth/system", "packages/modules/Bluetooth/system/gd", ], generated_headers: [ "BluetoothGeneratedDumpsysDataSchema_h", ], srcs: [ ":TestCommonMainHandler", ":TestCommonMockFunctions", ":TestCommonStackConfig", ":TestMockMainShim", ":TestMockMainShimEntry", "eatt/eatt.cc", "test/common/mock_btif_storage.cc", "test/common/mock_btm_api_layer.cc", Loading @@ -1501,8 +1507,10 @@ cc_test { "libbase", "libbluetooth-types", "libbluetooth_gd", "libbluetooth_hci_pdl", "libbluetooth_log", "libbt-common", "libbt-platform-protos-lite", "libbt_shim_bridge", "libbt_shim_ffi", "libchrome", Loading
system/stack/btm/btm_devctl.cc +4 −2 Original line number Diff line number Diff line Loading @@ -197,7 +197,7 @@ void BTM_reset_complete() { btm_pm_reset(); l2c_link_init(controller->get_acl_buffer_count_classic()); l2c_link_init(bluetooth::shim::GetController()->GetNumAclPacketBuffers()); // setup the random number generator std::srand(std::time(nullptr)); Loading @@ -216,7 +216,9 @@ void BTM_reset_complete() { } if (bluetooth::shim::GetController()->SupportsBle()) { l2c_link_processs_ble_num_bufs(controller->get_acl_buffer_count_ble()); l2c_link_processs_ble_num_bufs(bluetooth::shim::GetController() ->GetLeBufferSize() .total_num_le_packets_); } BTM_SetPinType(btm_sec_cb.cfg.pin_type, btm_sec_cb.cfg.pin_code, Loading
system/stack/eatt/eatt_impl.h +6 −3 Original line number Diff line number Diff line Loading @@ -22,11 +22,12 @@ #include <vector> #include "bind_helpers.h" #include "device/include/controller.h" #include "eatt.h" #include "hci/controller_interface.h" #include "internal_include/bt_trace.h" #include "internal_include/stack_config.h" #include "l2c_api.h" #include "main/shim/entry.h" #include "os/log.h" #include "osi/include/alarm.h" #include "osi/include/allocator.h" Loading Loading @@ -150,7 +151,8 @@ struct eatt_impl { eatt_dev = add_eatt_device(bda); } uint16_t max_mps = controller_get_interface()->get_acl_data_size_ble(); uint16_t max_mps = shim::GetController()->GetLeBufferSize().le_data_packet_length_; tL2CAP_LE_CFG_INFO local_coc_cfg = { .mtu = eatt_dev->rx_mtu_, Loading Loading @@ -564,7 +566,8 @@ struct eatt_impl { uint8_t num_of_channels = L2CAP_CREDIT_BASED_MAX_CIDS) { /* Let us use maximum possible mps */ if (eatt_dev->rx_mps_ == EATT_MIN_MTU_MPS) eatt_dev->rx_mps_ = controller_get_interface()->get_acl_data_size_ble(); eatt_dev->rx_mps_ = shim::GetController()->GetLeBufferSize().le_data_packet_length_; tL2CAP_LE_CFG_INFO local_coc_cfg = { .mtu = eatt_dev->rx_mtu_, Loading