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

Commit 6fcc8eb4 authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Use Api stack/acl/btm_acl::acl_disconnect am: 5bdf1d10

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

Change-Id: Ic5b795bb20c9c2203227ca55994b6c355ec956e0
parents 4dfb1157 5bdf1d10
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -483,7 +483,8 @@ static void l2c_csm_term_w4_sec_comp(tL2C_CCB* p_ccb, uint16_t event,

    case L2CEVT_TIMEOUT:
      /* SM4 related. */
      btsnd_hcic_disconnect(p_ccb->p_lcb->handle, HCI_ERR_AUTH_FAILURE);
      acl_disconnect(p_ccb->p_lcb->remote_bd_addr, p_ccb->p_lcb->transport,
                     HCI_ERR_AUTH_FAILURE);
      break;

    case L2CEVT_SEC_RE_SEND_CMD: /* BTM has enough info to proceed */
+2 −1
Original line number Diff line number Diff line
@@ -507,7 +507,8 @@ void l2c_link_timeout(tL2C_LCB* p_lcb) {
        /* BTM is still executing security process. Let lcb stay as connected */
        start_timeout = false;
      } else if (p_lcb->IsBonding()) {
        btsnd_hcic_disconnect(p_lcb->handle, HCI_ERR_PEER_USER);
        acl_disconnect(p_lcb->remote_bd_addr, p_lcb->transport,
                       HCI_ERR_PEER_USER);
        l2cu_process_fixed_disc_cback(p_lcb);
        p_lcb->link_state = LST_DISCONNECTING;
        timeout_ms = L2CAP_LINK_DISCONNECT_TIMEOUT_MS;
+4 −2
Original line number Diff line number Diff line
@@ -1447,7 +1447,8 @@ bool l2cu_start_post_bond_timer(uint16_t handle) {
    uint64_t timeout_ms = L2CAP_BONDING_TIMEOUT * 1000;

    if (p_lcb->idle_timeout == 0) {
      btsnd_hcic_disconnect(p_lcb->handle, HCI_ERR_PEER_USER);
      acl_disconnect(p_lcb->remote_bd_addr, p_lcb->transport,
                     HCI_ERR_PEER_USER);
      p_lcb->link_state = LST_DISCONNECTING;
      timeout_ms = L2CAP_LINK_DISCONNECT_TIMEOUT_MS;
    }
@@ -2469,7 +2470,8 @@ void l2cu_no_dynamic_ccbs(tL2C_LCB* p_lcb) {
      p_lcb->link_state = LST_DISCONNECTING;
      start_timeout = false;
    } else if (p_lcb->IsBonding()) {
      btsnd_hcic_disconnect(p_lcb->handle, HCI_ERR_PEER_USER);
      acl_disconnect(p_lcb->remote_bd_addr, p_lcb->transport,
                     HCI_ERR_PEER_USER);
      l2cu_process_fixed_disc_cback(p_lcb);
      p_lcb->link_state = LST_DISCONNECTING;
      timeout_ms = L2CAP_LINK_DISCONNECT_TIMEOUT_MS;