help
This select can make the allocation of memory will become more flexible
+config BLE_HOST_QUEUE_CONGESTION_CHECK
+ bool "BLE queue congestion check"
+ depends on BLUEDROID_ENABLED
+ default n
+ help
+ When scanning and scan duplicate is not enabled, if there are a lot of adv packets around or application layer
+ handling adv packets is slow, it will cause the controller memory to run out. if enabled, adv packets will be
+ lost when host queue is congested.
+
config BLE_SCAN_DUPLICATE
bool "BLE Scan Duplicate Options "
depends on BLUEDROID_ENABLED
config DUPLICATE_SCAN_CACHE_SIZE
int "Maximum number of devices in scan duplicate filter"
depends on BLE_SCAN_DUPLICATE
- range 10 200
- default 20
+ range 10 1000
+ default 50
help
Maximum number of devices which can be recorded in scan duplicate filter.
When the maximum amount of device in the filter is reached, the cache will be refreshed.
config MESH_DUPLICATE_SCAN_CACHE_SIZE
int "Maximum number of Mesh adv packets in scan duplicate filter"
depends on BLE_MESH_SCAN_DUPLICATE_EN
- range 10 200
- default 50
+ range 10 1000
+ default 100
help
Maximum number of adv packets which can be recorded in duplicate scan cache for BLE Mesh.
When the maximum amount of device in the filter is reached, the cache will be refreshed.
return BT_STATUS_NOMEM;
}
btc_gap_callback_init();
+#if SCAN_QUEUE_CONGEST_CHECK
+ btc_adv_list_init();
+#endif
/* TODO: initial the profile_tab */
return BT_STATUS_SUCCESS;
}
{
vTaskDelete(xBtcTaskHandle);
vQueueDelete(xBtcQueue);
-
+#if SCAN_QUEUE_CONGEST_CHECK
+ btc_adv_list_deinit();
+#endif
xBtcTaskHandle = NULL;
xBtcQueue = 0;
}
+
+bool btc_check_queue_is_congest(void)
+{
+ UBaseType_t wait_size = uxQueueMessagesWaiting(xBtcQueue);
+ if(wait_size >= QUEUE_CONGEST_SIZE) {
+ return true;
+ }
+ return false;
+}
void *arg; //param for btc function or function param
} btc_msg_t;
+typedef struct btc_adv_packet {
+ uint8_t addr[6];
+ uint8_t addr_type;
+} btc_adv_packet_t;
+
typedef enum {
BTC_SIG_API_CALL = 0, // APP TO STACK
BTC_SIG_API_CB, // STACK TO APP
int btc_init(void);
void btc_deinit(void);
+bool btc_check_queue_is_congest(void);
#endif /* __BTC_TASK_H__ */
btc_a2dp_sink_state = BTC_A2DP_SINK_STATE_ON;
- btc_aa_snk_cb.RxSbcQ = fixed_queue_new(SIZE_MAX);
+ btc_aa_snk_cb.RxSbcQ = fixed_queue_new(QUEUE_SIZE_MAX);
btc_a2dp_control_init();
}
btc_a2dp_source_state = BTC_A2DP_SOURCE_STATE_ON;
- btc_aa_src_cb.TxAaQ = fixed_queue_new(SIZE_MAX);
+ btc_aa_src_cb.TxAaQ = fixed_queue_new(QUEUE_SIZE_MAX);
btc_a2dp_control_init();
}
#include "btc/btc_ble_storage.h"
#include "btc/btc_dm.h"
#include "btc/btc_util.h"
+#include "osi/mutex.h"
static tBTA_BLE_ADV_DATA gl_bta_adv_data;
static tBTA_BLE_ADV_DATA gl_bta_scan_rsp_data;
+#if SCAN_QUEUE_CONGEST_CHECK
+static list_t *adv_filter_list;
+static osi_mutex_t adv_list_lock;
+bool btc_check_adv_list(uint8_t * addr, uint8_t addr_type);
+uint32_t btc_get_adv_list_length(void);
+void btc_adv_list_refresh(void);
+void btc_adv_list_lock(void);
+void btc_adv_list_unlock(void);
+static uint16_t btc_adv_list_count = 0;
+
+#define BTC_ADV_LIST_MAX_LENGTH 50
+#define BTC_ADV_LIST_MAX_COUNT 200
+#endif
static inline void btc_gap_ble_cb_to_app(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param)
{
param.scan_rst.search_evt = event;
switch (event) {
case BTA_DM_INQ_RES_EVT: {
+#if SCAN_QUEUE_CONGEST_CHECK
+ if(btc_check_queue_is_congest()) {
+ BTC_TRACE_DEBUG("BtcQueue is congested");
+ if(btc_get_adv_list_length() > BTC_ADV_LIST_MAX_LENGTH || btc_adv_list_count > BTC_ADV_LIST_MAX_COUNT) {
+ btc_adv_list_refresh();
+ btc_adv_list_count = 0;
+ }
+ if(btc_check_adv_list(p_data->inq_res.bd_addr, p_data->inq_res.ble_addr_type)) {
+ return;
+ }
+ }
+ btc_adv_list_count ++;
+#endif
bdcpy(param.scan_rst.bda, p_data->inq_res.bd_addr);
param.scan_rst.dev_type = p_data->inq_res.device_type;
param.scan_rst.rssi = p_data->inq_res.rssi;
if (ret != BT_STATUS_SUCCESS) {
BTC_TRACE_ERROR("%s btc_transfer_context failed\n", __func__);
}
+#if SCAN_QUEUE_CONGEST_CHECK
+ btc_adv_list_refresh();
+#endif
}
void btc_update_conn_param_callback (UINT8 status, BD_ADDR bd_addr, tBTM_LE_UPDATE_CONN_PRAMS *update_conn_params)
tBTA_START_STOP_SCAN_CMPL_CBACK *start_scan_cb)
{
if ((results_cb != NULL) && (start_scan_cb != NULL)) {
+#if SCAN_QUEUE_CONGEST_CHECK
+ btc_adv_list_refresh();
+#endif
//Start scan the device
BTA_DmBleScan(true, duration, results_cb, start_scan_cb);
} else {
btc_cleanup_adv_data(&gl_bta_adv_data);
btc_cleanup_adv_data(&gl_bta_scan_rsp_data);
}
+
+#if SCAN_QUEUE_CONGEST_CHECK
+void btc_adv_list_free(void *data)
+{
+ osi_free(data);
+}
+
+void btc_adv_list_init(void)
+{
+ osi_mutex_new(&adv_list_lock);
+ adv_filter_list = list_new(btc_adv_list_free);
+}
+
+void btc_adv_list_deinit(void)
+{
+ osi_mutex_free(&adv_list_lock);
+ if(adv_filter_list) {
+ list_free(adv_filter_list);
+ adv_filter_list = NULL;
+ }
+}
+void btc_adv_list_add_packet(void * data)
+{
+ if(!data) {
+ BTC_TRACE_ERROR("%s data is NULL", __func__);
+ return;
+ }
+ btc_adv_list_lock();
+ list_prepend(adv_filter_list, data);
+ btc_adv_list_unlock();
+}
+
+uint32_t btc_get_adv_list_length(void)
+{
+ if(!adv_filter_list) {
+ BTC_TRACE_ERROR("%s adv_filter_list is NULL", __func__);
+ return 0;
+ }
+ btc_adv_list_lock();
+ size_t length = list_length(adv_filter_list);
+ btc_adv_list_unlock();
+
+ return length;
+}
+
+void btc_adv_list_refresh(void)
+{
+ if(!adv_filter_list) {
+ BTC_TRACE_ERROR("%s adv_filter_list is NULL", __func__);
+ return ;
+ }
+ btc_adv_list_lock();
+ list_clear(adv_filter_list);
+ btc_adv_list_unlock();
+}
+
+bool btc_check_adv_list(uint8_t * addr, uint8_t addr_type)
+{
+ bool found = false;
+ if(!adv_filter_list || !addr) {
+ BTC_TRACE_ERROR("%s adv_filter_list is NULL", __func__);
+ return found;
+ }
+
+ btc_adv_list_lock();
+ for (const list_node_t *node = list_begin(adv_filter_list); node != list_end(adv_filter_list); node = list_next(node)) {
+ btc_adv_packet_t *packet = (btc_adv_packet_t *)list_node(node);
+ if(!bdcmp(addr, packet->addr) && packet->addr_type == addr_type) {
+ found = true;
+ break;
+ }
+ }
+ btc_adv_list_unlock();
+ if(!found) {
+ btc_adv_packet_t *adv_packet = osi_malloc(sizeof(btc_adv_packet_t));
+ if(adv_packet) {
+ adv_packet->addr_type = addr_type;
+ bdcpy(adv_packet->addr, addr);
+ btc_adv_list_add_packet(adv_packet);
+ } else {
+ BTC_TRACE_ERROR("%s adv_packet malloc failed", __func__);
+ }
+ }
+ return found;
+}
+
+void btc_adv_list_lock(void)
+{
+ osi_mutex_lock(&adv_list_lock, OSI_MUTEX_MAX_TIMEOUT);
+}
+
+void btc_adv_list_unlock(void)
+{
+ osi_mutex_unlock(&adv_list_lock);
+}
+#endif
void btc_gap_ble_cb_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src);
void btc_gap_callback_init(void);
void btc_gap_ble_deinit(void);
+void btc_adv_list_init(void);
+void btc_adv_list_deinit(void);
#endif /* __BTC_GAP_BLE_H__ */
#define UNUSED(x) (void)(x)
-#ifndef SIZE_MAX
-#define SIZE_MAX 254
-#endif
/*Timer Related Defination*/
//by Snake.T
#define BTA_AV_CO_CP_SCMS_T FALSE//FALSE
#endif
+#ifndef QUEUE_CONGEST_SIZE
+#define QUEUE_CONGEST_SIZE 40
+#endif
+
+#ifndef CONFIG_BLE_HOST_QUEUE_CONGESTION_CHECK
+#define SCAN_QUEUE_CONGEST_CHECK FALSE
+#else
+#define SCAN_QUEUE_CONGEST_CHECK CONFIG_BLE_HOST_QUEUE_CONGESTION_CHECK
+#endif
+
/* This feature is used to eanble interleaved scan*/
#ifndef BTA_HOST_INTERLEAVE_SEARCH
#define BTA_HOST_INTERLEAVE_SEARCH FALSE//FALSE
#define HCI_BLE_EVENT 0x3e
#define PACKET_TYPE_TO_INBOUND_INDEX(type) ((type) - 2)
#define PACKET_TYPE_TO_INDEX(type) ((type) - 1)
+extern bool BTU_check_queue_is_congest(void);
static const uint8_t preamble_sizes[] = {
assert(upper_callbacks != NULL);
callbacks = upper_callbacks;
- hci_hal_env_init(HCI_HAL_SERIAL_BUFFER_SIZE, SIZE_MAX);
+ hci_hal_env_init(HCI_HAL_SERIAL_BUFFER_SIZE, QUEUE_SIZE_MAX);
xHciH4Queue = xQueueCreate(HCI_H4_QUEUE_LEN, sizeof(BtTaskEvt_t));
xTaskCreatePinnedToCore(hci_hal_h4_rx_handler, HCI_H4_TASK_NAME, HCI_H4_TASK_STACK_SIZE, NULL, HCI_H4_TASK_PRIO, &xHciH4TaskHandle, HCI_H4_TASK_PINNED_TO_CORE);
evt.par = 0;
if (xQueueSend(xHciH4Queue, &evt, timeout) != pdTRUE) {
- HCI_TRACE_ERROR("xHciH4Queue failed\n");
return TASK_POST_SUCCESS;
}
}
#endif ///C2H_FLOW_CONTROL_INCLUDED == TRUE
+bool host_recv_adv_packet(BT_HDR *packet)
+{
+ assert(packet);
+ if(packet->data[0] == DATA_TYPE_EVENT && packet->data[1] == HCI_BLE_EVENT && packet->data[3] == HCI_BLE_ADV_PKT_RPT_EVT) {
+ return true;
+ }
+ return false;
+}
static void hci_hal_h4_hdl_rx_packet(BT_HDR *packet)
{
hci_hal_env.allocator->free(packet);
return;
}
+#if SCAN_QUEUE_CONGEST_CHECK
+ if(BTU_check_queue_is_congest() && host_recv_adv_packet(packet)) {
+ HCI_TRACE_ERROR("BtuQueue is congested");
+ hci_hal_env.allocator->free(packet);
+ return;
+ }
+#endif
packet->event = outbound_event_types[PACKET_TYPE_TO_INDEX(type)];
callbacks->packet_ready(packet);
pkt->layer_specific = 0;
memcpy(pkt->data, data, len);
fixed_queue_enqueue(hci_hal_env.rx_q, pkt);
- hci_hal_h4_task_post(TASK_POST_BLOCKING);
+ hci_hal_h4_task_post(100 / portTICK_PERIOD_MS);
BTTRC_DUMP_BUFFER("Recv Pkt", pkt->data, len);
// as per the Bluetooth spec, Volume 2, Part E, 4.4 (Command Flow Control)
// This value can change when you get a command complete or command status event.
hci_host_env.command_credits = 1;
- hci_host_env.command_queue = fixed_queue_new(SIZE_MAX);
+ hci_host_env.command_queue = fixed_queue_new(QUEUE_SIZE_MAX);
if (hci_host_env.command_queue) {
fixed_queue_register_dequeue(hci_host_env.command_queue, event_command_ready);
} else {
return -1;
}
- hci_host_env.packet_queue = fixed_queue_new(SIZE_MAX);
+ hci_host_env.packet_queue = fixed_queue_new(QUEUE_SIZE_MAX);
if (hci_host_env.packet_queue) {
fixed_queue_register_dequeue(hci_host_env.packet_queue, event_packet_ready);
} else {
#include <stdbool.h>
#include "osi/list.h"
+#ifndef QUEUE_SIZE_MAX
+#define QUEUE_SIZE_MAX 254
+#endif
+
struct fixed_queue_t;
typedef struct fixed_queue_t fixed_queue_t;
#define HCI_H4_TASK_STACK_SIZE (2048 + BT_TASK_EXTRA_STACK_SIZE)
#define HCI_H4_TASK_PRIO (configMAX_PRIORITIES - 4)
#define HCI_H4_TASK_NAME "hciH4T"
-#define HCI_H4_QUEUE_LEN 60
+#define HCI_H4_QUEUE_LEN 1
#define BTU_TASK_PINNED_TO_CORE (TASK_PINNED_TO_CORE)
#define BTU_TASK_STACK_SIZE (4096 + BT_TASK_EXTRA_STACK_SIZE)
p_lcb->allocated = (UINT8)(i + 1);
memcpy(p_lcb->peer_addr, bd_addr, BD_ADDR_LEN);
AVCT_TRACE_DEBUG("avct_lcb_alloc %d", p_lcb->allocated);
- p_lcb->tx_q = fixed_queue_new(SIZE_MAX);
+ p_lcb->tx_q = fixed_queue_new(QUEUE_SIZE_MAX);
break;
}
}
if (!p_ccb->allocated) {
p_ccb->allocated = TRUE;
memcpy(p_ccb->peer_addr, bd_addr, BD_ADDR_LEN);
- p_ccb->cmd_q = fixed_queue_new(SIZE_MAX);
- p_ccb->rsp_q = fixed_queue_new(SIZE_MAX);
+ p_ccb->cmd_q = fixed_queue_new(QUEUE_SIZE_MAX);
+ p_ccb->rsp_q = fixed_queue_new(QUEUE_SIZE_MAX);
p_ccb->timer_entry.param = (UINT32) p_ccb;
AVDT_TRACE_DEBUG("avdt_ccb_alloc %d\n", i);
break;
memcpy(&p_scb->cs, p_cs, sizeof(tAVDT_CS));
#if AVDT_MULTIPLEXING == TRUE
/* initialize fragments gueue */
- p_scb->frag_q = fixed_queue_new(SIZE_MAX);
+ p_scb->frag_q = fixed_queue_new(QUEUE_SIZE_MAX);
if (p_cs->cfg.psc_mask & AVDT_PSC_MUX) {
p_scb->cs.cfg.mux_tcid_media = avdt_ad_type_to_tcid(AVDT_CHAN_MEDIA, p_scb);
btm_cb.cmn_ble_vsc_cb.values_read = FALSE;
p_cb->cur_states = 0;
- p_cb->conn_pending_q = fixed_queue_new(SIZE_MAX);
+ p_cb->conn_pending_q = fixed_queue_new(QUEUE_SIZE_MAX);
p_cb->inq_var.adv_mode = BTM_BLE_ADV_DISABLE;
p_cb->inq_var.scan_type = BTM_BLE_SCAN_MODE_NONE;
#endif /* #if BTM_DYNAMIC_MEMORY */
/* All fields are cleared; nonzero fields are reinitialized in appropriate function */
memset(&btm_cb, 0, sizeof(tBTM_CB));
- btm_cb.page_queue = fixed_queue_new(SIZE_MAX);
- btm_cb.sec_pending_q = fixed_queue_new(SIZE_MAX);
+ btm_cb.page_queue = fixed_queue_new(QUEUE_SIZE_MAX);
+ btm_cb.sec_pending_q = fixed_queue_new(QUEUE_SIZE_MAX);
#if defined(BTM_INITIAL_TRACE_LEVEL)
btm_cb.trace_level = BTM_INITIAL_TRACE_LEVEL;
#endif
#if (BTM_SCO_HCI_INCLUDED == TRUE)
for (int i = 0; i < BTM_MAX_SCO_LINKS; i++) {
- btm_cb.sco_cb.sco_db[i].xmit_data_q = fixed_queue_new(SIZE_MAX);
+ btm_cb.sco_cb.sco_db[i].xmit_data_q = fixed_queue_new(QUEUE_SIZE_MAX);
}
#endif
/* Initialize nonzero defaults */
/* Now, re-submit anything in the mux queue */
bq = btm_cb.sec_pending_q;
if (!btm_cb.sec_pending_q) {
- btm_cb.sec_pending_q = fixed_queue_new(SIZE_MAX);
+ btm_cb.sec_pending_q = fixed_queue_new(QUEUE_SIZE_MAX);
}
while ((p_e = (tBTM_SEC_QUEUE_ENTRY *)fixed_queue_try_dequeue(bq)) != NULL) {
return 0;
#endif
}
+#if SCAN_QUEUE_CONGEST_CHECK
+bool BTU_check_queue_is_congest(void)
+{
+ UBaseType_t wait_size = uxQueueMessagesWaiting(xBtuQueue);
+ if(wait_size >= QUEUE_CONGEST_SIZE ) {
+ return true;
+ }
+ return false;
+}
+#endif
for (xx = 0, p_ccb = gap_cb.conn.ccb_pool; xx < GAP_MAX_CONNECTIONS; xx++, p_ccb++) {
if (p_ccb->con_state == GAP_CCB_STATE_IDLE) {
memset (p_ccb, 0, sizeof (tGAP_CCB));
- p_ccb->tx_queue = fixed_queue_new(SIZE_MAX);
- p_ccb->rx_queue = fixed_queue_new(SIZE_MAX);
+ p_ccb->tx_queue = fixed_queue_new(QUEUE_SIZE_MAX);
+ p_ccb->rx_queue = fixed_queue_new(QUEUE_SIZE_MAX);
p_ccb->gap_handle = xx;
p_ccb->rem_mtu_size = L2CAP_MTU_SIZE;
UINT16 s_hdl, UINT16 num_handle)
{
if (p_db->svc_buffer == NULL) { //in case already alloc
- p_db->svc_buffer = fixed_queue_new(SIZE_MAX);
+ p_db->svc_buffer = fixed_queue_new(QUEUE_SIZE_MAX);
}
if (!allocate_svc_db_buf(p_db)) {
gatt_cb.trace_level = BT_TRACE_LEVEL_NONE; /* No traces */
#endif
gatt_cb.def_mtu_size = GATT_DEF_BLE_MTU_SIZE;
- gatt_cb.sign_op_queue = fixed_queue_new(SIZE_MAX);
- gatt_cb.srv_chg_clt_q = fixed_queue_new(SIZE_MAX);
- gatt_cb.pending_new_srv_start_q = fixed_queue_new(SIZE_MAX);
+ gatt_cb.sign_op_queue = fixed_queue_new(QUEUE_SIZE_MAX);
+ gatt_cb.srv_chg_clt_q = fixed_queue_new(QUEUE_SIZE_MAX);
+ gatt_cb.pending_new_srv_start_q = fixed_queue_new(QUEUE_SIZE_MAX);
/* First, register fixed L2CAP channel for ATT over BLE */
fixed_reg.fixed_chnl_opts.mode = L2CAP_FCR_BASIC_MODE;
fixed_reg.fixed_chnl_opts.max_transmit = 0xFF;
GATT_TRACE_DEBUG ("process_read_multi_rsp status=%d mtu=%d", status, mtu);
if (p_cmd->multi_rsp_q == NULL) {
- p_cmd->multi_rsp_q = fixed_queue_new(SIZE_MAX);
+ p_cmd->multi_rsp_q = fixed_queue_new(QUEUE_SIZE_MAX);
}
/* Enqueue the response */
queue_data->offset = offset;
memcpy(queue_data->value, p, len);
if (prepare_record->queue == NULL) {
- prepare_record->queue = fixed_queue_new(SIZE_MAX);
+ prepare_record->queue = fixed_queue_new(QUEUE_SIZE_MAX);
}
fixed_queue_enqueue(prepare_record->queue, queue_data);
}
if (!p_cb->hdl_list[i].in_use) {
memset(p_elem, 0, sizeof(tGATT_HDL_LIST_ELEM));
p_elem->in_use = TRUE;
- p_elem->svc_db.svc_buffer = fixed_queue_new(SIZE_MAX);
+ p_elem->svc_db.svc_buffer = fixed_queue_new(QUEUE_SIZE_MAX);
return p_elem;
}
}
if (allocated) {
memset(p_tcb, 0, sizeof(tGATT_TCB));
- p_tcb->pending_enc_clcb = fixed_queue_new(SIZE_MAX);
- p_tcb->pending_ind_q = fixed_queue_new(SIZE_MAX);
+ p_tcb->pending_enc_clcb = fixed_queue_new(QUEUE_SIZE_MAX);
+ p_tcb->pending_ind_q = fixed_queue_new(QUEUE_SIZE_MAX);
p_tcb->in_use = TRUE;
p_tcb->tcb_idx = i;
p_tcb->transport = transport;
if ( (!p_ccb->fcrb.local_busy) && (!p_ccb->fcrb.srej_sent) &&
(!fixed_queue_is_empty(p_ccb->fcrb.srej_rcv_hold_q))) {
fixed_queue_t *temp_q = p_ccb->fcrb.srej_rcv_hold_q;
- p_ccb->fcrb.srej_rcv_hold_q = fixed_queue_new(SIZE_MAX);
+ p_ccb->fcrb.srej_rcv_hold_q = fixed_queue_new(QUEUE_SIZE_MAX);
while ((p_buf = (BT_HDR *)fixed_queue_try_dequeue(temp_q)) != NULL) {
if (p_ccb->in_use && (p_ccb->chnl_state == CST_OPEN)) {
#if (BLE_INCLUDED == TRUE)
p_lcb->transport = transport;
p_lcb->tx_data_len = controller_get_interface()->get_ble_default_data_packet_length();
- p_lcb->le_sec_pending_q = fixed_queue_new(SIZE_MAX);
+ p_lcb->le_sec_pending_q = fixed_queue_new(QUEUE_SIZE_MAX);
if (transport == BT_TRANSPORT_LE) {
l2cb.num_ble_links_active++;
p_ccb->max_rx_mtu = L2CAP_MTU_SIZE;
p_ccb->tx_mps = L2CAP_FCR_TX_BUF_SIZE - 32;
- p_ccb->xmit_hold_q = fixed_queue_new(SIZE_MAX);
+ p_ccb->xmit_hold_q = fixed_queue_new(QUEUE_SIZE_MAX);
#if (CLASSIC_BT_INCLUDED == TRUE)
- p_ccb->fcrb.srej_rcv_hold_q = fixed_queue_new(SIZE_MAX);
- p_ccb->fcrb.retrans_q = fixed_queue_new(SIZE_MAX);
- p_ccb->fcrb.waiting_for_ack_q = fixed_queue_new(SIZE_MAX);
+ p_ccb->fcrb.srej_rcv_hold_q = fixed_queue_new(QUEUE_SIZE_MAX);
+ p_ccb->fcrb.retrans_q = fixed_queue_new(QUEUE_SIZE_MAX);
+ p_ccb->fcrb.waiting_for_ack_q = fixed_queue_new(QUEUE_SIZE_MAX);
#endif ///CLASSIC_BT_INCLUDED == TRUE
p_ccb->cong_sent = FALSE;
memset (&p_port->rx, 0, sizeof (p_port->rx));
memset (&p_port->tx, 0, sizeof (p_port->tx));
- p_port->tx.queue = fixed_queue_new(SIZE_MAX);
- p_port->rx.queue = fixed_queue_new(SIZE_MAX);
+ p_port->tx.queue = fixed_queue_new(QUEUE_SIZE_MAX);
+ p_port->rx.queue = fixed_queue_new(QUEUE_SIZE_MAX);
}
/*******************************************************************************
RFCOMM_TRACE_DEBUG("rfc_alloc_multiplexer_channel:is_initiator:%d, create new p_mcb:%p, index:%d",
is_initiator, &rfc_cb.port.rfc_mcb[j], j);
- p_mcb->cmd_q = fixed_queue_new(SIZE_MAX);
+ p_mcb->cmd_q = fixed_queue_new(QUEUE_SIZE_MAX);
p_mcb->is_initiator = is_initiator;