Bluetooth: controller: Fix missing CIS disconnect on MIC failure

Disconnect CIS immediately if event done extra status indicates MIC
failure. Return reason BT_HCI_ERR_TERM_DUE_TO_MIC_FAIL.

Fixes EBQ test /LL/CIS/PER/BV-27-C.

Signed-off-by: Morten Priess <mtpr@oticon.com>
This commit is contained in:
Morten Priess 2022-09-29 15:42:31 +02:00 committed by Fabio Baltieri
commit 90d0d93a9c

View file

@ -314,7 +314,10 @@ void ull_conn_iso_done(struct node_rx_event_done *done)
if (cis->lll.handle != LLL_HANDLE_INVALID) { if (cis->lll.handle != LLL_HANDLE_INVALID) {
/* CIS was setup and is now expected to be going */ /* CIS was setup and is now expected to be going */
if (!(done->extra.trx_performed_mask & if (done->extra.mic_state == LLL_CONN_MIC_FAIL) {
/* MIC failure - stop CIS and defer cleanup to after teardown. */
ull_conn_iso_cis_stop(cis, NULL, BT_HCI_ERR_TERM_DUE_TO_MIC_FAIL);
} else if (!(done->extra.trx_performed_mask &
(1U << LL_CIS_IDX_FROM_HANDLE(cis->lll.handle)))) { (1U << LL_CIS_IDX_FROM_HANDLE(cis->lll.handle)))) {
/* We did NOT have successful transaction on established CIS, /* We did NOT have successful transaction on established CIS,
* or CIS was not yet established, so handle timeout * or CIS was not yet established, so handle timeout