Skip to content

Commit eee10e9

Browse files
cvinayakjhedberg
authored andcommitted
Bluetooth: controller: split: Fix DLE duplicate requests
Fix implementation to handle back-to-back and duplicate LENGTH_REQ PDU reception. Relates to #23707. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent b7e7153 commit eee10e9

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

subsys/bluetooth/controller/ll_sw/ull_conn.c

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4666,9 +4666,20 @@ static inline int length_req_rsp_recv(struct ll_conn *conn, memq_link_t *link,
46664666
#endif /* CONFIG_BT_CTLR_PHY */
46674667
}
46684668
} else {
4669-
/* Drop response with no Local initiated request. */
4670-
LL_ASSERT(pdu_rx->llctrl.opcode ==
4671-
PDU_DATA_LLCTRL_TYPE_LENGTH_RSP);
4669+
/* Drop response with no Local initiated request and duplicate
4670+
* requests.
4671+
*/
4672+
if (pdu_rx->llctrl.opcode != PDU_DATA_LLCTRL_TYPE_LENGTH_RSP) {
4673+
mem_release(tx, &mem_conn_tx_ctrl.free);
4674+
4675+
/* Defer new request if previous in resize state */
4676+
if (conn->llcp_length.state ==
4677+
LLCP_LENGTH_STATE_RESIZE) {
4678+
return -EBUSY;
4679+
}
4680+
}
4681+
4682+
return 0;
46724683
}
46734684

46744685
send_length_resp:

0 commit comments

Comments
 (0)