mbox series

[v2,0/1] Bluetooth: ISO: Notify user space about failed bis connections

Message ID 20230628150232.239778-1-iulia.tanasescu@nxp.com (mailing list archive)
Headers show
Series Bluetooth: ISO: Notify user space about failed bis connections | expand

Message

Iulia Tanasescu June 28, 2023, 3:02 p.m. UTC
This patch makes it possible for the user to be informed if BIG sync
has failed.

There are situations when certain procedures must be started in this
case, like it is, for example, when a BASS Server fails to synchronize
to a Broadcast source, as a result of a BASS Client writing the
Add Source opcode to the control point characteristic. The BASS server
should be able to detect if the sync was unsuccessful and it should
send an appropriate GATT notification to the BASS client.

Currently, only successful bis connections are notified to the user,
using the listen and accept socket procedures. This patch proposes
an implementation so that unsuccessful bis connections are also added
in the accept list of a listening socket. The connection error is
marked by setting the sk_err field and generating POLLERR on the child
socket. This way, the user can detect if an incoming connection is
successful or not.

From the previous patch version, the BT_BIG_SYNC_FAILED state has
been replaced with the HCI_CONN_BIG_SYNC_FAILED flag.

The le_bis_cleanup work has also been removed, to avoid potential
issues. Instead, failed bis connections are simply cleaned up by
removing them from the hash list and calling the bis cleanup callback.

Iulia Tanasescu (1):
  Bluetooth: ISO: Notify user space about failed bis connections

 include/net/bluetooth/hci_core.h | 25 ++++++++++++++++
 net/bluetooth/hci_conn.c         | 50 +++++++++++++++++---------------
 net/bluetooth/hci_event.c        | 21 +++++++++++---
 net/bluetooth/iso.c              | 37 ++++++++++++++++-------
 4 files changed, 95 insertions(+), 38 deletions(-)


base-commit: e63d8ed98082395ca509163f386f5b04f53872b3