aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ftdi-ft.c
diff options
context:
space:
mode:
authorTomasz Moń <desowin@gmail.com>2020-06-27 15:26:56 +0200
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2020-06-27 19:29:44 +0000
commit8557c94f87e3dc8661efaf10348545513a4b49b9 (patch)
treec0124be32c2fbeda10eec8c91f7a22dd1500a955 /epan/dissectors/packet-ftdi-ft.c
parentd933a98f893b59a51fba9986a75024f3fc3c1537 (diff)
FTDI MPSSE: Dissect Bad Command response payload
Undocumented data shitfing commands that operate in bitmode, MSB first, and have both Write TMS and Read TDO bits set, do not seem to consume the data payload. Do not dissect the data byte for these commands. Treat MCU Host mode commands as Bad Command when in MPSSE mode. MCU Host mode commands are recognized only in MCU Host mode. Add preliminary support for MCU Host mode dissection. Ping-Bug: 11743 Change-Id: I3046aab92f69e2e141cb5a23c68e844b24b6c2ca Reviewed-on: https://code.wireshark.org/review/37566 Petri-Dish: Tomasz Moń <desowin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ftdi-ft.c')
-rw-r--r--epan/dissectors/packet-ftdi-ft.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/dissectors/packet-ftdi-ft.c b/epan/dissectors/packet-ftdi-ft.c
index 58e3da422c..05939d2b64 100644
--- a/epan/dissectors/packet-ftdi-ft.c
+++ b/epan/dissectors/packet-ftdi-ft.c
@@ -732,13 +732,14 @@ dissect_serial_payload(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tre
guint8 bitmode;
bitmode = get_recorded_interface_mode(pinfo, usb_conv_info, interface);
- if (bitmode == BITMODE_MPSSE)
+ if ((bitmode == BITMODE_MPSSE) || (bitmode == BITMODE_MCU))
{
ftdi_mpsse_info_t mpsse_info = {
.bus_id = k_bus_id,
.device_address = k_device_address,
.chip = identify_chip(usb_conv_info),
.iface = interface,
+ .mcu_mode = (bitmode == BITMODE_MCU),
};
tvbuff_t *mpsse_payload_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector_with_data(ftdi_mpsse_handle, mpsse_payload_tvb, pinfo, tree, &mpsse_info);