diff options
author | John Michelau <john.michelau@motorola.com> | 2010-12-10 13:51:19 -0600 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2010-12-11 11:01:53 -0800 |
commit | be0bf00ecfb0797e408c76a5f373c5802bba291a (patch) | |
tree | ad78367e739f7add3a3e0c3c340ab6e99fc2f039 | |
parent | d9d4cb3a406df016c94026b6c32935f7c4e85c09 (diff) | |
download | qemu-be0bf00ecfb0797e408c76a5f373c5802bba291a.tar.gz |
USB: gadget: acm,rndis: IAD class, subclass & prot should match 1st iface
Microsoft recommends that the class and subclass fields of
an IAD match the same fields from the first interface in the
collection that the IAD is grouping. In practice, we are also
finding that the protocol fields should also match. Without
this change, the default Microsoft composite driver may not
group interfaces properly, which is what allows child
function drivers with IAD's to load correctly.
Signed-off-by: Mike Lockwood <lockwood@android.com>
-rw-r--r-- | drivers/usb/gadget/f_acm.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/f_rndis.c | 13 |
2 files changed, 11 insertions, 4 deletions
diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c index 2d7fdcce310..cf2e7fc7659 100644 --- a/drivers/usb/gadget/f_acm.c +++ b/drivers/usb/gadget/f_acm.c @@ -112,7 +112,7 @@ acm_iad_descriptor = { .bInterfaceCount = 2, // control + data .bFunctionClass = USB_CLASS_COMM, .bFunctionSubClass = USB_CDC_SUBCLASS_ACM, - .bFunctionProtocol = USB_CDC_PROTO_NONE, + .bFunctionProtocol = USB_CDC_ACM_PROTO_AT_V25TER, /* .iFunction = DYNAMIC */ }; diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c index 2d9d97ecce2..af60922d671 100644 --- a/drivers/usb/gadget/f_rndis.c +++ b/drivers/usb/gadget/f_rndis.c @@ -133,8 +133,8 @@ static struct usb_interface_descriptor rndis_control_intf = { #ifdef CONFIG_USB_ANDROID_RNDIS_WCEIS /* "Wireless" RNDIS; auto-detected by Windows */ .bInterfaceClass = USB_CLASS_WIRELESS_CONTROLLER, - .bInterfaceSubClass = 1, - .bInterfaceProtocol = 3, + .bInterfaceSubClass = 0x01, + .bInterfaceProtocol = 0x03, #else .bInterfaceClass = USB_CLASS_COMM, .bInterfaceSubClass = USB_CDC_SUBCLASS_ACM, @@ -198,9 +198,16 @@ rndis_iad_descriptor = { .bFirstInterface = 0, /* XXX, hardcoded */ .bInterfaceCount = 2, // control + data +#ifdef CONFIG_USB_ANDROID_RNDIS_WCEIS + /* "Wireless" RNDIS; auto-detected by Windows */ + .bFunctionClass = USB_CLASS_WIRELESS_CONTROLLER, + .bFunctionSubClass = 0x01, + .bFunctionProtocol = 0x03, +#else .bFunctionClass = USB_CLASS_COMM, .bFunctionSubClass = USB_CDC_SUBCLASS_ETHERNET, - .bFunctionProtocol = USB_CDC_PROTO_NONE, + .bFunctionProtocol = USB_CDC_ACM_PROTO_VENDOR, +#endif /* .iFunction = DYNAMIC */ }; |