Bluetooth: controller: split: Revert conn handle invalidation
This reverts commit 7417e6e09e
.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
d380622a4d
commit
43d8166045
2 changed files with 10 additions and 17 deletions
|
@ -828,29 +828,16 @@ void ll_rx_mem_release(void **node_rx)
|
||||||
case NODE_RX_TYPE_TERMINATE:
|
case NODE_RX_TYPE_TERMINATE:
|
||||||
{
|
{
|
||||||
struct ll_conn *conn;
|
struct ll_conn *conn;
|
||||||
struct lll_conn *lll;
|
|
||||||
memq_link_t *link;
|
memq_link_t *link;
|
||||||
|
|
||||||
/* Get the connection context */
|
|
||||||
conn = ll_conn_get(rx_free->handle);
|
conn = ll_conn_get(rx_free->handle);
|
||||||
lll = &conn->lll;
|
|
||||||
|
|
||||||
/* Invalidate the connection context */
|
LL_ASSERT(!conn->lll.link_tx_free);
|
||||||
lll->handle = 0xFFFF;
|
link = memq_deinit(&conn->lll.memq_tx.head,
|
||||||
|
&conn->lll.memq_tx.tail);
|
||||||
/* Demux and flush Tx PDUs that remain enqueued in
|
|
||||||
* thread context
|
|
||||||
*/
|
|
||||||
ull_conn_tx_demux(UINT8_MAX);
|
|
||||||
|
|
||||||
/* De-initialize tx memq and release the used link */
|
|
||||||
LL_ASSERT(!lll->link_tx_free);
|
|
||||||
link = memq_deinit(&lll->memq_tx.head,
|
|
||||||
&lll->memq_tx.tail);
|
|
||||||
LL_ASSERT(link);
|
LL_ASSERT(link);
|
||||||
lll->link_tx_free = link;
|
conn->lll.link_tx_free = link;
|
||||||
|
|
||||||
/* Release the connection context to free pool */
|
|
||||||
ll_conn_release(conn);
|
ll_conn_release(conn);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1713,6 +1713,9 @@ static void conn_cleanup(struct ll_conn *conn, u8_t reason)
|
||||||
ticker_op_stop_cb, (void *)lll);
|
ticker_op_stop_cb, (void *)lll);
|
||||||
LL_ASSERT((ticker_status == TICKER_STATUS_SUCCESS) ||
|
LL_ASSERT((ticker_status == TICKER_STATUS_SUCCESS) ||
|
||||||
(ticker_status == TICKER_STATUS_BUSY));
|
(ticker_status == TICKER_STATUS_BUSY));
|
||||||
|
|
||||||
|
/* Demux and flush Tx PDUs that remain enqueued in thread context */
|
||||||
|
ull_conn_tx_demux(UINT8_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tx_ull_flush(struct ll_conn *conn)
|
static void tx_ull_flush(struct ll_conn *conn)
|
||||||
|
@ -1740,6 +1743,9 @@ static void tx_lll_flush(void *param)
|
||||||
|
|
||||||
lll_conn_flush(lll);
|
lll_conn_flush(lll);
|
||||||
|
|
||||||
|
/* Invalidate the connection context */
|
||||||
|
lll->handle = 0xFFFF;
|
||||||
|
|
||||||
link = memq_dequeue(lll->memq_tx.tail, &lll->memq_tx.head,
|
link = memq_dequeue(lll->memq_tx.tail, &lll->memq_tx.head,
|
||||||
(void **)&tx);
|
(void **)&tx);
|
||||||
while (link) {
|
while (link) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue