usb: emul: hub: Report the actual device speed of the emulation device
authorBin Meng <bmeng.cn@gmail.com>
Sun, 1 Oct 2017 13:19:41 +0000 (06:19 -0700)
committerMarek Vasut <marex@denx.de>
Sun, 1 Oct 2017 14:32:51 +0000 (16:32 +0200)
commitd7771f0c5cd429286c7555360d779d21568e3ba0
treeb8d33ade945124b6103870167bec63efa1f73b56
parent848436a48d21447fc78bef67a4cbf11392536de2
usb: emul: hub: Report the actual device speed of the emulation device

At present the usb hub emulator always reports its downstream port
speed as full speed. Actually it is high speed for sandbox-flash,
and low speed for sandbox-keyb. We can determine the device speed
by checking its device descriptor bcdUSB field, and do the proper
hub port status report based on that.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
drivers/usb/emul/sandbox_hub.c