diff mbox series

[BlueZ,1/5] monitor: Fix decoding Command Complete for Remove ISO Data path

Message ID 20230729004552.1422547-2-lukasz.rymanowski@codecoup.pl
State New
Headers show
Series Couple of improvements to btmon | expand

Commit Message

Ɓukasz Rymanowski July 29, 2023, 12:45 a.m. UTC
Before

< HCI Command: LE Remove Isochronous Data Path (0x08|0x006f) plen 3                                                        #1061 139.246292
        Connection Handle: 96
        Data Path Direction: Output (Controller to Host) (0x01)
> HCI Event: Command Complete (0x0e) plen 6                                                                                #1062 139.246954
      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                                                        #1061 139.246292
        Connection Handle: 96
        Data Path Direction: 0x01
          Input (Host to Controller)
> HCI Event: Command Complete (0x0e) plen 6                                                                                #1062 139.246954
      LE Remove Isochronous Data Path (0x08|0x006f) ncmd 1
        Status: Success (0x00)
        Connection handle: 96
---
 monitor/bt.h     | 5 +++++
 monitor/packet.c | 4 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/monitor/bt.h b/monitor/bt.h
index b60263fa0..fcc5478bf 100644
--- a/monitor/bt.h
+++ b/monitor/bt.h
@@ -2862,6 +2862,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)
 
diff --git a/monitor/packet.c b/monitor/packet.c
index f581a8e72..c7c0308db 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -9871,7 +9871,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 },