diff mbox series

[v1] Bluetooth: hci_core: Fix hci_conn_hash_lookup_cis

Message ID 20231208222843.70028-1-luiz.dentz@gmail.com
State New
Headers show
Series [v1] Bluetooth: hci_core: Fix hci_conn_hash_lookup_cis | expand

Commit Message

Luiz Augusto von Dentz Dec. 8, 2023, 10:28 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

hci_conn_hash_lookup_cis shall always match the requested CIG and CIS
ids even when they are unset as otherwise it result in not being able
to bind/connect different sockets to the same address as that would
result in having multiple sockets mapping to the same hci_conn which
doesn't really work and prevents BAP audio configuration such as
AC 6(i) when CIG and CIS are left unset.

Fixes: c14516faede3 ("Bluetooth: hci_conn: Fix not matching by CIS ID")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
 include/net/bluetooth/hci_core.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

patchwork-bot+bluetooth@kernel.org Dec. 12, 2023, 4:20 p.m. UTC | #1
Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Fri,  8 Dec 2023 17:28:43 -0500 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> hci_conn_hash_lookup_cis shall always match the requested CIG and CIS
> ids even when they are unset as otherwise it result in not being able
> to bind/connect different sockets to the same address as that would
> result in having multiple sockets mapping to the same hci_conn which
> doesn't really work and prevents BAP audio configuration such as
> AC 6(i) when CIG and CIS are left unset.
> 
> [...]

Here is the summary with links:
  - [v1] Bluetooth: hci_core: Fix hci_conn_hash_lookup_cis
    https://git.kernel.org/bluetooth/bluetooth-next/c/ce168429c3b6

You are awesome, thank you!
diff mbox series

Patch

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 0c1754f416bd..59105a3eaa16 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -1225,11 +1225,11 @@  static inline struct hci_conn *hci_conn_hash_lookup_cis(struct hci_dev *hdev,
 			continue;
 
 		/* Match CIG ID if set */
-		if (cig != BT_ISO_QOS_CIG_UNSET && cig != c->iso_qos.ucast.cig)
+		if (cig != c->iso_qos.ucast.cig)
 			continue;
 
 		/* Match CIS ID if set */
-		if (id != BT_ISO_QOS_CIS_UNSET && id != c->iso_qos.ucast.cis)
+		if (id != c->iso_qos.ucast.cis)
 			continue;
 
 		/* Match destination address if set */