aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Moń <desowin@gmail.com>2023-03-06 11:01:05 +0100
committerTomasz Moń <desowin@gmail.com>2023-03-07 07:57:21 +0100
commit248ee51e362f757a2b79b6495e44bbbb335ea4b0 (patch)
treebbfdc3bb0203e8dfb5eedcef7bd93a96c0b14dfe
parenta93c7758492d6905a668c8c1f8cee60607ef57b7 (diff)
USBLL: Remove unnecessary packet ends transfer check
Check whether last received packet ended transfer on STALL only if there was active transfer key set. This fixes failed transfer type assertion for control transfers without data stage that were STALLed by device (during status stage).
-rw-r--r--epan/dissectors/packet-usbll.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/epan/dissectors/packet-usbll.c b/epan/dissectors/packet-usbll.c
index 470bca6400..448d8b2464 100644
--- a/epan/dissectors/packet-usbll.c
+++ b/epan/dissectors/packet-usbll.c
@@ -2229,15 +2229,14 @@ dissect_usbll_handshake(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *t
usbll_transfer_info_t *transfer;
guint32 last_offset;
gboolean from_host;
- gboolean reassembled;
from_host = usbll_is_stalled_data_from_host(data->transaction_state);
ep_info = usbll_get_endpoint_info(pinfo, data->transaction->address, data->transaction->endpoint, from_host);
last_offset = ep_info->transfer_offset - ep_info->last_data_len;
- reassembled = packet_ends_transfer(ep_info, last_offset, ep_info->last_data_len);
- if (ep_info->active_transfer_key && !reassembled)
+ if (ep_info->active_transfer_key &&
+ !packet_ends_transfer(ep_info, last_offset, ep_info->last_data_len))
{
/* STALL terminates ongoing transfer. While the STALL packet is
* always sent by device, the transfer can be either IN or OUT.