Thread (8 messages) flat view 8 messages, 4 authors, 2021-10-20
STALE1796d

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

From: Manish Mandlik <hidden>
Date: 2021-10-13 19:00:54
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds

This patch adds definition of the new Device Lost event to indicate that
the controller has stopped tracking a device.

---

Changes in v3:
- Discard changes to the Device Found event and notify bluetoothd only
  when the controller stops monitoring the device via new Device Lost
  event.

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 | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/lib/mgmt.h b/lib/mgmt.h
index 0a6349321..aaeeb297a 100644
--- a/lib/mgmt.h
+++ b/lib/mgmt.h
@@ -1014,6 +1014,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 +1158,7 @@ static const char *mgmt_ev[] = {
 	"Advertisement Monitor Removed",
 	"Controller Suspend",
 	"Controller Resume",
+	"Advertisement Monitor Device Lost",		/* 0x002f */
 };
 
 static const char *mgmt_status[] = {
-- 
2.33.0.882.g93a45727a2-goog
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help