mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-31 22:11:53 -06:00
usb: track altsetting in USBDevice
Also handle {GET,SET}_INTERFACE in common code (usb-desc.c). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
65360511a2
commit
1de14d43e2
12 changed files with 90 additions and 79 deletions
11
hw/usb-net.c
11
hw/usb-net.c
|
@ -1098,17 +1098,6 @@ static int usb_net_handle_control(USBDevice *dev, USBPacket *p,
|
|||
#endif
|
||||
break;
|
||||
|
||||
case DeviceRequest | USB_REQ_GET_INTERFACE:
|
||||
case InterfaceRequest | USB_REQ_GET_INTERFACE:
|
||||
data[0] = 0;
|
||||
ret = 1;
|
||||
break;
|
||||
|
||||
case DeviceOutRequest | USB_REQ_SET_INTERFACE:
|
||||
case InterfaceOutRequest | USB_REQ_SET_INTERFACE:
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
fail:
|
||||
fprintf(stderr, "usbnet: failed control transaction: "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue