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

Commit 237e23c4 authored by Chris Manton's avatar Chris Manton
Browse files

Precisely name tL2C_CB::num_used_lcbs

From: tL2C_CB::tL2C_LCB::num_links_active

Towards proper interfaces

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I053469981e035493bc37de98fb44123622618859
parent c693386e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -447,7 +447,7 @@ typedef struct {
  alarm_t* receive_hold_timer; /* Timer entry for rcv hold */

  tL2C_LCB* p_cur_hcit_lcb;  /* Current HCI Transport buffer */
  uint16_t num_links_active; /* Number of links active */
  uint16_t num_used_lcbs;    /* Number of active link control blocks */

  uint16_t non_flushable_pbf; /* L2CAP_PKT_START_NON_FLUSHABLE if controller
                                 supports */
+1 −1
Original line number Diff line number Diff line
@@ -599,7 +599,7 @@ void l2c_link_adjust_allocation(void) {
      (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) {
  if (l2cb.num_used_lcbs == 0) {
    l2cb.controller_xmit_window = l2cb.num_lm_acl_bufs;
    l2cb.round_robin_quota = l2cb.round_robin_unacked = 0;
    return;
+2 −2
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ tL2C_LCB* l2cu_allocate_lcb(const RawAddress& p_bd_addr, bool is_bonding,
        l2cb.num_ble_links_active++;
        l2c_ble_link_adjust_allocation();
      } else {
        l2cb.num_links_active++;
        l2cb.num_used_lcbs++;
        l2c_link_adjust_allocation();
      }
      p_lcb->link_xmit_data_q = list_new(NULL);
@@ -193,7 +193,7 @@ void l2cu_release_lcb(tL2C_LCB* p_lcb) {

    l2c_ble_link_adjust_allocation();
  } else {
    if (l2cb.num_links_active >= 1) l2cb.num_links_active--;
    if (l2cb.num_used_lcbs >= 1) l2cb.num_used_lcbs--;

    l2c_link_adjust_allocation();
  }