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

Commit 7187b6d9 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Have hcif call btm_acl_connected instead of dispatching to higher level modules"

parents eb9dc1f0 c7151374
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -956,9 +956,7 @@ static void btu_hcif_connection_comp_evt(uint8_t* p, uint8_t evt_len) {
  }

  if (link_type == HCI_LINK_TYPE_ACL) {
    btm_sec_connected(bda, handle, status, enc_mode);

    l2c_link_hci_conn_comp(status, handle, bda);
    btm_acl_connected(bda, handle, status, enc_mode);
  } else {
    memset(&esco_data, 0, sizeof(tBTM_ESCO_DATA));
    /* esco_data.link_type = HCI_LINK_TYPE_SCO; already zero */
@@ -1410,8 +1408,7 @@ static void btu_hcif_hdl_command_status(uint16_t opcode, uint8_t status,
    case HCI_CREATE_CONNECTION:
      if (status != HCI_SUCCESS) {
        STREAM_TO_BDADDR(bd_addr, p_cmd);
        btm_sec_connected(bd_addr, HCI_INVALID_HANDLE, status, 0);
        l2c_link_hci_conn_comp(status, HCI_INVALID_HANDLE, bd_addr);
        btm_acl_connected(bd_addr, HCI_INVALID_HANDLE, status, 0);
      }
      break;
    case HCI_AUTHENTICATION_REQUESTED:
+4 −0
Original line number Diff line number Diff line
@@ -28,6 +28,10 @@ extern void l2c_link_process_num_completed_pkts(uint8_t* p, uint8_t evt_len);
extern void l2c_link_hci_conn_comp(uint8_t status, uint16_t handle,
                                   const RawAddress& p_bda);

// TODO move
extern void btm_acl_connected(const RawAddress& bda, uint16_t handle,
                              uint8_t status, uint8_t enc_mode);

extern bool l2c_link_hci_disc_comp(uint16_t handle, uint8_t reason);

extern void l2c_link_role_changed(const RawAddress* bd_addr, uint8_t new_role,
+7 −0
Original line number Diff line number Diff line
@@ -130,6 +130,13 @@ bool l2c_link_hci_conn_req(const RawAddress& bd_addr) {
  return (false);
}

void btm_acl_connected(const RawAddress& bda, uint16_t handle, uint8_t status,
                       uint8_t enc_mode) {
  btm_sec_connected(bda, handle, status, enc_mode);

  l2c_link_hci_conn_comp(status, handle, bda);
}

/*******************************************************************************
 *
 * Function         l2c_link_hci_conn_comp