diff options
author | Pauli Virtanen <pav@iki.fi> | 2023-08-05 18:08:42 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2023-08-11 20:57:54 +0200 |
commit | b5793de3cfaefef34a1fc9305c9fe3dbcd0ac792 (patch) | |
tree | 89635a48945dbb254aaf079e44e896dfa9e3c6e8 /net/bluetooth | |
parent | Bluetooth: hci_event: drop only unbound CIS if Set CIG Parameters fails (diff) | |
download | linux-b5793de3cfaefef34a1fc9305c9fe3dbcd0ac792.tar.xz linux-b5793de3cfaefef34a1fc9305c9fe3dbcd0ac792.zip |
Bluetooth: hci_conn: avoid checking uninitialized CIG/CIS ids
The CIS/CIG ids of ISO connections are defined only when the connection
is unicast.
Fix the lookup functions to check for unicast first. Ensure CIG/CIS
IDs have valid value also in state BT_OPEN.
Signed-off-by: Pauli Virtanen <pav@iki.fi>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_conn.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 4ad6af4e3145..234746721047 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -1866,6 +1866,8 @@ struct hci_conn *hci_bind_cis(struct hci_dev *hdev, bdaddr_t *dst, return ERR_PTR(-ENOMEM); cis->cleanup = cis_cleanup; cis->dst_type = dst_type; + cis->iso_qos.ucast.cig = BT_ISO_QOS_CIG_UNSET; + cis->iso_qos.ucast.cis = BT_ISO_QOS_CIS_UNSET; } if (cis->state == BT_CONNECTED) |