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

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

Add API stack/acl/btm_acl::acl_link_role_from_handle

Bug: 162984360
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I1e1ed49c3f0d489c4e087f0520d2626d7d300b94
parent bcb745df
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -2691,6 +2691,14 @@ uint8_t acl_link_role(const RawAddress& bd_addr, tBT_TRANSPORT transport) {
  return p_acl->link_role;
}

uint8_t acl_link_role_from_handle(uint16_t handle) {
  tACL_CONN* p_acl = internal_.acl_get_connection_from_handle(handle);
  if (p_acl == nullptr) {
    return HCI_ROLE_UNKNOWN;
  }
  return p_acl->link_role;
}

bool acl_is_transport_le_from_handle(uint16_t handle) {
  tACL_CONN* p_acl = internal_.acl_get_connection_from_handle(handle);
  if (p_acl == nullptr) {
+1 −0
Original line number Diff line number Diff line
@@ -280,6 +280,7 @@ void btm_ble_refresh_local_resolvable_private_addr(
void btm_cont_rswitch_from_handle(uint16_t hci_handle);

uint8_t acl_link_role(const RawAddress& remote_bda, tBT_TRANSPORT transport);
uint8_t acl_link_role_from_handle(uint16_t handle);

bool acl_is_transport_le_from_handle(uint16_t handle);