summaryrefslogtreecommitdiff
path: root/hw/usb/redirect.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-09-12 15:08:36 +0200
committerGerd Hoffmann <kraxel@redhat.com>2012-09-13 09:50:46 +0200
commit3f4be32824ccc5f6a5566b93c900df989a96d048 (patch)
treeeee487cb48926c64244fc574915d930bed3213f7 /hw/usb/redirect.c
parent9a8d4067a63702dfb62d0ae3399600a853ad5daa (diff)
downloadqemu-3f4be32824ccc5f6a5566b93c900df989a96d048.tar.gz
usb-redir: Store max_packet_size in endp_data
So that we've a place to migrate it to / from to allow restoring it after migration. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/redirect.c')
-rw-r--r--hw/usb/redirect.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index f474da80bb..3196665e7f 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -57,6 +57,7 @@ struct endp_data {
uint8_t type;
uint8_t interval;
uint8_t interface; /* bInterfaceNumber this ep belongs to */
+ uint16_t max_packet_size; /* In bytes, not wMaxPacketSize format !! */
uint8_t iso_started;
uint8_t iso_error; /* For reporting iso errors to the HC */
uint8_t interrupt_started;
@@ -1278,7 +1279,8 @@ static void usbredir_ep_info(void *priv,
usb_ep->ifnum = dev->endpoint[i].interface;
if (usbredirparser_peer_has_cap(dev->parser,
usb_redir_cap_ep_info_max_packet_size)) {
- usb_ep->max_packet_size = ep_info->max_packet_size[i];
+ dev->endpoint[i].max_packet_size =
+ usb_ep->max_packet_size = ep_info->max_packet_size[i];
}
if (ep_info->type[i] == usb_redir_type_bulk) {
usb_ep->pipeline = true;