summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2023-04-11 16:02:22 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-06-14 11:16:46 +0200
commitf72fc94a17d45be98aecfd59c39b5b24a6a342e2 (patch)
treee8c1a934723a1690a3aacec354af7bf3308425ca /include
parentdbea8c26517d863430d66aa95ed09290560a6830 (diff)
downloadlinux-stable-f72fc94a17d45be98aecfd59c39b5b24a6a342e2.tar.gz
linux-stable-f72fc94a17d45be98aecfd59c39b5b24a6a342e2.tar.bz2
linux-stable-f72fc94a17d45be98aecfd59c39b5b24a6a342e2.zip
Bluetooth: hci_conn: Add support for linking multiple hcon
[ Upstream commit 06149746e7203d5ffe2d6faf9799ee36203aa8b8 ] Since it is required for some configurations to have multiple CIS with the same peer which is now covered by iso-tester in the following test cases: ISO AC 6(i) - Success ISO AC 7(i) - Success ISO AC 8(i) - Success ISO AC 9(i) - Success ISO AC 11(i) - Success Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Stable-dep-of: 71e9588435c3 ("Bluetooth: ISO: use correct CIS order in Set CIG Parameters event") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/bluetooth/hci_core.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index b973ecb222f6..9361e75b9299 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -766,7 +766,10 @@ struct hci_conn {
void *iso_data;
struct amp_mgr *amp_mgr;
- struct hci_conn *link;
+ struct list_head link_list;
+ struct hci_conn *parent;
+ struct hci_link *link;
+
struct bt_codec codec;
void (*connect_cfm_cb) (struct hci_conn *conn, u8 status);
@@ -776,6 +779,11 @@ struct hci_conn {
void (*cleanup)(struct hci_conn *conn);
};
+struct hci_link {
+ struct list_head list;
+ struct hci_conn *conn;
+};
+
struct hci_chan {
struct list_head list;
__u16 handle;
@@ -1379,12 +1387,14 @@ static inline void hci_conn_put(struct hci_conn *conn)
put_device(&conn->dev);
}
-static inline void hci_conn_hold(struct hci_conn *conn)
+static inline struct hci_conn *hci_conn_hold(struct hci_conn *conn)
{
BT_DBG("hcon %p orig refcnt %d", conn, atomic_read(&conn->refcnt));
atomic_inc(&conn->refcnt);
cancel_delayed_work(&conn->disc_work);
+
+ return conn;
}
static inline void hci_conn_drop(struct hci_conn *conn)