Bluetooth: controller: split: Fix flushing Tx buffers in HCI

Fix for possible Tx Buffer leak during disconnection when
the buffers are in HCI thread context  and not yet demux-ed
and enqueued towards LLL context.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2019-09-30 14:02:45 +05:30 committed by Carles Cufí
commit 203b5859a1

View file

@ -1532,6 +1532,9 @@ static void conn_cleanup(struct ll_conn *conn)
ll_rx_put(rx->hdr.link, rx);
}
/* TODO: flush demux-ed Tx buffer still in ULL context */
LL_ASSERT(!conn->tx_head);
/* Enable Ticker Job, we are in a radio event which disabled it if
* worker0 and job0 priority where same.
*/
@ -1547,6 +1550,9 @@ static void conn_cleanup(struct ll_conn *conn)
/* Invalidate the connection context */
lll->handle = 0xFFFF;
/* Demux and flush Tx PDUs that remain enqueued in thread context */
ull_conn_tx_demux(UINT8_MAX);
}
#if defined(CONFIG_BT_CTLR_LLID_DATA_START_EMPTY)