Bluetooth: controller: fix CIS REQ event generation and rejection

Check LE event mask state as well as host controlled feature mask state
and reject CIS request accordingly.
Release pre-allocated ISO resources on rejection of request

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
This commit is contained in:
Erik Brockhoff 2022-10-05 14:18:25 +02:00 committed by Fabio Baltieri
commit 6b324122e7
5 changed files with 45 additions and 9 deletions

View file

@ -463,6 +463,8 @@ static void rp_cc_state_wait_reply(struct ll_conn *conn, struct proc_ctx *ctx, u
ctx->data.cis_create.error = BT_HCI_ERR_CONN_ACCEPT_TIMEOUT;
/* If timeout is hit, fall through and reject */
case RP_CC_EVT_CIS_REQ_REJECT:
/* CIS Request is rejected, so clean up CIG/CIS acquisitions */
ull_peripheral_iso_release(ctx->data.cis_create.cis_handle);
/* Continue procedure in next prepare run */
ctx->state = RP_CC_STATE_WAIT_TX_REJECT_IND;
break;