Skip to contentSkip to conversation

Bluetooth: Add support for reading security information

PATCH In review Marcel Holtmann 1 participant 1 message Apr 3, 2020

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 8/10 Bluetooth: Add support for reading security information

To allow userspace to make correcty security policy decision, the kernel needs to export a few details of the supported security features and encryption key size information. This command exports this information and also allows future extensions if needed.

---
 include/net/bluetooth/mgmt.h |  7 +++++
 net/bluetooth/mgmt.c         | 53 ++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+)
include/net/bluetooth/mgmt.h +7 -0
index f41cd87550dc..65dd6fd1fff3 100644
@@ -674,6 +674,13 @@ struct mgmt_cp_set_blocked_keys {
 
 #define MGMT_OP_SET_WIDEBAND_SPEECH	0x0047
 
+#define MGMT_OP_READ_SECURITY_INFO	0x0048
+#define MGMT_READ_SECURITY_INFO_SIZE	0
+struct mgmt_rp_read_security_info {
+	__le16   sec_len;
+	__u8     sec[0];
+} __packed;
+
 #define MGMT_EV_CMD_COMPLETE		0x0001
 struct mgmt_ev_cmd_complete {
 	__le16	opcode;
net/bluetooth/mgmt.c +53 -0

77 lines not on this page · raw message

Signature · 1 line
2.25.1