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

Commit 2f56416e authored by Weichin Weng's avatar Weichin Weng Committed by android-build-merger
Browse files

Merge "Distribute ACL buffer only for not BLE device" am: a1e2547e am: fa2d6512

am: 70cde6b6

Change-Id: Ib2d67d25e46063d52b4b84bef7d8b2f2295de915
parents 86e774bc 70cde6b6
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -675,6 +675,8 @@ void l2c_link_adjust_allocation(void) {
  uint16_t num_hipri_links = 0;
  uint16_t controller_xmit_quota = l2cb.num_lm_acl_bufs;
  uint16_t high_pri_link_quota = L2CAP_HIGH_PRI_MIN_XMIT_QUOTA_A;
  bool is_share_buffer =
      (l2cb.num_lm_ble_bufs == L2C_DEF_NUM_BLE_BUF_SHARED) ? true : false;

  /* If no links active, reset buffer quotas and controller buffers */
  if (l2cb.num_links_active == 0) {
@@ -685,7 +687,8 @@ void l2c_link_adjust_allocation(void) {

  /* First, count the links */
  for (yy = 0, p_lcb = &l2cb.lcb_pool[0]; yy < MAX_L2CAP_LINKS; yy++, p_lcb++) {
    if (p_lcb->in_use) {
    if (p_lcb->in_use &&
        (is_share_buffer || p_lcb->transport != BT_TRANSPORT_LE)) {
      if (p_lcb->acl_priority == L2CAP_PRIORITY_HIGH)
        num_hipri_links++;
      else
@@ -732,7 +735,8 @@ void l2c_link_adjust_allocation(void) {

  /* Now, assign the quotas to each link */
  for (yy = 0, p_lcb = &l2cb.lcb_pool[0]; yy < MAX_L2CAP_LINKS; yy++, p_lcb++) {
    if (p_lcb->in_use) {
    if (p_lcb->in_use &&
        (is_share_buffer || p_lcb->transport != BT_TRANSPORT_LE)) {
      if (p_lcb->acl_priority == L2CAP_PRIORITY_HIGH) {
        p_lcb->link_xmit_quota = high_pri_link_quota;
      } else {