2023-10-03 14:37:55

by Iulia Tanasescu

[permalink] [raw]
Subject: [PATCH 0/1] Bluetooth: ISO: Match QoS adv handle with BIG handle

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


2023-10-03 14:37:56

by Iulia Tanasescu

[permalink] [raw]
Subject: [PATCH 1/1] Bluetooth: ISO: Match QoS adv handle with BIG handle

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 <[email protected]>
---
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

2023-10-03 15:42:30

by bluez.test.bot

[permalink] [raw]
Subject: RE: Bluetooth: ISO: Match QoS adv handle with BIG handle

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=789623

---Test result---

Test Summary:
CheckPatch PASS 0.64 seconds
GitLint PASS 0.26 seconds
SubjectPrefix PASS 0.07 seconds
BuildKernel PASS 41.21 seconds
CheckAllWarning PASS 44.77 seconds
CheckSparse PASS 51.08 seconds
CheckSmatch PASS 135.75 seconds
BuildKernel32 PASS 40.17 seconds
TestRunnerSetup PASS 602.36 seconds
TestRunner_l2cap-tester PASS 36.77 seconds
TestRunner_iso-tester PASS 61.80 seconds
TestRunner_bnep-tester PASS 13.83 seconds
TestRunner_mgmt-tester PASS 252.90 seconds
TestRunner_rfcomm-tester PASS 19.04 seconds
TestRunner_sco-tester PASS 22.40 seconds
TestRunner_ioctl-tester PASS 21.64 seconds
TestRunner_mesh-tester PASS 15.99 seconds
TestRunner_smp-tester PASS 17.23 seconds
TestRunner_userchan-tester PASS 13.50 seconds
IncrementalBuild PASS 37.36 seconds



---
Regards,
Linux Bluetooth

2023-10-03 17:10:40

by patchwork-bot+bluetooth

[permalink] [raw]
Subject: Re: [PATCH 0/1] Bluetooth: ISO: Match QoS adv handle with BIG handle

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <[email protected]>:

On Tue, 3 Oct 2023 17:37:38 +0300 you wrote:
> 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.
>
> [...]

Here is the summary with links:
- [1/1] Bluetooth: ISO: Match QoS adv handle with BIG handle
https://git.kernel.org/bluetooth/bluetooth-next/c/cffdc28aa2e2

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html