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

Commit 5a9a6799 authored by Andre Eisenbach's avatar Andre Eisenbach Committed by Matthew Xie
Browse files

LE: Fix shared ACL buffer allocation

Allocate a static amount of LE buffers for chipsets that do not provide
separate ACL buffers for LE and BR/EDR.

Bug: 8714387
Change-Id: I74e954c0824ddfd89b50c14f6848db787f9b9bff
parent bac74d76
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -550,6 +550,12 @@
#define L2CAP_FCR_RX_POOL_ID        HCI_ACL_POOL_ID
#define L2CAP_FCR_RX_POOL_ID        HCI_ACL_POOL_ID
#endif
#endif


/* Number of ACL buffers to assign to LE
   if the HCI buffer pool is shared with BR/EDR */
#ifndef L2C_DEF_NUM_BLE_BUF_SHARED
#define L2C_DEF_NUM_BLE_BUF_SHARED      1
#endif

/* Used by BTM when it sends HCI commands to the controller. */
/* Used by BTM when it sends HCI commands to the controller. */
#ifndef BTM_CMD_POOL_ID
#ifndef BTM_CMD_POOL_ID
#define BTM_CMD_POOL_ID             GKI_POOL_ID_2
#define BTM_CMD_POOL_ID             GKI_POOL_ID_2
+5 −1
Original line number Original line Diff line number Diff line
@@ -623,7 +623,11 @@ BOOLEAN l2cble_create_conn (tL2C_LCB *p_lcb)
void l2c_link_processs_ble_num_bufs (UINT16 num_lm_ble_bufs)
void l2c_link_processs_ble_num_bufs (UINT16 num_lm_ble_bufs)
{
{
    if (num_lm_ble_bufs == 0)
    if (num_lm_ble_bufs == 0)
        num_lm_ble_bufs = l2cb.num_lm_acl_bufs;
    {
        num_lm_ble_bufs = L2C_DEF_NUM_BLE_BUF_SHARED;
        l2cb.num_lm_acl_bufs -= L2C_DEF_NUM_BLE_BUF_SHARED;
    }

    l2cb.num_lm_ble_bufs = l2cb.controller_le_xmit_window = num_lm_ble_bufs;
    l2cb.num_lm_ble_bufs = l2cb.controller_le_xmit_window = num_lm_ble_bufs;
}
}