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

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

Merge changes I1602876f,I8704621f

* changes:
  Remove return type from l2c_link_hci_conn_comp
  Remove MSG_HC_TO_STACK_L2C_SEG_XMIT
parents e24f7ee0 25f26f72
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -58,7 +58,6 @@ typedef enum {
#define MSG_HC_TO_STACK_HCI_ERR 0x1300      /* eq. BT_EVT_TO_BTU_HCIT_ERR */
#define MSG_HC_TO_STACK_HCI_ISO 0x1700      /* eq. BT_EVT_TO_BTU_HCI_ISO */
#define MSG_HC_TO_STACK_HCI_EVT 0x1000      /* eq. BT_EVT_TO_BTU_HCI_EVT */
#define MSG_HC_TO_STACK_L2C_SEG_XMIT 0x1900 /* BT_EVT_TO_BTU_L2C_SEG_XMIT */

/* Message event ID passed from stack to vendor lib */
#define MSG_STACK_TO_HC_HCI_ACL 0x2100 /* eq. BT_EVT_TO_LM_HCI_ACL */
+0 −1
Original line number Diff line number Diff line
@@ -42,7 +42,6 @@ static const char HCI_MODULE[] = "hci_module";
#define MSG_HC_TO_STACK_HCI_ERR 0x1300      /* eq. BT_EVT_TO_BTU_HCIT_ERR */
#define MSG_HC_TO_STACK_HCI_ISO 0x1700      /* eq. BT_EVT_TO_BTU_HCI_ISO */
#define MSG_HC_TO_STACK_HCI_EVT 0x1000      /* eq. BT_EVT_TO_BTU_HCI_EVT */
#define MSG_HC_TO_STACK_L2C_SEG_XMIT 0x1900 /* BT_EVT_TO_BTU_L2C_SEG_XMIT */

/* Message event ID passed from stack to vendor lib */
#define MSG_STACK_TO_HC_HCI_ACL 0x2100 /* eq. BT_EVT_TO_LM_HCI_ACL */
+1 −1
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ static void fragment_and_dispatch_acl(BT_HDR* packet) {
      packet->layer_specific--;

      if (packet->layer_specific == 0) {
        packet->event = MSG_HC_TO_STACK_L2C_SEG_XMIT;
        packet->event = BT_EVT_TO_BTU_L2C_SEG_XMIT;
        callbacks->transmit_finished(packet, false);
        return;
      }
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ extern bool l2c_link_hci_conn_req(const RawAddress& bd_addr);

extern void l2c_link_process_num_completed_pkts(uint8_t* p, uint8_t evt_len);

extern bool l2c_link_hci_conn_comp(uint8_t status, uint16_t handle,
extern void l2c_link_hci_conn_comp(uint8_t status, uint16_t handle,
                                   const RawAddress& p_bda);

extern bool l2c_link_hci_disc_comp(uint16_t handle, uint8_t reason);
+6 −6
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ bool l2c_link_hci_conn_req(const RawAddress& bd_addr) {
 * Returns          void
 *
 ******************************************************************************/
bool l2c_link_hci_conn_comp(uint8_t status, uint16_t handle,
void l2c_link_hci_conn_comp(uint8_t status, uint16_t handle,
                            const RawAddress& p_bda) {
  tL2C_CONN_INFO ci;
  tL2C_LCB* p_lcb;
@@ -162,7 +162,7 @@ bool l2c_link_hci_conn_comp(uint8_t status, uint16_t handle,
    p_lcb = l2cu_allocate_lcb(ci.bd_addr, false, BT_TRANSPORT_BR_EDR);
    if (p_lcb == nullptr) {
      L2CAP_TRACE_WARNING("%s: Failed to allocate an LCB", __func__);
      return (false);
      return;
    }
    p_lcb->link_state = LST_CONNECTING;
  }
@@ -171,14 +171,14 @@ bool l2c_link_hci_conn_comp(uint8_t status, uint16_t handle,
      (status == HCI_ERR_CONNECTION_EXISTS)) {
    L2CAP_TRACE_WARNING("%s: An ACL connection already exists. Handle:%d",
                        __func__, handle);
    return (true);
    return;
  } else if (p_lcb->link_state != LST_CONNECTING) {
    L2CAP_TRACE_ERROR("L2CAP got conn_comp in bad state: %d  status: 0x%d",
                      p_lcb->link_state, status);

    if (status != HCI_SUCCESS) l2c_link_hci_disc_comp(p_lcb->handle, status);

    return (false);
    return;
  }

  /* Save the handle */
@@ -205,7 +205,7 @@ bool l2c_link_hci_conn_comp(uint8_t status, uint16_t handle,

    /* If dedicated bonding do not process any further */
    if (p_lcb->is_bonding) {
      if (l2cu_start_post_bond_timer(handle)) return (true);
      if (l2cu_start_post_bond_timer(handle)) return;
    }

    /* Update the timeouts in the hold queue */
@@ -264,7 +264,7 @@ bool l2c_link_hci_conn_comp(uint8_t status, uint16_t handle,
      }
    }
  }
  return (true);
  return;
}

/*******************************************************************************