Bluetooth: hci_conn: avoid checking uninitialized CIG/CIS ids
authorPauli Virtanen <pav@iki.fi>
Sat, 5 Aug 2023 16:08:42 +0000 (19:08 +0300)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 11 Aug 2023 18:57:54 +0000 (11:57 -0700)
commitb5793de3cfaefef34a1fc9305c9fe3dbcd0ac792
tree89635a48945dbb254aaf079e44e896dfa9e3c6e8
parent66dee21524d9ac6461ec3052652b7bc0603ee0c5
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>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_conn.c