usb: Pass the packet to the device's handle_control callback

This allows using the generic usb_generic_handle_packet function from
device code which does ASYNC control requests (such as the linux host
pass through code).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
Hans de Goede 2011-02-02 16:33:13 +01:00 committed by Gerd Hoffmann
parent 8656954aed
commit 007fd62f4d
14 changed files with 39 additions and 35 deletions

View file

@ -1042,13 +1042,13 @@ static void usb_net_handle_reset(USBDevice *dev)
{
}
static int usb_net_handle_control(USBDevice *dev, int request, int value,
int index, int length, uint8_t *data)
static int usb_net_handle_control(USBDevice *dev, USBPacket *p,
int request, int value, int index, int length, uint8_t *data)
{
USBNetState *s = (USBNetState *) dev;
int ret;
ret = usb_desc_handle_control(dev, request, value, index, length, data);
ret = usb_desc_handle_control(dev, p, request, value, index, length, data);
if (ret >= 0) {
return ret;
}