Diff between 99fda38355e94f7be50c3a2652b5e4c9bd8c9755 and 57133737a1238d26e6fce482e73800f1da4139a2

Changed Files

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

Full Patch

diff --git a/monitor/bt.h b/monitor/bt.h
index 63a0443..fd7d46c 100644
--- a/monitor/bt.h
+++ b/monitor/bt.h
@@ -158,6 +158,11 @@ struct bt_lmp_start_encryption_req {
 
 #define BT_LMP_STOP_ENCRYPTION_REQ	18
 
+#define BT_LMP_SWITCH_REQ		19
+struct bt_lmp_switch_req {
+	uint32_t instant;
+} __attribute__ ((packed));
+
 #define BT_LMP_UNSNIFF_REQ		24
 
 #define BT_LMP_MAX_POWER		33
diff --git a/monitor/lmp.c b/monitor/lmp.c
index 6e8070b..93ff08a 100644
--- a/monitor/lmp.c
+++ b/monitor/lmp.c
@@ -156,6 +156,13 @@ static void stop_encryption_req(const void *data, uint8_t size)
 {
 }
 
+static void switch_req(const void *data, uint8_t size)
+{
+	const struct bt_lmp_switch_req *pdu = data;
+
+	print_field("Instant: 0x%8.8x", le32_to_cpu(pdu->instant));
+}
+
 static void unsniff_req(const void *data, uint8_t size)
 {
 }
@@ -733,7 +740,7 @@ static const struct lmp_data lmp_table[] = {
 	{ 16, "LMP_encryption_key_size_req", encryption_key_size_req, 1, true },
 	{ 17, "LMP_start_encryption_req", start_encryption_req, 16, true },
 	{ 18, "LMP_stop_encryption_req", stop_encryption_req, 0, true },
-	{ 19, "LMP_switch_req" },
+	{ 19, "LMP_switch_req", switch_req, 4, true },
 	{ 20, "LMP_hold" },
 	{ 21, "LMP_hold_req" },
 	{ 22, "LMP_sniff" },