usb: move USB_REQ_SET_ADDRESS handling to common code

USB_REQ_SET_ADDRESS handling is identical in *all* emulated devices.
Move it to common code.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Gerd Hoffmann
2010-11-26 12:35:10 +01:00
parent 30c7d32a0a
commit 41c6abbdeb
9 changed files with 7 additions and 29 deletions

View File

@@ -1076,11 +1076,6 @@ static int usb_net_handle_control(USBDevice *dev, int request, int value,
ret = 0;
break;
case DeviceOutRequest | USB_REQ_SET_ADDRESS:
dev->addr = value;
ret = 0;
break;
case ClassInterfaceOutRequest | USB_CDC_SEND_ENCAPSULATED_COMMAND:
if (!s->rndis || value || index != 0)
goto fail;