Bluetooth: controller: Fix rx buffer leak for LL Version priority event

Fix leak of the node_rx buffer when processing the LL version ind as a
priority event. This leak meant being able to establish new connections
was no longer possible, because there weren't enough events to process
the all the events during connection establishment. And instead the LL
ignored the connection request sent by the peer.

Removed the inline extern declaration of a function which had a proper
header included.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
Joakim Andersson 2019-12-12 11:45:16 +01:00 committed by Carles Cufí
parent 1932d511db
commit e978d8620f

View file

@ -140,6 +140,13 @@ static void prio_recv_thread(void *p1, void *p2, void *p3)
buf = process_prio_evt(node_rx);
if (buf) {
#if defined(CONFIG_BT_LL_SW_LEGACY)
radio_rx_fc_set(node_rx->hdr.handle, 0);
#endif /* CONFIG_BT_LL_SW_LEGACY */
node_rx->hdr.next = NULL;
ll_rx_mem_release((void **)&node_rx);
BT_DBG("Priority event");
bt_recv_prio(buf);
} else {
@ -211,11 +218,7 @@ static inline struct net_buf *encode_node(struct node_rx_pdu *node_rx,
}
#if defined(CONFIG_BT_LL_SW_LEGACY)
{
extern u8_t radio_rx_fc_set(u16_t handle, u8_t fc);
radio_rx_fc_set(node_rx->hdr.handle, 0);
}
radio_rx_fc_set(node_rx->hdr.handle, 0);
#endif /* CONFIG_BT_LL_SW_LEGACY */
node_rx->hdr.next = NULL;