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

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

Colocate dec/def stack/l2cap/l2c_link::l2c_link_send_to_lower am: 0b8e9479

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

Change-Id: I6fb94921500c84c23d11e4ffdb8e92bf10e1822f
parents 492db58f 0b8e9479
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -1013,8 +1013,6 @@ void l2c_OnHciModeChangeSendPendingPackets(RawAddress remote) {
 ******************************************************************************/
static void l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf,
                                   tL2C_TX_COMPLETE_CB_INFO* p_cbi) {
  uint16_t num_segs;
  uint16_t xmit_window, acl_data_size;
  const controller_t* controller = controller_get_interface();

  if ((p_buf->len <= controller->get_acl_packet_size_classic() &&
@@ -1039,6 +1037,8 @@ static void l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf,
      bte_main_hci_send(p_buf, BT_EVT_TO_LM_HCI_ACL);
    }
  } else {
    uint16_t xmit_window{0};
    uint16_t acl_data_size{0};
    if (p_lcb->transport == BT_TRANSPORT_LE) {
      acl_data_size = controller->get_acl_data_size_ble();
      xmit_window = l2cb.controller_le_xmit_window;
@@ -1047,7 +1047,8 @@ static void l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf,
      acl_data_size = controller->get_acl_data_size_classic();
      xmit_window = l2cb.controller_xmit_window;
    }
    num_segs = (p_buf->len - HCI_DATA_PREAMBLE_SIZE + acl_data_size - 1) /
    uint16_t num_segs =
        (p_buf->len - HCI_DATA_PREAMBLE_SIZE + acl_data_size - 1) /
        acl_data_size;

    /* If doing round-robin, then only 1 segment each time */