diff mbox series

[BlueZ,v2,2/3] lib: Add definition of the Adv Monitor Device Lost event

Message ID 20211013053935.BlueZ.v2.2.Ied4afb8c4c882e573f4a23670fc060cbc3e319c9@changeid (mailing list archive)
State Superseded
Delegated to: Luiz Von Dentz
Headers show
Series Update Device Found event and add Adv Monitor Device Lost event | expand

Checks

Context Check Description
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint success Gitlint PASS

Commit Message

Manish Mandlik Oct. 13, 2021, 12:42 p.m. UTC
This patch adds a flag to the Device Found event to indicate that the
controller is tracking a device and adds definition of the new Device
Lost event to indicate that the controller has stopped tracking that
device.

---

Changes in v2:
- Instead of creating a new 'Device Tracking' event, add a flag 'Device
  Tracked' in the existing 'Device Found' event and add a new 'Device
  Lost' event to indicate that the controller has stopped tracking that
  device.

 lib/mgmt.h | 9 +++++++++
 1 file changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/lib/mgmt.h b/lib/mgmt.h
index 0a6349321..70e3d31f9 100644
--- a/lib/mgmt.h
+++ b/lib/mgmt.h
@@ -856,12 +856,14 @@  struct mgmt_ev_auth_failed {
 #define MGMT_DEV_FOUND_CONFIRM_NAME	0x01
 #define MGMT_DEV_FOUND_LEGACY_PAIRING	0x02
 #define MGMT_DEV_FOUND_NOT_CONNECTABLE	0x04
+#define MGMT_DEV_FOUND_MONITORING	0x10
 
 #define MGMT_EV_DEVICE_FOUND		0x0012
 struct mgmt_ev_device_found {
 	struct mgmt_addr_info addr;
 	int8_t rssi;
 	uint32_t flags;
+	uint16_t monitor_handle;
 	uint16_t eir_len;
 	uint8_t eir[0];
 } __packed;
@@ -1014,6 +1016,12 @@  struct mgmt_ev_controller_resume {
 	uint8_t wake_reason;
 } __packed;
 
+#define MGMT_EV_ADV_MONITOR_DEVICE_LOST		0x002f
+struct mgmt_ev_adv_monitor_device_lost {
+	uint16_t monitor_handle;
+	struct mgmt_addr_info addr;
+} __packed;
+
 static const char *mgmt_op[] = {
 	"<0x0000>",
 	"Read Version",
@@ -1152,6 +1160,7 @@  static const char *mgmt_ev[] = {
 	"Advertisement Monitor Removed",
 	"Controller Suspend",
 	"Controller Resume",
+	"Advertisement Monitor Device Lost",		/* 0x002f */
 };
 
 static const char *mgmt_status[] = {