usb/pcap: set flag_setup

Without that wireshark complains about invalid control setup data
for non-control transfers.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20210216144939.841873-1-kraxel@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Gerd Hoffmann 2021-02-16 15:49:39 +01:00
parent 0dbe4768b9
commit 6ba5a437ad
1 changed files with 2 additions and 0 deletions

View File

@ -127,6 +127,7 @@ static void do_usb_pcap_ctrl(FILE *fp, USBPacket *p, bool setup)
.xfer_type = usbmon_xfer_type[USB_ENDPOINT_XFER_CONTROL],
.epnum = in ? 0x80 : 0,
.devnum = dev->addr,
.flag_setup = setup ? 0 : '-',
.flag_data = '=',
.length = dev->setup_len,
};
@ -169,6 +170,7 @@ static void do_usb_pcap_data(FILE *fp, USBPacket *p, bool setup)
.xfer_type = usbmon_xfer_type[p->ep->type],
.epnum = usbmon_epnum(p),
.devnum = p->ep->dev->addr,
.flag_setup = '-',
.flag_data = '=',
.length = p->iov.size,
};