All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Bluetooth: ISO: Match QoS adv handle with BIG handle
@ 2023-10-03 14:37 Iulia Tanasescu
  2023-10-03 14:37 ` [PATCH 1/1] " Iulia Tanasescu
  2023-10-03 17:10 ` [PATCH 0/1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 5+ messages in thread
From: Iulia Tanasescu @ 2023-10-03 14:37 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: claudia.rosu, mihai-octavian.urzica, silviu.barbulescu,
	vlad.pruteanu, andrei.istodorescu, luiz.dentz, Iulia Tanasescu

Currently, if the user wants to bind multiple broadcast sockets to the
same BIG handle, the BIG and BIS fields of the QoS structs must be set
and identical for all sockets.

It means that the user must remember both the BIG handle and the
associated advertising handle that the BIG will be opened for.
This information is redundant, since one BIG handle may only be
associated with an unique adv handle.

This patch makes it possible for the user to only provide a desired
BIG handle and leave the advertising handle as unset - in this case,
the kernel should allocate an unused adv handle for the first opened
socket and then be able to match it for all other sockets that will
be later bound for the same BIG.

Iulia Tanasescu (1):
  Bluetooth: ISO: Match QoS adv handle with BIG handle

 net/bluetooth/hci_conn.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)


base-commit: 091e25d6b54992d1d702ae91cbac139d4c243251
-- 
2.39.2


^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH 1/1] Bluetooth: ISO: Match QoS adv handle with BIG handle
@ 2023-09-29 15:37 Iulia Tanasescu
  2023-09-29 16:39 ` bluez.test.bot
  0 siblings, 1 reply; 5+ messages in thread
From: Iulia Tanasescu @ 2023-09-29 15:37 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: claudia.rosu, mihai-octavian.urzica, silviu.barbulescu,
	vlad.pruteanu, andrei.istodorescu, luiz.dentz, Iulia Tanasescu

In case the user binds multiple sockets for the same BIG, the BIG
handle should be matched with the associated adv handle, if it has
already been allocated previously.

Signed-off-by: Iulia Tanasescu <iulia.tanasescu@nxp.com>
---
 net/bluetooth/hci_conn.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index e62a5f368a51..7890ec449a7b 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -1494,6 +1494,18 @@ static int qos_set_bis(struct hci_dev *hdev, struct bt_iso_qos *qos)
 
 	/* Allocate BIS if not set */
 	if (qos->bcast.bis == BT_ISO_QOS_BIS_UNSET) {
+		if (qos->bcast.big != BT_ISO_QOS_BIG_UNSET) {
+			conn = hci_conn_hash_lookup_big(hdev, qos->bcast.big);
+
+			if (conn) {
+				/* If the BIG handle is already matched to an advertising
+				 * handle, do not allocate a new one.
+				 */
+				qos->bcast.bis = conn->iso_qos.bcast.bis;
+				return 0;
+			}
+		}
+
 		/* Find an unused adv set to advertise BIS, skip instance 0x00
 		 * since it is reserved as general purpose set.
 		 */
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-10-03 17:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-03 14:37 [PATCH 0/1] Bluetooth: ISO: Match QoS adv handle with BIG handle Iulia Tanasescu
2023-10-03 14:37 ` [PATCH 1/1] " Iulia Tanasescu
2023-10-03 15:42   ` bluez.test.bot
2023-10-03 17:10 ` [PATCH 0/1] " patchwork-bot+bluetooth
  -- strict thread matches above, loose matches on Subject: below --
2023-09-29 15:37 [PATCH 1/1] " Iulia Tanasescu
2023-09-29 16:39 ` bluez.test.bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.