Skip to contentSkip to conversation

Bluetooth: Add support for Add/Remove Device management commands

PATCH Superseded Marcel Holtmann 1 participant 1 message Jun 29, 2014

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/1 Bluetooth: Add support for Add/Remove Device management commands

This allows adding or removing devices from the background scanning list the kernel maintains. Device flagged for auto-connection will be automatically connected if they are found.

The passive scanning required for auto-connection will be started and stopped on demand.

---
 include/net/bluetooth/mgmt.h |  13 ++++++
 net/bluetooth/mgmt.c         | 100 ++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 112 insertions(+), 1 deletion(-)
include/net/bluetooth/mgmt.h +13 -0
index 3109dec13409..bc9b105f2b50 100644
@@ -436,6 +436,19 @@ struct mgmt_rp_get_clock_info {
 	__le16  accuracy;
 } __packed;
 
+#define MGMT_OP_ADD_DEVICE		0x0033
+struct mgmt_cp_add_device {
+	struct mgmt_addr_info addr;
+	__u8	action;
+} __packed;
+#define MGMT_ADD_DEVICE_SIZE		(MGMT_ADDR_INFO_SIZE + 1)
+
+#define MGMT_OP_REMOVE_DEVICE		0x0034
+struct mgmt_cp_remove_device {
+	struct mgmt_addr_info addr;
+} __packed;
+#define MGMT_REMOVE_DEVICE_SIZE		MGMT_ADDR_INFO_SIZE
+
 #define MGMT_EV_CMD_COMPLETE		0x0001
 struct mgmt_ev_cmd_complete {
 	__le16	opcode;
net/bluetooth/mgmt.c +99 -1

120 lines not on this page · raw message

Signature · 1 line
1.9.3