This patchset fixes a few issues with emission of HCI Remove CIG, Set CIG Parameters, Create CIS when multiple ISO sockets in the same CIG are closed and reconnected rapidly. v2: Dropped patches that added error checking in hci_le_set_cig_params, TBD separately later. Returning errors there triggers some race condition in the emulator when it's cleaning up the connections, which needs some more looking. Simplified the Set CIG Parameters event parsing. The patches here now are enough to make the test suite pass, and enough to fix the race conditions encountered in BlueZ ISO ops. Pauli Virtanen (4): Bluetooth: ISO: use hci_sync for setting CIG parameters Bluetooth: ISO: don't try to remove CIG if there are bound CIS left Bluetooth: ISO: use correct CIS order in Set CIG Parameters event Bluetooth: ISO: do not emit new LE Create CIS if previous is pending include/net/bluetooth/hci_core.h | 4 +- include/net/bluetooth/hci_sync.h | 2 +- net/bluetooth/hci_conn.c | 123 ++++++++++++++++++------------- net/bluetooth/hci_event.c | 72 +++++++++++++----- net/bluetooth/hci_sync.c | 90 +++++++++++++++------- net/bluetooth/iso.c | 2 +- 6 files changed, 193 insertions(+), 100 deletions(-) -- 2.40.1