Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a748fc1e authored by Chris Manton's avatar Chris Manton
Browse files

Add API stack/acl/btm_acl::acl_get_hci_handle_for_hcif

Working towards encapsulation of tACL_CONN

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: If73a37ba85743ff415ad4c8f288a10fae993084f
parent 06fd266f
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2752,3 +2752,12 @@ tBT_TRANSPORT acl_get_transport_from_handle(uint16_t handle) {
  }
  return p_acl->transport;
}

uint16_t acl_get_hci_handle_for_hcif(const RawAddress& bd_addr,
                                     tBT_TRANSPORT transport) {
  tACL_CONN* p_acl = btm_bda_to_acl(bd_addr, transport);
  if (p_acl == nullptr) {
    return HCI_INVALID_HANDLE;
  }
  return p_acl->hci_handle;
}
+3 −0
Original line number Diff line number Diff line
@@ -293,3 +293,6 @@ uint8_t acl_link_role(const RawAddress& remote_bda, tBT_TRANSPORT transport);
bool acl_is_transport_le_from_handle(uint16_t handle);

tBT_TRANSPORT acl_get_transport_from_handle(uint16_t handle);

uint16_t acl_get_hci_handle_for_hcif(const RawAddress& bd_addr,
                                     tBT_TRANSPORT transport);