Loading system/stack/acl/btm_acl.cc +0 −10 Original line number Diff line number Diff line Loading @@ -2507,16 +2507,6 @@ uint8_t acl_link_role_from_handle(uint16_t handle) { return p_acl->link_role; } uint16_t acl_get_hci_handle_for_hcif(const RawAddress& bd_addr, tBT_TRANSPORT transport) { tACL_CONN* p_acl = internal_.btm_bda_to_acl(bd_addr, transport); if (p_acl == nullptr) { LOG_WARN("Unable to find active acl"); return HCI_INVALID_HANDLE; } return p_acl->hci_handle; } bool acl_peer_supports_ble_packet_extension(uint16_t hci_handle) { tACL_CONN* p_acl = internal_.acl_get_connection_from_handle(hci_handle); if (p_acl == nullptr) { Loading system/stack/btm/ble_scanner_hci_interface.cc +7 −6 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <base/bind.h> #include "acl_api.h" #include "btm_api.h" #include "device/include/controller.h" #include "hcidefs.h" #include "hcimsgs.h" Loading Loading @@ -143,7 +144,7 @@ class BleScannerImplBase : public BleScannerHciInterface { const RawAddress& bd_addr, uint16_t service_data, uint16_t sync_handle, BleScannerHciInterface::handle_cb command_complete) override { VLOG(1) << __func__; uint16_t acl_handle = acl_get_hci_handle_for_hcif(bd_addr, BT_TRANSPORT_LE); uint16_t acl_handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_LE); if (acl_handle == HCI_INVALID_HANDLE) { LOG(ERROR) << __func__ Loading @@ -160,7 +161,7 @@ class BleScannerImplBase : public BleScannerHciInterface { uint16_t service_data, uint8_t adv_handle, handle_cb command_complete) override { VLOG(1) << __func__; uint16_t acl_handle = acl_get_hci_handle_for_hcif(bd_addr, BT_TRANSPORT_LE); uint16_t acl_handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_LE); if (acl_handle == HCI_INVALID_HANDLE) { LOG(ERROR) << __func__ Loading @@ -178,7 +179,7 @@ class BleScannerImplBase : public BleScannerHciInterface { uint8_t cte_type, bool set_defaults, status_cb command_complete) override { VLOG(1) << __func__; uint16_t acl_handle = acl_get_hci_handle_for_hcif(bd_addr, BT_TRANSPORT_LE); uint16_t acl_handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_LE); if (acl_handle == HCI_INVALID_HANDLE) { LOG(ERROR) << __func__ Loading Loading @@ -259,7 +260,7 @@ class BleScannerSyncTransferImpl : public virtual BleScannerImplBase { void PeriodicAdvSyncTransfer( const RawAddress& bd_addr, uint16_t service_data, uint16_t sync_handle, BleScannerHciInterface::handle_cb command_complete) override { uint16_t acl_handle = acl_get_hci_handle_for_hcif(bd_addr, BT_TRANSPORT_LE); uint16_t acl_handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_LE); if (acl_handle == HCI_INVALID_HANDLE) { LOG(ERROR) << __func__ Loading @@ -275,7 +276,7 @@ class BleScannerSyncTransferImpl : public virtual BleScannerImplBase { void PeriodicAdvSetInfoTransfer(const RawAddress& bd_addr, uint16_t service_data, uint8_t adv_handle, handle_cb command_complete) override { uint16_t acl_handle = acl_get_hci_handle_for_hcif(bd_addr, BT_TRANSPORT_LE); uint16_t acl_handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_LE); if (acl_handle == HCI_INVALID_HANDLE) { LOG(ERROR) << __func__ Loading @@ -292,7 +293,7 @@ class BleScannerSyncTransferImpl : public virtual BleScannerImplBase { uint16_t skip, uint16_t sync_timeout, uint8_t cte_type, bool set_defaults, status_cb command_complete) override { uint16_t acl_handle = acl_get_hci_handle_for_hcif(bd_addr, BT_TRANSPORT_LE); uint16_t acl_handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_LE); if (acl_handle == HCI_INVALID_HANDLE) { LOG(ERROR) << __func__ Loading system/stack/btm/btm_ble.cc +3 −3 Original line number Diff line number Diff line Loading @@ -678,7 +678,7 @@ tBTM_STATUS BTM_SetBleDataLength(const RawAddress& bd_addr, return BTM_SUCCESS; } uint16_t hci_handle = acl_get_hci_handle_for_hcif(bd_addr, BT_TRANSPORT_LE); uint16_t hci_handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_LE); if (!acl_peer_supports_ble_packet_extension(hci_handle)) { LOG_INFO("Remote device unable to support le packet extension"); Loading Loading @@ -745,7 +745,7 @@ void BTM_BleReadPhy( return; } uint16_t handle = acl_get_hci_handle_for_hcif(bd_addr, BT_TRANSPORT_LE); uint16_t handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_LE); const uint8_t len = HCIC_PARAM_SIZE_BLE_READ_PHY; uint8_t data[len]; Loading Loading @@ -775,7 +775,7 @@ void BTM_BleSetPhy(const RawAddress& bd_addr, uint8_t tx_phys, uint8_t rx_phys, if (tx_phys == 0) all_phys &= 0x01; if (rx_phys == 0) all_phys &= 0x02; uint16_t handle = acl_get_hci_handle_for_hcif(bd_addr, BT_TRANSPORT_LE); uint16_t handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_LE); // checking if local controller supports it! if (!controller_get_interface()->supports_ble_2m_phy() && Loading Loading
system/stack/acl/btm_acl.cc +0 −10 Original line number Diff line number Diff line Loading @@ -2507,16 +2507,6 @@ uint8_t acl_link_role_from_handle(uint16_t handle) { return p_acl->link_role; } uint16_t acl_get_hci_handle_for_hcif(const RawAddress& bd_addr, tBT_TRANSPORT transport) { tACL_CONN* p_acl = internal_.btm_bda_to_acl(bd_addr, transport); if (p_acl == nullptr) { LOG_WARN("Unable to find active acl"); return HCI_INVALID_HANDLE; } return p_acl->hci_handle; } bool acl_peer_supports_ble_packet_extension(uint16_t hci_handle) { tACL_CONN* p_acl = internal_.acl_get_connection_from_handle(hci_handle); if (p_acl == nullptr) { Loading
system/stack/btm/ble_scanner_hci_interface.cc +7 −6 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <base/bind.h> #include "acl_api.h" #include "btm_api.h" #include "device/include/controller.h" #include "hcidefs.h" #include "hcimsgs.h" Loading Loading @@ -143,7 +144,7 @@ class BleScannerImplBase : public BleScannerHciInterface { const RawAddress& bd_addr, uint16_t service_data, uint16_t sync_handle, BleScannerHciInterface::handle_cb command_complete) override { VLOG(1) << __func__; uint16_t acl_handle = acl_get_hci_handle_for_hcif(bd_addr, BT_TRANSPORT_LE); uint16_t acl_handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_LE); if (acl_handle == HCI_INVALID_HANDLE) { LOG(ERROR) << __func__ Loading @@ -160,7 +161,7 @@ class BleScannerImplBase : public BleScannerHciInterface { uint16_t service_data, uint8_t adv_handle, handle_cb command_complete) override { VLOG(1) << __func__; uint16_t acl_handle = acl_get_hci_handle_for_hcif(bd_addr, BT_TRANSPORT_LE); uint16_t acl_handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_LE); if (acl_handle == HCI_INVALID_HANDLE) { LOG(ERROR) << __func__ Loading @@ -178,7 +179,7 @@ class BleScannerImplBase : public BleScannerHciInterface { uint8_t cte_type, bool set_defaults, status_cb command_complete) override { VLOG(1) << __func__; uint16_t acl_handle = acl_get_hci_handle_for_hcif(bd_addr, BT_TRANSPORT_LE); uint16_t acl_handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_LE); if (acl_handle == HCI_INVALID_HANDLE) { LOG(ERROR) << __func__ Loading Loading @@ -259,7 +260,7 @@ class BleScannerSyncTransferImpl : public virtual BleScannerImplBase { void PeriodicAdvSyncTransfer( const RawAddress& bd_addr, uint16_t service_data, uint16_t sync_handle, BleScannerHciInterface::handle_cb command_complete) override { uint16_t acl_handle = acl_get_hci_handle_for_hcif(bd_addr, BT_TRANSPORT_LE); uint16_t acl_handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_LE); if (acl_handle == HCI_INVALID_HANDLE) { LOG(ERROR) << __func__ Loading @@ -275,7 +276,7 @@ class BleScannerSyncTransferImpl : public virtual BleScannerImplBase { void PeriodicAdvSetInfoTransfer(const RawAddress& bd_addr, uint16_t service_data, uint8_t adv_handle, handle_cb command_complete) override { uint16_t acl_handle = acl_get_hci_handle_for_hcif(bd_addr, BT_TRANSPORT_LE); uint16_t acl_handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_LE); if (acl_handle == HCI_INVALID_HANDLE) { LOG(ERROR) << __func__ Loading @@ -292,7 +293,7 @@ class BleScannerSyncTransferImpl : public virtual BleScannerImplBase { uint16_t skip, uint16_t sync_timeout, uint8_t cte_type, bool set_defaults, status_cb command_complete) override { uint16_t acl_handle = acl_get_hci_handle_for_hcif(bd_addr, BT_TRANSPORT_LE); uint16_t acl_handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_LE); if (acl_handle == HCI_INVALID_HANDLE) { LOG(ERROR) << __func__ Loading
system/stack/btm/btm_ble.cc +3 −3 Original line number Diff line number Diff line Loading @@ -678,7 +678,7 @@ tBTM_STATUS BTM_SetBleDataLength(const RawAddress& bd_addr, return BTM_SUCCESS; } uint16_t hci_handle = acl_get_hci_handle_for_hcif(bd_addr, BT_TRANSPORT_LE); uint16_t hci_handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_LE); if (!acl_peer_supports_ble_packet_extension(hci_handle)) { LOG_INFO("Remote device unable to support le packet extension"); Loading Loading @@ -745,7 +745,7 @@ void BTM_BleReadPhy( return; } uint16_t handle = acl_get_hci_handle_for_hcif(bd_addr, BT_TRANSPORT_LE); uint16_t handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_LE); const uint8_t len = HCIC_PARAM_SIZE_BLE_READ_PHY; uint8_t data[len]; Loading Loading @@ -775,7 +775,7 @@ void BTM_BleSetPhy(const RawAddress& bd_addr, uint8_t tx_phys, uint8_t rx_phys, if (tx_phys == 0) all_phys &= 0x01; if (rx_phys == 0) all_phys &= 0x02; uint16_t handle = acl_get_hci_handle_for_hcif(bd_addr, BT_TRANSPORT_LE); uint16_t handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_LE); // checking if local controller supports it! if (!controller_get_interface()->supports_ble_2m_phy() && Loading