btmon: Make BIG identifier consistent
authorŁukasz Rymanowski <lukasz.rymanowski@codecoup.pl>
Fri, 21 Jul 2023 12:03:20 +0000 (14:03 +0200)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 5 Jan 2024 13:34:03 +0000 (19:04 +0530)
Bluetooth spec uses BIG Handle as a BIG identifier.
Btmon sometimes use this and sometimes BIG ID.
This patch makes code consistent

monitor/bt.h
monitor/packet.c

index 343d878..98863a6 100755 (executable)
@@ -2788,7 +2788,7 @@ struct bt_hci_bis_test {
 } __attribute__ ((packed));
 
 struct bt_hci_cmd_le_create_big_test {
-       uint8_t  big_id;
+       uint8_t  big_handle;
        uint8_t  adv_handle;
        uint8_t  num_bis;
        struct bt_hci_bis_test bis[0];
@@ -3675,7 +3675,7 @@ struct bt_hci_evt_le_big_sync_estabilished {
 
 #define BT_HCI_EVT_LE_BIG_SYNC_LOST            0x1e
 struct bt_hci_evt_le_big_sync_lost {
-       uint8_t  big_id;
+       uint8_t  big_handle;
        uint8_t  reason;
 } __attribute__ ((packed));
 
index c6f0e06..a8d7f58 100755 (executable)
@@ -8805,7 +8805,7 @@ static void le_create_big_cmd_test_cmd(uint16_t index, const void *data,
 {
        const struct bt_hci_cmd_le_create_big_test *cmd = data;
 
-       print_field("BIG ID: 0x%2.2x", cmd->big_id);
+       print_field("BIG Handle: 0x%2.2x", cmd->big_handle);
        print_field("Advertising Handle: 0x%2.2x", cmd->adv_handle);
        print_field("Number of BIS: %u", cmd->num_bis);
 
@@ -11639,7 +11639,7 @@ static void le_big_sync_lost_evt(struct timeval *tv, uint16_t index,
 {
        const struct bt_hci_evt_le_big_sync_lost *evt = data;
 
-       print_field("BIG ID: 0x%2.2x", evt->big_id);
+       print_field("BIG Handle: 0x%2.2x", evt->big_handle);
        print_reason(evt->reason);
 }