Skip to content

Commit e1d9620

Browse files
cvinayakjhedberg
authored andcommitted
Bluetooth: controller: legacy: Fix assert on DLE procedure stall
Fix local initiated Data Length Update procedure from being stalled when a remote initiates a procedure with instant. Fixes #23069. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent fa19193 commit e1d9620

File tree

1 file changed

+28
-1
lines changed
  • subsys/bluetooth/controller/ll_sw

1 file changed

+28
-1
lines changed

subsys/bluetooth/controller/ll_sw/ctrl.c

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9056,13 +9056,40 @@ static void event_connection_prepare(u32_t ticks_at_expire,
90569056
}
90579057
}
90589058

9059-
/* check if procedure is requested */
9059+
/* Check if procedures with instant or encryption setup is requested or
9060+
* active.
9061+
*/
90609062
if (conn->llcp_ack != conn->llcp_req) {
90619063
/* Stop previous event, to avoid Radio DMA corrupting the
90629064
* rx queue
90639065
*/
90649066
event_stop(0, 0, 0, (void *)STATE_ABORT);
90659067

9068+
/* Process parallel procedures that are active */
9069+
if (0) {
9070+
#if defined(CONFIG_BT_CTLR_DATA_LENGTH)
9071+
/* Check if DLE in progress */
9072+
} else if (conn->llcp_length.ack != conn->llcp_length.req) {
9073+
if ((conn->llcp_length.state ==
9074+
LLCP_LENGTH_STATE_RESIZE) ||
9075+
(conn->llcp_length.state ==
9076+
LLCP_LENGTH_STATE_RESIZE_RSP)) {
9077+
/* handle DLU state machine */
9078+
if (event_len_prep(conn)) {
9079+
/* NOTE: rx pool could not be resized,
9080+
* lets skip this event and try in the
9081+
* next event.
9082+
*/
9083+
_radio.ticker_id_prepare = 0U;
9084+
9085+
goto event_connection_prepare_skip;
9086+
}
9087+
}
9088+
#endif /* CONFIG_BT_CTLR_DATA_LENGTH */
9089+
}
9090+
9091+
/* Process procedures with instants or encryption setup */
9092+
/* FIXME: Make LE Ping cacheable */
90669093
switch (conn->llcp_type) {
90679094
case LLCP_CONN_UPD:
90689095
if (!event_conn_upd_prep(conn, event_counter,

0 commit comments

Comments
 (0)