Skip to content

Commit 0b27981

Browse files
cvinayakaescolar
authored andcommitted
Bluetooth: Controller: Do not disconnect all CIS on MIC failure
Fix implementation to not disconnect all CIS when one connection has MIC failure. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 25a3977 commit 0b27981

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

subsys/bluetooth/controller/ll_sw/ull_conn_iso.c

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -349,11 +349,18 @@ void ull_conn_iso_done(struct node_rx_event_done *done)
349349

350350
if (cis->lll.active && cis->lll.handle != LLL_HANDLE_INVALID) {
351351
/* CIS was setup and is now expected to be going */
352-
if (done->extra.mic_state == LLL_CONN_MIC_FAIL) {
353-
/* MIC failure - stop CIS and defer cleanup to after teardown. */
354-
ull_conn_iso_cis_stop(cis, NULL, BT_HCI_ERR_TERM_DUE_TO_MIC_FAIL);
355-
} else if (!(done->extra.trx_performed_bitmask &
356-
(1U << LL_CIS_IDX_FROM_HANDLE(cis->lll.handle)))) {
352+
if (done->extra.trx_performed_bitmask &
353+
(1U << LL_CIS_IDX_FROM_HANDLE(cis->lll.handle))) {
354+
if (done->extra.mic_state == LLL_CONN_MIC_FAIL) {
355+
/* MIC failure - stop CIS and defer cleanup to after
356+
* teardown.
357+
*/
358+
ull_conn_iso_cis_stop(cis, NULL,
359+
BT_HCI_ERR_TERM_DUE_TO_MIC_FAIL);
360+
} else {
361+
cis->event_expire = 0U;
362+
}
363+
} else {
357364
/* We did NOT have successful transaction on established CIS,
358365
* or CIS was not yet established, so handle timeout
359366
*/
@@ -381,8 +388,6 @@ void ull_conn_iso_done(struct node_rx_event_done *done)
381388
BT_HCI_ERR_CONN_FAIL_TO_ESTAB);
382389

383390
}
384-
} else {
385-
cis->event_expire = 0U;
386391
}
387392
}
388393
}

0 commit comments

Comments
 (0)