mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
tools: usb: testusb: Add wireless speed reporting
Add the ability to detect and print the USB speed as "wireless" if/when the kernel reports that speed. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Link: https://lore.kernel.org/r/20220708115859.2095714-2-bryan.odonoghue@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3a6bf4a081
commit
b067fc2846
1 changed files with 8 additions and 6 deletions
|
@ -96,7 +96,8 @@ struct usb_interface_descriptor {
|
|||
enum usb_device_speed {
|
||||
USB_SPEED_UNKNOWN = 0, /* enumerating */
|
||||
USB_SPEED_LOW, USB_SPEED_FULL, /* usb 1.1 */
|
||||
USB_SPEED_HIGH /* usb 2.0 */
|
||||
USB_SPEED_HIGH, /* usb 2.0 */
|
||||
USB_SPEED_WIRELESS, /* wireless (usb 2.5) */
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
@ -104,11 +105,12 @@ enum usb_device_speed {
|
|||
static char *speed (enum usb_device_speed s)
|
||||
{
|
||||
switch (s) {
|
||||
case USB_SPEED_UNKNOWN: return "unknown";
|
||||
case USB_SPEED_LOW: return "low";
|
||||
case USB_SPEED_FULL: return "full";
|
||||
case USB_SPEED_HIGH: return "high";
|
||||
default: return "??";
|
||||
case USB_SPEED_UNKNOWN: return "unknown";
|
||||
case USB_SPEED_LOW: return "low";
|
||||
case USB_SPEED_FULL: return "full";
|
||||
case USB_SPEED_HIGH: return "high";
|
||||
case USB_SPEED_WIRELESS: return "wireless";
|
||||
default: return "??";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue