Bluetooth: Controller: One extra ISO rx buffer for empty PDU reception
Budget for one extra ISO Rx PDU buffer for empty/NULL PDU reception that has to always remain free in order to be able to setup radio h/w for new PDU receptions. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
554ea0bae3
commit
46ead9915d
2 changed files with 17 additions and 4 deletions
|
@ -271,6 +271,9 @@ static int prepare_cb_common(struct lll_prepare_param *p)
|
|||
radio_crc_configure(PDU_CRC_POLYNOMIAL, sys_get_le24(crc_init));
|
||||
lll_chan_set(data_chan_use);
|
||||
|
||||
/* By design, there shall alway be one free node rx available for
|
||||
* setting up radio for new PDU reception.
|
||||
*/
|
||||
node_rx = ull_iso_pdu_rx_alloc_peek(1U);
|
||||
LL_ASSERT(node_rx);
|
||||
radio_pkt_rx_set(node_rx->pdu);
|
||||
|
@ -477,6 +480,12 @@ static void isr_rx(void *param)
|
|||
lll->ctrl) {
|
||||
lll->cssn_curr = lll->cssn_next;
|
||||
|
||||
/* By design, there shall alway be one free node rx
|
||||
* available for setting up radio for new PDU reception.
|
||||
* Control procedure handling does not consume any
|
||||
* node rx, hence checking for one free node rx is
|
||||
* sufficient.
|
||||
*/
|
||||
node_rx = ull_iso_pdu_rx_alloc_peek(1U);
|
||||
LL_ASSERT(node_rx);
|
||||
|
||||
|
@ -487,7 +496,7 @@ static void isr_rx(void *param)
|
|||
|
||||
isr_rx_ctrl_recv(lll, pdu);
|
||||
} else {
|
||||
/* check if there are 2 free rx buffers, one will be
|
||||
/* Check if there are 2 free rx buffers, one will be
|
||||
* consumed to receive the current PDU, and the other
|
||||
* is to ensure a PDU can be setup for the radio DMA to
|
||||
* receive in the next sub_interval/iso_interval.
|
||||
|
@ -673,7 +682,7 @@ isr_rx_find_subevent:
|
|||
|
||||
iso_rx_put(node_rx->hdr.link, node_rx);
|
||||
} else {
|
||||
/* check if there are 2 free rx buffers, one
|
||||
/* Check if there are 2 free rx buffers, one
|
||||
* will be consumed to generate PDU with invalid
|
||||
* status, and the other is to ensure a PDU can
|
||||
* be setup for the radio DMA to receive in the
|
||||
|
@ -805,6 +814,9 @@ isr_rx_next_subevent:
|
|||
}
|
||||
lll_chan_set(data_chan_use);
|
||||
|
||||
/* By design, there shall alway be one free node rx available for
|
||||
* setting up radio for new PDU reception.
|
||||
*/
|
||||
node_rx = ull_iso_pdu_rx_alloc_peek(1U);
|
||||
LL_ASSERT(node_rx);
|
||||
radio_pkt_rx_set(node_rx->pdu);
|
||||
|
|
|
@ -110,10 +110,11 @@ static void *datapath_free;
|
|||
* - mem_iso_rx: Backing data pool for PDU buffer elements
|
||||
* - mem_link_iso_rx: Pool of memq_link_t elements
|
||||
*
|
||||
* One extra rx buffer is reserved for empty ISO PDU reception.
|
||||
* Two extra links are reserved for use by the ll_iso_rx and ull_iso_rx memq.
|
||||
*/
|
||||
static RXFIFO_DEFINE(iso_rx, NODE_RX_HEADER_SIZE + ISO_RX_BUFFER_SIZE,
|
||||
CONFIG_BT_CTLR_ISO_RX_BUFFERS, 2);
|
||||
static RXFIFO_DEFINE(iso_rx, ((NODE_RX_HEADER_SIZE) + (ISO_RX_BUFFER_SIZE)),
|
||||
(CONFIG_BT_CTLR_ISO_RX_BUFFERS + 1U), 2U);
|
||||
|
||||
static MEMQ_DECLARE(ll_iso_rx);
|
||||
#if defined(CONFIG_BT_CTLR_ISO_VENDOR_DATA_PATH)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue