[PATCH][usbutils] lsusb: decode CDC MBIM extended functional descriptor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Ben Chan <benchan@xxxxxxxxxxxx>
---
Example output:

  Before:

      UNRECOGNIZED CDC:  08 24 1c 00 01 0f dc 05

  After:

      CDC MBIM Extended:
        bcdMBIMExtendedVersion           1.00
        bMaxOutstandingCommandMessages     15
        wMTU                             1500

 lsusb.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/lsusb.c b/lsusb.c
index fd49240..98e4a51 100644
--- a/lsusb.c
+++ b/lsusb.c
@@ -3219,6 +3219,19 @@ dump_comm_descriptor(libusb_device_handle *dev, const unsigned char *buf, char *
 		if (buf[11] & 0x08)
 			printf("%s    max datagram size\n", indent);
 		break;
+	case 0x1c:		/* MBIM extended functional desc */
+		type = "MBIM Extended";
+		if (buf[0] != 8)
+			goto bad;
+		printf("%sCDC MBIM Extended:\n"
+		       "%s  bcdMBIMExtendedVersion          %2x.%02x\n"
+		       "%s  bMaxOutstandingCommandMessages    %3d\n"
+		       "%s  wMTU                            %5d\n",
+		       indent,
+		       indent, buf[4], buf[3],
+		       indent, buf[5],
+		       indent, buf[6] | (buf[7] << 8));
+		break;
 	default:
 		/* FIXME there are about a dozen more descriptor types */
 		printf("%sUNRECOGNIZED CDC: ", indent);
-- 
1.9.0.rc1.175.g0b1dcb5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux