Diff between b30b48d863cb48df6e9d3bd8e3d8a5353b1009ec and 30ca440e8697f8ecbe0e91c9910bc1b6a798d215

Changed Files

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

Full Patch

diff --git a/monitor/bt.h b/monitor/bt.h
index 46d9b28..80f514f 100644
--- a/monitor/bt.h
+++ b/monitor/bt.h
@@ -143,6 +143,12 @@ struct bt_ll_phy_update_ind {
 	uint16_t instant;
 } __attribute__ ((packed));
 
+#define BT_LL_MIN_USED_CHANNELS	0x19
+struct bt_ll_min_used_channels {
+	uint8_t  phys;
+	uint8_t  min_channels;
+} __attribute__ ((packed));
+
 #define LMP_ESC4(x) ((127 << 8) | (x))
 
 #define BT_LMP_NAME_REQ			1
diff --git a/monitor/ll.c b/monitor/ll.c
index 02ff1f6..ff75772 100644
--- a/monitor/ll.c
+++ b/monitor/ll.c
@@ -535,6 +535,21 @@ static void phy_update_ind(const void *data, uint8_t size)
 	print_field("Instant: 0x%4.4x", pdu->instant);
 }
 
+static void min_used_channels(const void *data, uint8_t size)
+{
+	const struct bt_ll_min_used_channels *pdu = data;
+	uint8_t mask;
+
+	print_field("PHYS: 0x%2.2x", pdu->phys);
+
+	mask = print_bitfield(2, pdu->phys, le_phys);
+	if (mask)
+		print_text(COLOR_UNKNOWN_OPTIONS_BIT, "  Reserved"
+							" (0x%2.2x)", mask);
+
+	print_field("MinUsedChannels: 0x%2.2x", pdu->min_channels);
+}
+
 struct llcp_data {
 	uint8_t opcode;
 	const char *str;
@@ -569,7 +584,7 @@ static const struct llcp_data llcp_table[] = {
 	{ 0x16, "LL_PHY_REQ",               phy_req_rsp,        2, true },
 	{ 0x17, "LL_PHY_RSP",               phy_req_rsp,        2, true },
 	{ 0x18, "LL_PHY_UPDATE_IND",        phy_update_ind,     4, true },
-	{ 0x19, "LL_MIN_USED_CHANNELS_IND", NULL,               2, true },
+	{ 0x19, "LL_MIN_USED_CHANNELS_IND", min_used_channels,  2, true },
 	{ }
 };