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

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

Add const stack/l2cap/l2c_link::l2c_link_send_to_lower am: 13ae0343

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

Change-Id: Ib4f2583d095abda871fb1d931fb386a65400927e
parents acc8395c 13ae0343
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -1024,9 +1024,13 @@ static void l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf,
  const uint16_t link_xmit_quota = p_lcb->link_xmit_quota;
  const tBT_TRANSPORT transport = p_lcb->transport;

  if (((transport == BT_TRANSPORT_BR_EDR) &&
       (p_buf->len <= acl_packet_size_classic)) ||
      ((transport == BT_TRANSPORT_LE) && (p_buf->len <= acl_packet_size_ble))) {
  const bool is_bdr_and_fits_in_buffer =
      (transport == BT_TRANSPORT_BR_EDR &&
       (p_buf->len <= acl_packet_size_classic));
  const bool is_ble_and_fits_in_buffer =
      (transport == BT_TRANSPORT_LE && (p_buf->len <= acl_packet_size_ble));

  if (is_bdr_and_fits_in_buffer || is_ble_and_fits_in_buffer) {
    if (link_xmit_quota == 0) {
      if (transport == BT_TRANSPORT_LE)
        l2cb.ble_round_robin_unacked++;