diff --git a/subsys/bluetooth/controller/ll_sw/lll.h b/subsys/bluetooth/controller/ll_sw/lll.h index a003874a421cad..407594cb543bd9 100644 --- a/subsys/bluetooth/controller/ll_sw/lll.h +++ b/subsys/bluetooth/controller/ll_sw/lll.h @@ -11,6 +11,7 @@ #define TICKER_USER_ID_THREAD MAYFLY_CALL_ID_PROGRAM #define EVENT_PIPELINE_MAX 5 +#define EVENT_DONE_MAX 3 #define HDR_ULL(p) ((void *)((u8_t *)(p) + sizeof(struct evt_hdr))) #define HDR_ULL2LLL(p) ((struct lll_hdr *)((u8_t *)(p) + \ diff --git a/subsys/bluetooth/controller/ll_sw/ull.c b/subsys/bluetooth/controller/ll_sw/ull.c index e7a977208d14f5..a7ccd06cc22f03 100644 --- a/subsys/bluetooth/controller/ll_sw/ull.c +++ b/subsys/bluetooth/controller/ll_sw/ull.c @@ -128,18 +128,17 @@ static MFIFO_DEFINE(prep, sizeof(struct lll_event), EVENT_PIPELINE_MAX); * Queue of pointers to struct node_rx_event_done. * The actual backing behind these pointers is mem_done */ -static MFIFO_DEFINE(done, sizeof(struct node_rx_event_done *), - EVENT_PIPELINE_MAX); +static MFIFO_DEFINE(done, sizeof(struct node_rx_event_done *), EVENT_DONE_MAX); /* Backing storage for elements in mfifo_done */ static struct { void *free; - u8_t pool[sizeof(struct node_rx_event_done) * EVENT_PIPELINE_MAX]; + u8_t pool[sizeof(struct node_rx_event_done) * EVENT_DONE_MAX]; } mem_done; static struct { void *free; - u8_t pool[sizeof(memq_link_t) * EVENT_PIPELINE_MAX]; + u8_t pool[sizeof(memq_link_t) * EVENT_DONE_MAX]; } mem_link_done; #define PDU_RX_CNT (CONFIG_BT_CTLR_RX_BUFFERS + 3) @@ -1125,10 +1124,10 @@ static inline int init_reset(void) /* Initialize done pool. */ mem_init(mem_done.pool, sizeof(struct node_rx_event_done), - EVENT_PIPELINE_MAX, &mem_done.free); + EVENT_DONE_MAX, &mem_done.free); /* Initialize done link pool. */ - mem_init(mem_link_done.pool, sizeof(memq_link_t), EVENT_PIPELINE_MAX, + mem_init(mem_link_done.pool, sizeof(memq_link_t), EVENT_DONE_MAX, &mem_link_done.free); /* Allocate done buffers */