Bluetooth: controller: fixup to peripheral CIS CREATE procedure

Missing decode of conn_event_count on CIS_IND
Peripheral Suggest update to conn_event_count in case of a delayed
CIS_IND, allowing CIS peripheral more time to setup

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
This commit is contained in:
Erik Brockhoff 2022-08-25 16:58:16 +02:00 committed by Carles Cufí
commit 9b553c3eb2
3 changed files with 14 additions and 0 deletions

View file

@ -154,6 +154,9 @@ static void llcp_rp_cc_tx_rsp(struct ll_conn *conn, struct proc_ctx *ctx)
pdu = (struct pdu_data *)tx->pdu;
ctx->data.cis_create.conn_event_count = MAX(ctx->data.cis_create.conn_event_count,
cc_event_counter(conn) + 2);
llcp_pdu_encode_cis_rsp(ctx, pdu);
ctx->tx_opcode = pdu->llctrl.opcode;
@ -368,6 +371,7 @@ static void rp_cc_state_wait_rx_cis_ind(struct ll_conn *conn, struct proc_ctx *c
switch (evt) {
case RP_CC_EVT_CIS_IND:
llcp_pdu_decode_cis_ind(ctx, pdu);
if (!ull_peripheral_iso_setup(&pdu->llctrl.cis_ind, ctx->data.cis_create.cig_id,
ctx->data.cis_create.cis_handle)) {