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

Commit f71be367 authored by Pavlin Radoslavov's avatar Pavlin Radoslavov Committed by Scott James Remnant
Browse files

GKI cleanup - Remove GKI pool related defines

 * Removed pool ID related defines
 * Updated / renamed / cleanup buffer size related defines
 * Added new #define BT_DEFAULT_BUFFER_SIZE
 * Removed unused defines

Change-Id: Ib1fbf463d1e6fda2c71631347de0c365a37ba5ce
parent f88696bc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -46,8 +46,8 @@ void bta_ag_ci_rx_write(UINT16 handle, char *p_data, UINT16 len)
    UINT16 len_remaining = len;
    char *p_data_area;

    if (len > (RFCOMM_DATA_POOL_BUF_SIZE - sizeof(tBTA_AG_CI_RX_WRITE) - 1))
        len = RFCOMM_DATA_POOL_BUF_SIZE - sizeof(tBTA_AG_CI_RX_WRITE) - 1;
    if (len > (RFCOMM_DATA_BUF_SIZE - sizeof(tBTA_AG_CI_RX_WRITE) - 1))
        len = RFCOMM_DATA_BUF_SIZE - sizeof(tBTA_AG_CI_RX_WRITE) - 1;

    while (len_remaining)
    {
+0 −4
Original line number Diff line number Diff line
@@ -50,10 +50,6 @@ typedef UINT16 (tBTA_HL_ALLOCATE_PSM) (void);
#define BTA_HL_L2C_RTRANS_TOUT          2000
#define BTA_HL_L2C_MON_TOUT             12000
#define BTA_HL_L2C_MPS                  1017
#define BTA_HL_L2C_USER_RX_POOL_ID      L2CAP_DEFAULT_ERM_POOL_ID
#define BTA_HL_L2C_USER_TX_POOL_ID      L2CAP_DEFAULT_ERM_POOL_ID /* todo this should be based on data type */
#define BTA_HL_L2C_FCR_RX_POOL_ID       L2CAP_DEFAULT_ERM_POOL_ID
#define BTA_HL_L2C_FCR_TX_POOL_ID       L2CAP_DEFAULT_ERM_POOL_ID

/* L2CAP FCS setting*/
#define BTA_HL_MCA_USE_FCS              MCA_FCS_USE
+3 −3
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ BOOLEAN bta_hl_set_ctrl_psm_for_dch(UINT8 app_idx, UINT8 mcl_idx,
**
** Description
**
** Returns      UINT8 pool_id
** Returns      TRUE if found
**
*******************************************************************************/
BOOLEAN bta_hl_find_sdp_idx_using_ctrl_psm(tBTA_HL_SDP *p_sdp,
@@ -143,7 +143,7 @@ BOOLEAN bta_hl_find_sdp_idx_using_ctrl_psm(tBTA_HL_SDP *p_sdp,

UINT16 bta_hl_set_user_tx_buf_size(UINT16 max_tx_size)
{
    if (max_tx_size > HCI_ACL_BUF_SIZE)
    if (max_tx_size > BT_DEFAULT_BUFFER_SIZE)
        return BTA_HL_LRG_DATA_BUF_SIZE;
    return L2CAP_INVALID_ERM_BUF_SIZE;
}
@@ -160,7 +160,7 @@ UINT16 bta_hl_set_user_tx_buf_size(UINT16 max_tx_size)

UINT16 bta_hl_set_user_rx_buf_size(UINT16 mtu)
{
    if (mtu > HCI_ACL_BUF_SIZE)
    if (mtu > BT_DEFAULT_BUFFER_SIZE)
        return BTA_HL_LRG_DATA_BUF_SIZE;
    return L2CAP_INVALID_ERM_BUF_SIZE;
}
+0 −1
Original line number Diff line number Diff line
@@ -102,7 +102,6 @@
#define BTA_HL_NUM_TIMERS               7

#define BTA_HL_CCH_RSP_TOUT             2000
#define BTA_HL_LRG_POOL_ID              GKI_POOL_ID_7
#define BTA_HL_MAX_TIME                 255
#define BTA_HL_MIN_TIME                 1
#define BTA_HL_INVALID_APP_HANDLE       0xFF
+0 −2
Original line number Diff line number Diff line
@@ -267,8 +267,6 @@ void bta_dm_sco_co_open(UINT16 handle, UINT8 pkt_size, UINT16 event)
    if (btui_cb.sco_hci)
    {
        BTIF_TRACE_DEBUG("bta_dm_sco_co_open handle:%d pkt_size:%d", handle, pkt_size);
        /* use dedicated SCO buffer pool for SCO TX data */
        cfg.pool_id = HCI_SCO_POOL_ID;
        cfg.p_cback = btui_sco_codec_callback;
        cfg.pkt_size = pkt_size;
        cfg.cb_event = event;
Loading