Diff between 0ab3242f26d6c3dda80cf0b162d65f138613a2ed and e01b3ba863ee4b6a3a290366ff4c916a378eb661

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 fd7d46c..b869b02 100644
--- a/monitor/bt.h
+++ b/monitor/bt.h
@@ -126,6 +126,11 @@ struct bt_lmp_not_accepted {
 
 #define BT_LMP_CLKOFFSET_REQ		5
 
+#define BT_LMP_CLKOFFSET_RSP		6
+struct bt_lmp_clkoffset_rsp {
+	uint16_t offset;
+} __attribute__ ((packed));
+
 #define BT_LMP_DETACH			7
 struct bt_lmp_detach {
 	uint8_t  error;
diff --git a/monitor/lmp.c b/monitor/lmp.c
index 93ff08a..d246776 100644
--- a/monitor/lmp.c
+++ b/monitor/lmp.c
@@ -94,6 +94,13 @@ static void clkoffset_req(const void *data, uint8_t size)
 {
 }
 
+static void clkoffset_rsp(const void *data, uint8_t size)
+{
+	const struct bt_lmp_clkoffset_rsp *pdu = data;
+
+	print_field("Clock offset: 0x%4.4x", le16_to_cpu(pdu->offset));
+}
+
 static void detach(const void *data, uint8_t size)
 {
 	const struct bt_lmp_detach *pdu = data;
@@ -727,7 +734,7 @@ static const struct lmp_data lmp_table[] = {
 	{  3, "LMP_accepted", accepted, 1, true },
 	{  4, "LMP_not_accepted", not_accepted, 2, true },
 	{  5, "LMP_clkoffset_req", clkoffset_req, 0, true },
-	{  6, "LMP_clkoffset_res" },
+	{  6, "LMP_clkoffset_res", clkoffset_rsp, 2, true },
 	{  7, "LMP_detach", detach, 1, true },
 	{  8, "LMP_in_rand" },
 	{  9, "LMP_comb_key" },