Bluetooth: hci_conn: Fix CIS connection dst_type handling
authorPauli Virtanen <pav@iki.fi>
Tue, 11 Oct 2022 19:25:33 +0000 (22:25 +0300)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 2 Nov 2022 21:15:33 +0000 (14:15 -0700)
commitb36a234dc438cb6b76fc929a8df9a0e59c8acf23
tree3c05bae196304c61488e02f684e644f008a70439
parent3aff8aaca4e36dc8b17eaa011684881a80238966
Bluetooth: hci_conn: Fix CIS connection dst_type handling

hci_connect_cis and iso_connect_cis call hci_bind_cis inconsistently
with dst_type being either ISO socket address type or the HCI type, but
these values cannot be mixed like this. Fix this by using only the HCI
type.

CIS connection dst_type was also not initialized in hci_bind_cis, even
though it is used in hci_conn_hash_lookup_cis to find existing
connections.  Set the value in hci_bind_cis, so that existing CIS
connections are found e.g. when doing deferred socket connections, also
when dst_type is not 0 (ADDR_LE_DEV_PUBLIC).

Fixes: 26afbd826ee3 ("Bluetooth: Add initial implementation of CIS connections")
Signed-off-by: Pauli Virtanen <pav@iki.fi>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/hci_conn.c
net/bluetooth/iso.c