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

Commit 7b1c3efd authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes I93466084,I1e1ed49c,Id825a84e

* changes:
  Add API stack/l2cap/l2c_ble::l2cble_conn_comp_from_address_with_type
  Add API stack/acl/btm_acl::acl_link_role_from_handle
  Add btm_identity_addr_to_random_pseudo_from_address_with_type
parents 31d20e8a ccf66fe9
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) {
+6 −0
Original line number Diff line number Diff line
@@ -273,6 +273,12 @@ bool btm_identity_addr_to_random_pseudo(RawAddress* bd_addr,
  return false;
}

bool btm_identity_addr_to_random_pseudo_from_address_with_type(
    tBLE_BD_ADDR* address_with_type, bool refresh) {
  return btm_identity_addr_to_random_pseudo(
      &(address_with_type->bda), &(address_with_type->type), refresh);
}

/*******************************************************************************
 *
 * Function         btm_random_pseudo_to_identity_addr
+2 −0
Original line number Diff line number Diff line
@@ -139,6 +139,8 @@ extern uint64_t btm_get_next_private_addrress_interval_ms();
extern bool btm_identity_addr_to_random_pseudo(RawAddress* bd_addr,
                                               uint8_t* p_addr_type,
                                               bool refresh);
extern bool btm_identity_addr_to_random_pseudo_from_address_with_type(
    tBLE_BD_ADDR* address_with_type, bool refresh);
extern bool btm_random_pseudo_to_identity_addr(RawAddress* random_pseudo,
                                               uint8_t* p_identity_addr_type);
extern void btm_ble_refresh_peer_resolvable_private_addr(
+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);

+4 −0
Original line number Diff line number Diff line
@@ -36,6 +36,10 @@ extern void l2cble_conn_comp(uint16_t handle, uint8_t role,
                             uint16_t conn_interval, uint16_t conn_latency,
                             uint16_t conn_timeout);

extern void l2cble_conn_comp_from_address_with_type(
    uint16_t handle, uint8_t role, const tBLE_BD_ADDR& address_with_type,
    uint16_t conn_interval, uint16_t conn_latency, uint16_t conn_timeout);

extern void l2cble_process_conn_update_evt(uint16_t handle, uint8_t status,
                                           uint16_t interval, uint16_t latency,
                                           uint16_t timeout);
Loading