mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
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:
parent
8656954aed
commit
007fd62f4d
14 changed files with 39 additions and 35 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue