Bluetooth: hci_sync: delete CIS in BT_OPEN/CONNECT/BOUND when aborting
authorPauli Virtanen <pav@iki.fi>
Wed, 26 Jul 2023 21:25:25 +0000 (00:25 +0300)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 11 Aug 2023 18:52:51 +0000 (11:52 -0700)
commit2889bdd0a9a195533c2103e7b39ab0de844d72f6
treea185dbf13c71003c6efdc968fe291cff49d65b3e
parent69997d50ec574be816b4ee8f9cee52ebbd53f8bd
Bluetooth: hci_sync: delete CIS in BT_OPEN/CONNECT/BOUND when aborting

Dropped CIS that are in state BT_OPEN/BT_BOUND, and in state BT_CONNECT
with HCI_CONN_CREATE_CIS unset, should be cleaned up immediately.
Closing CIS ISO sockets should result to the hci_conn be deleted, so
that potentially pending CIG removal can run.

hci_abort_conn cannot refer to them by handle, since their handle is
still unset if Set CIG Parameters has not yet completed.

This fixes CIS not being terminated if the socket is shut down
immediately after connection, so that the hci_abort_conn runs before Set
CIG Parameters completes. See new BlueZ test "ISO Connect Close - Success"

Signed-off-by: Pauli Virtanen <pav@iki.fi>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/hci_sync.c