Skip to content

Commit 0d766c6

Browse files
cvinayakcarlescufi
authored andcommitted
Bluetooth: controller: split: Fix PDU handling on terminate
Fix handling of Rx-ed PDU on termination, do not process Rx-ed control PDUs and release the PDU buffer back to the free pool. Without this fix, Rx-ed control PDU was responded with a Tx PDU, which did not get acknowledged or released. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 98ad4bb commit 0d766c6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

subsys/bluetooth/controller/ll_sw/ull_conn.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,8 +667,13 @@ int ull_conn_rx(memq_link_t *link, struct node_rx_pdu **rx)
667667
struct pdu_data *pdu_rx;
668668
struct ll_conn *conn;
669669

670-
conn = ll_conn_get((*rx)->hdr.handle);
671-
LL_ASSERT(conn);
670+
conn = ll_connected_get((*rx)->hdr.handle);
671+
if (!conn) {
672+
/* Mark for buffer for release */
673+
(*rx)->hdr.type = NODE_RX_TYPE_DC_PDU_RELEASE;
674+
675+
return 0;
676+
}
672677

673678
pdu_rx = (void *)(*rx)->pdu;
674679

0 commit comments

Comments
 (0)