diff mbox series

[1/1] Bluetooth: ISO: Match QoS adv handle with BIG handle

Message ID 20231003143739.2925-2-iulia.tanasescu@nxp.com
State Accepted
Commit b86501e0c3b4354120527770846cdd1531a7f7d9
Headers show
Series Bluetooth: ISO: Match QoS adv handle with BIG handle | expand

Commit Message

Iulia Tanasescu Oct. 3, 2023, 2:37 p.m. UTC
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(+)

Comments

bluez.test.bot@gmail.com Oct. 3, 2023, 3:42 p.m. UTC | #1
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
diff mbox series

Patch

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.
 		 */