From 97451ee53c53ef45146b04a41573264ef7573301 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 13 Nov 2012 16:50:40 +0900 Subject: [PATCH] monitor: Add some mising AMP controller decodings --- monitor/bt.h | 18 ++++++++++++++++++ monitor/packet.c | 33 +++++++++++++++++++++++++++++++-- 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/monitor/bt.h b/monitor/bt.h index 430ebcd8a..fb40e0f79 100644 --- a/monitor/bt.h +++ b/monitor/bt.h @@ -309,6 +309,24 @@ struct bt_hci_cmd_disconn_logic_link { uint16_t handle; } __attribute__ ((packed)); +#define BT_HCI_CMD_LOGIC_LINK_CANCEL 0x043b +struct bt_hci_cmd_logic_link_cancel { + uint8_t phy_handle; + uint8_t flow_spec; +} __attribute__ ((packed)); +struct bt_hci_rsp_logic_link_cancel { + uint8_t status; + uint8_t phy_handle; + uint8_t flow_spec; +} __attribute__ ((packed)); + +#define BT_HCI_CMD_FLOW_SPEC_MODIFY 0x043c +struct bt_hci_cmd_flow_spec_modify { + uint16_t handle; + uint8_t tx_flow_spec[16]; + uint8_t rx_flow_spec[16]; +} __attribute__ ((packed)); + #define BT_HCI_CMD_HOLD_MODE 0x0801 struct bt_hci_cmd_hold_mode { uint16_t handle; diff --git a/monitor/packet.c b/monitor/packet.c index 64037e818..94539e65a 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -2006,6 +2006,32 @@ static void disconn_logic_link_cmd(const void *data, uint8_t size) print_handle(cmd->handle); } +static void logic_link_cancel_cmd(const void *data, uint8_t size) +{ + const struct bt_hci_cmd_logic_link_cancel *cmd = data; + + print_phy_handle(cmd->phy_handle); + print_field("TX flow spec: 0x%2.2x", cmd->flow_spec); +} + +static void logic_link_cancel_rsp(const void *data, uint8_t size) +{ + const struct bt_hci_rsp_logic_link_cancel *rsp = data; + + print_status(rsp->status); + print_phy_handle(rsp->phy_handle); + print_field("TX flow spec: 0x%2.2x", rsp->flow_spec); +} + +static void flow_spec_modify_cmd(const void *data, uint8_t size) +{ + const struct bt_hci_cmd_flow_spec_modify *cmd = data; + + print_handle(cmd->handle); + + packet_hexdump(data + 2, size - 2); +} + static void hold_mode_cmd(const void *data, uint8_t size) { const struct bt_hci_cmd_hold_mode *cmd = data; @@ -3012,8 +3038,11 @@ static const struct opcode_data opcode_table[] = { accept_logic_link_cmd, 33, true }, { 0x043a, "Disconnect Logical Link", disconn_logic_link_cmd, 2, true }, - { 0x043b, "Logical Link Cancel" }, - { 0x043c, "Flow Specifcation Modify" }, + { 0x043b, "Logical Link Cancel", + logic_link_cancel_cmd, 2, true, + logic_link_cancel_rsp, 3, true }, + { 0x043c, "Flow Specifcation Modify", + flow_spec_modify_cmd, 34, true }, /* OGF 2 - Link Policy */ { 0x0801, "Holde Mode", -- 2.47.3