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

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

Add Api stack/acl/::btm_pm_is_le_link

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Test: act.py -tc BleCocTest
Change-Id: Ie94f7b5a91e75aff552c1686fdd9f143c4337ea2
parent 7e8a1901
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -174,6 +174,7 @@ typedef struct {
  friend bool BTM_ReadPowerMode(const RawAddress& remote_bda,
                                tBTM_PM_MODE* p_mode);
  friend bool acl_is_role_switch_allowed();
  friend bool btm_pm_is_le_link(const RawAddress& remote_bda);
  friend const RawAddress acl_address_from_handle(uint16_t hci_handle);
  friend int btm_pm_find_acl_ind(const RawAddress& remote_bda);
  friend tACL_CONN* btm_bda_to_acl(const RawAddress& bda,
+11 −0
Original line number Diff line number Diff line
@@ -2549,6 +2549,17 @@ int btm_pm_find_acl_ind(const RawAddress& remote_bda) {
  return xx;
}

bool btm_pm_is_le_link(const RawAddress& remote_bda) {
  const tACL_CONN* p_acl = &btm_cb.acl_cb_.acl_db[0];
  for (uint8_t xx = 0; xx < MAX_L2CAP_LINKS; xx++, p_acl++) {
    if (p_acl->in_use && p_acl->remote_addr == remote_bda &&
        p_acl->transport == BT_TRANSPORT_LE) {
      return true;
    }
  }
  return false;
}

/*******************************************************************************
 *
 * Function         btm_ble_refresh_local_resolvable_private_addr
+1 −0
Original line number Diff line number Diff line
@@ -273,6 +273,7 @@ bool BTM_IsBleConnection(uint16_t hci_handle);
const RawAddress acl_address_from_handle(uint16_t hci_handle);
tBTM_PM_MCB* acl_power_mode_from_handle(uint16_t hci_handle);
int btm_pm_find_acl_ind(const RawAddress& remote_bda);
bool btm_pm_is_le_link(const RawAddress& remote_bda);

void btm_ble_refresh_local_resolvable_private_addr(
    const RawAddress& pseudo_addr, const RawAddress& local_rpa);