monitor: Decode LL_CLOCK_ACCURACY_*
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 27 Feb 2019 11:19:11 +0000 (13:19 +0200)
committerhimanshu <h.himanshu@samsung.com>
Tue, 11 Feb 2020 08:57:47 +0000 (14:27 +0530)
This introduces the command passing for LL_CLOCK_ACCURACY_* PDUs added
in 5.1.

Change-Id: I1ea4b2c13c60ffc842ae50fbc5c55830a0603e35
Signed-off-by: himanshu <h.himanshu@samsung.com>
monitor/bt.h
monitor/ll.c

index 3b2af74..af17c1f 100755 (executable)
@@ -168,6 +168,13 @@ struct bt_ll_periodic_sync_ind {
        uint16_t sync_counter;
 } __attribute__ ((packed));
 
+#define BT_LL_CLOCK_ACCURACY_REQ 0x1d
+struct bt_ll_clock_acc {
+       uint8_t  sca;
+} __attribute__ ((packed));
+
+#define BT_LL_CLOCK_ACCURACY_RSP 0x1e
+
 #define LMP_ESC4(x) ((127 << 8) | (x))
 
 #define BT_LMP_NAME_REQ                        1
index 2378218..1073f78 100755 (executable)
@@ -593,6 +593,13 @@ static void periodic_sync_ind(const void *data, uint8_t size)
        print_field("syncConnEventCount: 0x%4.4x", pdu->sync_counter);
 }
 
+static void clock_acc_req_rsp(const void *data, uint8_t size)
+{
+       const struct bt_ll_clock_acc *pdu = data;
+
+       print_field("SCA: 0x%2.2x", pdu->sca);
+}
+
 struct llcp_data {
        uint8_t opcode;
        const char *str;
@@ -631,6 +638,8 @@ static const struct llcp_data llcp_table[] = {
        { 0x1a, "LL_CTE_REQ",               cte_req,            1, true },
        { 0x1b, "LL_CTE_RSP",               null_pdu,           0, true },
        { 0x1c, "LL_PERIODIC_SYNC_IND",     periodic_sync_ind, 34, true },
+       { 0x1d, "LL_CLOCK_ACCURACY_REQ",    clock_acc_req_rsp,  1, true },
+       { 0x1e, "LL_CLOCK_ACCURACY_RSP",    clock_acc_req_rsp,  1, true },
        { }
 };