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

Commit 712497b2 authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Remove unnecessary stack/acl/btm_acl::btm_pm_is_le_link am: dd63aba0

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1552711

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1ec323bd4a630cd712fc6ce7ee45e978af50afc8
parents fb143555 dd63aba0
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -368,7 +368,6 @@ struct controller_t;
 ****************************************************/
struct sACL_CB {
 private:
  friend bool btm_pm_is_le_link(const RawAddress& remote_bda);
  friend int btm_pm_find_acl_ind(const RawAddress& remote_bda);
  friend tBTM_PM_MCB* acl_power_mode_from_handle(uint16_t hci_handle);
  friend tBTM_STATUS BTM_SetPowerMode(uint8_t pm_id,
+0 −11
Original line number Diff line number Diff line
@@ -2493,17 +2493,6 @@ 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->is_transport_ble()) {
      return true;
    }
  }
  return false;
}

/*******************************************************************************
 *
 * Function         btm_ble_refresh_local_resolvable_private_addr
+0 −4
Original line number Diff line number Diff line
@@ -205,10 +205,6 @@ tBTM_STATUS BTM_SetPowerMode(uint8_t pm_id, const RawAddress& remote_bda,

  int acl_ind = btm_pm_find_acl_ind(remote_bda);
  if (acl_ind == MAX_L2CAP_LINKS) {
    if (btm_pm_is_le_link(remote_bda)) {
      LOG_ERROR("Setting power mode on le link is unsupported");
      return BTM_MODE_UNSUPPORTED;
    }
    LOG_ERROR("br_edr acl addr:%s is unknown", PRIVATE_ADDRESS(remote_bda));
    return BTM_UNKNOWN_ADDR;
  }
+0 −1
Original line number Diff line number Diff line
@@ -273,7 +273,6 @@ 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);