monitor: Fix decoding Command Complete for Remove ISO Data path
authorŁukasz Rymanowski <lukasz.rymanowski@codecoup.pl>
Sat, 29 Jul 2023 00:45:48 +0000 (02:45 +0200)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 5 Jan 2024 13:34:03 +0000 (19:04 +0530)
Before

< HCI Command: LE Remove Isochronous Data Path (0x08|0x006f) plen 3
        Connection Handle: 96
        Data Path Direction: Output (Controller to Host) (0x01)
> HCI Event: Command Complete (0x0e) plen 6
      LE Remove Isochronous Data Path (0x08|0x006f) ncmd 1
        invalid packet size
        00 60 00

After patch

< HCI Command: LE Remove Isochronous Data Path (0x08|0x006f) plen 3
        Connection Handle: 96
        Data Path Direction: 0x01
          Input (Host to Controller)
> HCI Event: Command Complete (0x0e) plen 6
      LE Remove Isochronous Data Path (0x08|0x006f) ncmd 1
        Status: Success (0x00)
        Connection handle: 96

monitor/bt.h
monitor/packet.c

index 98863a6..9c5dfd4 100755 (executable)
@@ -2861,6 +2861,11 @@ struct bt_hci_cmd_le_remove_iso_path {
        uint8_t  direction;
 } __attribute__ ((packed));
 
+struct bt_hci_rsp_le_remove_iso_path {
+       uint8_t  status;
+       uint16_t handle;
+} __attribute__ ((packed));
+
 #define BT_HCI_CMD_LE_ISO_TX_TEST              0x2070
 #define BT_HCI_BIT_LE_ISO_TX_TEST              BT_HCI_CMD_BIT(43, 5)
 
index b975512..1199277 100755 (executable)
@@ -9865,7 +9865,9 @@ static const struct opcode_data opcode_table[] = {
                                "LE Remove Isochronous Data Path",
                                le_remove_iso_path_cmd,
                                sizeof(struct bt_hci_cmd_le_remove_iso_path),
-                               true, status_rsp, 1, true },
+                               true, status_handle_rsp,
+                               sizeof(struct bt_hci_rsp_le_remove_iso_path),
+                               true },
        { BT_HCI_CMD_LE_ISO_TX_TEST, BT_HCI_BIT_LE_ISO_TX_TEST,
                                "LE Isochronous Transmit Test", NULL, 0,
                                false },