summaryrefslogtreecommitdiff
path: root/tools/usb
diff options
context:
space:
mode:
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>2022-07-08 12:58:57 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-07-08 14:54:49 +0200
commitb067fc284667ccbcfdb6c990568a3cfd8b73bb8a (patch)
treed2cea20819b10436f77c110d2b1ef5c431ae25cc /tools/usb
parent3a6bf4a08142826698121bef16b244dcf50a6431 (diff)
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>
Diffstat (limited to 'tools/usb')
-rw-r--r--tools/usb/testusb.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/usb/testusb.c b/tools/usb/testusb.c
index 474bae868b35..6f428f925384 100644
--- a/tools/usb/testusb.c
+++ b/tools/usb/testusb.c
@@ -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 "??";
}
}