Skip to contentSkip to conversation

Bluetooth: Add support for Add/Remove Device management commands

PATCH Applied Marcel Holtmann 2 participants 2 messages Jun 29, 2014

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH v2 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         | 99 +++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 111 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 +98 -1

119 lines not on this page · raw message

Signature · 1 line
1.9.3
#1 lore raw

Hi Marcel,

Quoted 4 lines · Marcel Holtmann

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.

Quoted 8 lines

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

---
 include/net/bluetooth/mgmt.h | 13 ++++++
 net/bluetooth/mgmt.c         | 99 +++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 111 insertions(+), 1 deletion(-)

Applied to bluetooth-next. Thanks.

Johan