From 0d76e3453ed325f948a8fb2da0dce59c325311dc Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Mon, 23 Dec 2013 18:56:30 +0000 Subject: From Michal Labedzki via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9562 USB: Add support for Bluetooth Ubertooth with initial version of Low Energy Link Layer protocol and NFC ACR122 USB: CCID: Add ACR122 dissector to be autodetected by VendorId/ProductID svn path=/trunk/; revision=54407 --- epan/dissectors/packet-usb-ccid.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'epan/dissectors/packet-usb-ccid.c') diff --git a/epan/dissectors/packet-usb-ccid.c b/epan/dissectors/packet-usb-ccid.c index f92a59b3c6..4147dfc3dc 100644 --- a/epan/dissectors/packet-usb-ccid.c +++ b/epan/dissectors/packet-usb-ccid.c @@ -451,17 +451,14 @@ dissect_ccid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) /* sent/received is from the perspective of the card reader */ pinfo->p2p_dir = P2P_DIR_SENT; call_dissector(sub_handles[SUB_ISO7816], next_tvb, pinfo, tree); - } - - /* The user probably wanted GSM SIM, or something else */ - else { + } else { /* The user probably wanted GSM SIM, or something else */ call_dissector(sub_handles[sub_selected], next_tvb, pinfo, tree); } - } - - /* The user only wants plain data */ - else { + } else if (usb_conv_info->deviceVendor == 0x072F && usb_conv_info->deviceProduct == 0x2200) { + pinfo->p2p_dir = P2P_DIR_SENT; + call_dissector_with_data(sub_handles[SUB_ACR122_PN532], tvb_new_subset_remaining(tvb, 10), pinfo, tree, usb_conv_info); + } else { /* The user only wants plain data */ call_dissector(sub_handles[SUB_DATA], next_tvb, pinfo, tree); } } @@ -494,6 +491,9 @@ dissect_ccid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) } else if (sub_selected == SUB_ISO7816) { pinfo->p2p_dir = P2P_DIR_RECV; call_dissector(sub_handles[SUB_ISO7816], next_tvb, pinfo, tree); + } else if (usb_conv_info->deviceVendor == 0x072F && usb_conv_info->deviceProduct == 0x2200) { + pinfo->p2p_dir = P2P_DIR_RECV; + call_dissector_with_data(sub_handles[SUB_ACR122_PN532], tvb_new_subset_remaining(tvb, 10), pinfo, tree, usb_conv_info); } else { call_dissector(sub_handles[SUB_DATA], next_tvb, pinfo, tree); } -- cgit v1.2.1