[PATCH 3/4] android/gatt: Expose function to set security on GATT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 android/gatt.c | 10 ++++++++++
 android/gatt.h |  2 ++
 2 files changed, 12 insertions(+)

diff --git a/android/gatt.c b/android/gatt.c
index 7061924..9471eaf 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -6286,3 +6286,13 @@ bool bt_gatt_disconnect_app(unsigned int id, const bdaddr_t *addr)
 
 	return true;
 }
+
+void bt_gatt_set_security(const bdaddr_t *addr, int sec_level)
+{
+	struct gatt_device *dev = find_device_by_addr(addr);
+
+	if (!dev)
+		return;
+
+	set_security_level(dev, sec_level);
+}
diff --git a/android/gatt.h b/android/gatt.h
index 5ba9161..d4f8a8e 100644
--- a/android/gatt.h
+++ b/android/gatt.h
@@ -38,3 +38,5 @@ bool bt_gatt_unregister_app(unsigned int id);
 
 bool bt_gatt_connect_app(unsigned int id, const bdaddr_t *addr);
 bool bt_gatt_disconnect_app(unsigned int id, const bdaddr_t *addr);
+
+void bt_gatt_set_security(const bdaddr_t *addr, int sec_level);
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux