diff options
author | Bjørn Mork <bjorn@mork.no> | 2012-10-12 20:04:10 +0200 |
---|---|---|
committer | Bjørn Mork <bjorn@mork.no> | 2012-10-12 20:04:10 +0200 |
commit | bd8cfc610f1dad92e663fb224c4031b8de512a74 (patch) | |
tree | 6265afaf8429c21f7d4cf42b98e25536904648be | |
parent | 04ac48dea1a0db5e26edd9716bc92c1be2606992 (diff) |
usb-mbim: add NCM descriptors
Signed-off-by: Bjørn Mork <bjorn@mork.no>
-rw-r--r-- | hw/usb/dev-mbim.c | 46 |
1 files changed, 38 insertions, 8 deletions
diff --git a/hw/usb/dev-mbim.c b/hw/usb/dev-mbim.c index 13ede661a..2f2d37ff7 100644 --- a/hw/usb/dev-mbim.c +++ b/hw/usb/dev-mbim.c @@ -89,15 +89,9 @@ static const uint8_t cdc_commandset[] = { 0x16, /* bDescriptorSubType */ 0x00, 0x01, /* bcdVersion 1.00 */ STR_COMMANDSET, /* iCommandSet 13 S_NCM_CMD_FUNC */ - // bGUID {2e23bbae-c188-11df-bcdc-d9c6dfd72085} -// 0x1b, /* bmNetworkCapabilities 0x1b */ + /* bGUID {2e23bbae-c188-11df-bcdc-d9c6dfd72085} */ + 0x2e, 0x23, 0xbb, 0xae, 0xc1, 0x88, 0x11, 0xdf, 0xbc, 0xdc, 0xd9, 0xc6, 0xdf, 0xd7, 0x20, 0x85, }; -/* - CDC Command Set: - bcdVersion 1.00 - iCommandSet 13 S_NCM_CMD_FUNC - bGUID {2e23bbae-c188-11df-bcdc-d9c6dfd72085} -*/ /* MBIM with NCM 1.0 compatibility setting @@ -125,6 +119,24 @@ static const USBDescIface desc_iface_mbim[] = { .bInterfaceClass = 0x02, .bInterfaceSubClass = 0x0d, /* NCM */ .bInterfaceProtocol = 0x00, + .ndesc = 5, + .descs = (USBDescOther[]) { + { + .data = cdc_header, + }, + { + .data = cdc_union, + }, + { + .data = cdc_ethernet, + }, + { + .data = cdc_ncm, + }, + { + .data = cdc_commandset, + }, + }, .eps = (USBDescEndpoint[]) { { .bEndpointAddress = USB_DIR_IN | 0x01, @@ -214,6 +226,24 @@ static const USBDescIface desc_iface_ncm[] = { .bInterfaceClass = 0x02, .bInterfaceSubClass = 0x0d, /* NCM */ .bInterfaceProtocol = 0x00, + .ndesc = 5, + .descs = (USBDescOther[]) { + { + .data = cdc_header, + }, + { + .data = cdc_union, + }, + { + .data = cdc_ethernet, + }, + { + .data = cdc_ncm, + }, + { + .data = cdc_commandset, + }, + }, .eps = (USBDescEndpoint[]) { { .bEndpointAddress = USB_DIR_IN | 0x01, |