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

Commit 0d25fbeb authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Streamline stack/l2cap/l2c_ble::L2CA_GetBleConnRole am: 8730b272 am: 6fa49903

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

Change-Id: I6bb5a7c183b42bcf03cec0b882117cc991db8425
parents 5c626748 6fa49903
Loading
Loading
Loading
Loading
+7 −18
Original line number Diff line number Diff line
@@ -189,25 +189,14 @@ bool L2CA_EnableUpdateBleConnParams(const RawAddress& rem_bda, bool enable) {
  return (true);
}

/*******************************************************************************
 *
 * Function         L2CA_GetBleConnRole
 *
 * Description      This function returns the connection role.
 *
 * Returns          link role.
 *
 ******************************************************************************/
uint8_t L2CA_GetBleConnRole(const RawAddress& bd_addr) {
  uint8_t role = HCI_ROLE_UNKNOWN;

  tL2C_LCB* p_lcb;

  p_lcb = l2cu_find_lcb_by_bd_addr(bd_addr, BT_TRANSPORT_LE);
  if (p_lcb != NULL) role = p_lcb->LinkRole();

  return role;
hci_role_t L2CA_GetBleConnRole(const RawAddress& bd_addr) {
  tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(bd_addr, BT_TRANSPORT_LE);
  if (p_lcb == nullptr) {
    return HCI_ROLE_UNKNOWN;
  }
  return p_lcb->LinkRole();
}

/*******************************************************************************
 *
 * Function         L2CA_GetDisconnectReason