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

Commit da72299d authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Automerger Merge Worker
Browse files

Merge "btm: Add API to check peer's 2M PHY support" am: 2cd2346d am: c47b00e1 am: aded824e

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

Change-Id: I90dc07501f4700099aa2cc940d517a5cb69e3a57
parents 20c16035 aded824e
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -1203,6 +1203,27 @@ uint16_t BTM_GetHCIConnHandle(const RawAddress& remote_bda,
  return HCI_INVALID_HANDLE;
}

/*******************************************************************************
 *
 * Function         BTM_IsPhy2mSupported
 *
 * Description      This function is called to check PHY 2M support
 *                  from peer device
 * Returns          True when PHY 2M supported false otherwise
 *
 ******************************************************************************/
bool BTM_IsPhy2mSupported(const RawAddress& remote_bda, tBT_TRANSPORT transport) {
  tACL_CONN* p;
  BTM_TRACE_DEBUG("BTM_IsPhy2mSupported");
  p = internal_.btm_bda_to_acl(remote_bda, transport);
  if (p == (tACL_CONN*)NULL) {
    BTM_TRACE_DEBUG("BTM_IsPhy2mSupported: no connection");
    return false;
  }

  return HCI_LE_2M_PHY_SUPPORTED(p->peer_le_features);
}

/*******************************************************************************
 *
 * Function         BTM_RequestPeerSCA
+11 −0
Original line number Diff line number Diff line
@@ -741,6 +741,17 @@ tBTM_STATUS BTM_SetSsrParams(const RawAddress& remote_bda, uint16_t max_lat,
uint16_t BTM_GetHCIConnHandle(const RawAddress& remote_bda,
                              tBT_TRANSPORT transport);

/*******************************************************************************
 *
 * Function         BTM_IsPhy2mSupported
 *
 * Description      This function is called to check PHY 2M support
 *                  from peer device
 * Returns          True when PHY 2M supported false otherwise
 *
 ******************************************************************************/
bool BTM_IsPhy2mSupported(const RawAddress& remote_bda, tBT_TRANSPORT transport);

/*******************************************************************************
 *
 * Function         BTM_RequestPeerSCA