Skip to contentSkip to conversation

Bluetooth: Add discovering event to the Management interface

PATCH In review [email protected] 1 participant 1 message Apr 19, 2011 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 1303248926-16607-1-git-send-email-y

#1 lore raw

PATCH 2/2 Bluetooth: Add discovering event to the Management interface

From: Johan Hedberg <[email protected]>

This patch adds a new event to the Management interface to track when local adapters are discovering remote devices. For now this only tracks BR/EDR discovery procedures.

---
 include/net/bluetooth/hci_core.h |    1 +
 include/net/bluetooth/mgmt.h     |    2 +
 net/bluetooth/hci_event.c        |   44 +++++++++++++++++++++++++++++++++++--
 net/bluetooth/mgmt.c             |    6 +++++
 4 files changed, 50 insertions(+), 3 deletions(-)
include/net/bluetooth/hci_core.h +1 -0
index 4093133..69967e5 100644
@@ -790,6 +790,7 @@ int mgmt_read_local_oob_data_reply_complete(u16 index, u8 *hash, u8 *randomizer,
 int mgmt_device_found(u16 index, bdaddr_t *bdaddr, u8 *dev_class, s8 rssi,
 								u8 *eir);
 int mgmt_remote_name(u16 index, bdaddr_t *bdaddr, u8 *name);
+int mgmt_discovering(u16 index, u8 discovering);
 
 /* HCI info for socket */
 #define hci_pi(sk) ((struct hci_pinfo *) sk)
include/net/bluetooth/mgmt.h +2 -0
index be93dd0..7434406 100644
@@ -285,3 +285,5 @@ struct mgmt_ev_remote_name {
 	bdaddr_t bdaddr;
 	__u8 name[MGMT_MAX_NAME_LENGTH];
 } __packed;
+
+#define MGMT_EV_DISCOVERING		0x0014
net/bluetooth/hci_event.c +41 -3

87 lines not on this page · raw message

net/bluetooth/mgmt.c +6 -0
index 958544a..f623b8a 100644
@@ -2150,3 +2150,9 @@ int mgmt_remote_name(u16 index, bdaddr_t *bdaddr, u8 *name)
 	return mgmt_event(MGMT_EV_REMOTE_NAME, index, &ev, sizeof(ev), NULL);
 }
 
+int mgmt_discovering(u16 index, u8 discovering)
+{
+	return mgmt_event(MGMT_EV_DISCOVERING, index, &discovering,
+						sizeof(discovering), NULL);
+}
+
Signature · 1 line
1.7.1