Diff between c2d728f6e8795adb6a5104373e480790829c3523 and 99fda38355e94f7be50c3a2652b5e4c9bd8c9755

Changed Files

File Additions Deletions Status
monitor/bt.h +6 -0 modified
monitor/lmp.c +9 -1 modified

Full Patch

diff --git a/monitor/bt.h b/monitor/bt.h
index d06101f..63a0443 100644
--- a/monitor/bt.h
+++ b/monitor/bt.h
@@ -219,6 +219,12 @@ struct bt_lmp_timing_accuracy_res {
 
 #define BT_LMP_HOST_CONNECTION_REQ	51
 
+#define BT_LMP_SLOT_OFFSET		52
+struct bt_lmp_slot_offset {
+	uint16_t offset;
+	uint8_t  bdaddr[6];
+} __attribute__ ((packed));
+
 #define BT_LMP_PAGE_SCAN_MODE_REQ	54
 struct bt_lmp_page_scan_mode_req {
 	uint8_t  scheme;
diff --git a/monitor/lmp.c b/monitor/lmp.c
index bbb7a06..6e8070b 100644
--- a/monitor/lmp.c
+++ b/monitor/lmp.c
@@ -303,6 +303,14 @@ static void host_connection_req(const void *data, uint8_t size)
 {
 }
 
+static void slot_offset(const void *data, uint8_t size)
+{
+	const struct bt_lmp_slot_offset *pdu = data;
+
+	print_field("Offset: %u usec", le16_to_cpu(pdu->offset));
+	packet_print_addr("Address", pdu->bdaddr, false);
+}
+
 static void page_scan_mode_req(const void *data, uint8_t size)
 {
 	const struct bt_lmp_page_scan_mode_req *pdu = data;
@@ -758,7 +766,7 @@ static const struct lmp_data lmp_table[] = {
 	{ 49, "LMP_setup_complete", setup_complete, 0, true },
 	{ 50, "LMP_use_semi_permanent_key", use_semi_permanent_key, 0, true },
 	{ 51, "LMP_host_connection_req", host_connection_req, 0, true },
-	{ 52, "LMP_slot_offset" },
+	{ 52, "LMP_slot_offset", slot_offset, 8, true },
 	{ 53, "LMP_page_mode_req" },
 	{ 54, "LMP_page_scan_mode_req", page_scan_mode_req, 2, true },
 	{ 55, "LMP_supervision_timeout" },