Thread (20 messages) 20 messages, 4 authors, 2023-02-13

[PATCH BlueZ 5/8] adapter: add functions indicating adapter CIS capability

flat view
STALE1333d

From: Pauli Virtanen <hidden>
Date: 2023-01-30 18:39:10
Subsystem: the rest · Maintainer: Linus Torvalds

---
 src/adapter.c | 16 ++++++++++++++++
 src/adapter.h |  3 +++
 2 files changed, 19 insertions(+)
diff --git a/src/adapter.c b/src/adapter.c
index aadad4016..4f06bce53 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -9033,6 +9033,22 @@ bool btd_adapter_ssp_enabled(struct btd_adapter *adapter)
 	return false;
 }
 
+bool btd_adapter_cis_central_capable(struct btd_adapter *adapter)
+{
+	if (adapter->current_settings & MGMT_SETTING_CIS_CENTRAL)
+		return true;
+
+	return false;
+}
+
+bool btd_adapter_cis_peripheral_capable(struct btd_adapter *adapter)
+{
+	if (adapter->current_settings & MGMT_SETTING_CIS_PERIPHERAL)
+		return true;
+
+	return false;
+}
+
 void btd_adapter_set_oob_handler(struct btd_adapter *adapter,
 						struct oob_handler *handler)
 {
diff --git a/src/adapter.h b/src/adapter.h
index 78eb069ae..3fcee30bc 100644
--- a/src/adapter.h
+++ b/src/adapter.h
@@ -226,6 +226,9 @@ void btd_adapter_gatt_server_stop(struct btd_adapter *adapter);
 
 bool btd_adapter_ssp_enabled(struct btd_adapter *adapter);
 
+bool btd_adapter_cis_central_capable(struct btd_adapter *adapter);
+bool btd_adapter_cis_peripheral_capable(struct btd_adapter *adapter);
+
 int adapter_connect_list_add(struct btd_adapter *adapter,
 					struct btd_device *device);
 void adapter_connect_list_remove(struct btd_adapter *adapter,
-- 
2.39.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help