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

Commit 0ec2aec0 authored by Hansong Zhang's avatar Hansong Zhang
Browse files

Remove acl_get_transport_from_handle

Use BTM_IsBleConnection

Test: cert/run
Tag: #gd-refactor
Bug: 141555841
Change-Id: Iac21c9344e2c929cb439433b24bf2ca432feaf73
parent 9ad8350d
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -2507,14 +2507,6 @@ uint8_t acl_link_role_from_handle(uint16_t handle) {
  return p_acl->link_role;
}

tBT_TRANSPORT acl_get_transport_from_handle(uint16_t handle) {
  tACL_CONN* p_acl = internal_.acl_get_connection_from_handle(handle);
  if (p_acl == nullptr) {
    return BT_TRANSPORT_INVALID;
  }
  return p_acl->transport;
}

uint16_t acl_get_hci_handle_for_hcif(const RawAddress& bd_addr,
                                     tBT_TRANSPORT transport) {
  tACL_CONN* p_acl = internal_.btm_bda_to_acl(bd_addr, transport);
+3 −2
Original line number Diff line number Diff line
@@ -3206,8 +3206,9 @@ void btm_sec_encrypt_change(uint16_t handle, tHCI_STATUS status,
  BTM_TRACE_DEBUG("after update p_dev_rec->sec_flags=0x%x",
                  p_dev_rec->sec_flags);

  btm_sec_check_pending_enc_req(
      p_dev_rec, acl_get_transport_from_handle(handle), encr_enable);
  auto transport =
      BTM_IsBleConnection(handle) ? BT_TRANSPORT_LE : BT_TRANSPORT_BR_EDR;
  btm_sec_check_pending_enc_req(p_dev_rec, transport, encr_enable);

  if (BTM_IsBleConnection(handle)) {
    if (status == HCI_ERR_KEY_MISSING || status == HCI_ERR_AUTH_FAILURE ||
+0 −2
Original line number Diff line number Diff line
@@ -248,8 +248,6 @@ void btm_cont_rswitch_from_handle(uint16_t hci_handle);

uint8_t acl_link_role_from_handle(uint16_t handle);

tBT_TRANSPORT acl_get_transport_from_handle(uint16_t handle);

uint16_t acl_get_hci_handle_for_hcif(const RawAddress& bd_addr,
                                     tBT_TRANSPORT transport);