Commit Message

This patch adds fields to the USBDevice struct for the current
speed (hard-wired to full speed for now) and current device
configuration. Also a init function is added which inializes
these fields. This allows USB_REQ_{GET,SET}_CONFIGURATION
handling to be moved to common code.
For most drivers the conversion is trivial ad they support a single
configuration only anyway. One exception is bluetooth where some
device-specific setup code runs after get/set configuration. The
other is usb-net which actually has two configurations so the
the code to check for the active configuration has been adapted.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/usb-bt.c | 31 ++++++++++++-------------------
hw/usb-desc.c | 32 ++++++++++++++++++++++++++++----
hw/usb-desc.h | 1 +
hw/usb-hid.c | 10 ++--------
hw/usb-hub.c | 9 +--------
hw/usb-msd.c | 9 +--------
hw/usb-net.c | 45 +++++++++++++++------------------------------
hw/usb-serial.c | 10 ++--------
hw/usb-wacom.c | 9 +--------
hw/usb.h | 2 ++
trace-events | 1 +
11 files changed, 66 insertions(+), 93 deletions(-)