Skip to content

Commit

Permalink
[nrf fromtree] Bluetooth: ISO: Fix CIS peripheral disconnection durin…
Browse files Browse the repository at this point in the history
…g setup

When the central aborts the CIS setup during the CIS Creation
procedure after it has accepted the CIS request, the peripheral
will receive the HCI LE CIS Established event with an error code.
It does not receive a disconnection event.
See the message sequence chart in Core_v5.4, Vol 6, Part D,
Section 6.23.

This commit ensures that the perirpheral disconnected callback gets
called for this particular scenario.

Signed-off-by: Rubin Gerritsen <[email protected]>
(cherry picked from commit db58810)
  • Loading branch information
rugeGerritsen authored and nordicjm committed Jan 22, 2024
1 parent a8136cb commit d142e4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion subsys/bluetooth/host/iso.c
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,8 @@ void hci_le_cis_established(struct net_buf *buf)
bt_conn_set_state(iso, BT_CONN_CONNECTED);
bt_conn_unref(iso);
return;
} else if (evt->status != BT_HCI_ERR_OP_CANCELLED_BY_HOST) {
} else if (iso->role == BT_HCI_ROLE_PERIPHERAL ||
evt->status != BT_HCI_ERR_OP_CANCELLED_BY_HOST) {
iso->err = evt->status;
bt_iso_disconnected(iso);
} /* else we wait for disconnect event */
Expand Down

0 comments on commit d142e4b

Please sign in to comment.