Merge "USB: f_qc_rndis: Change descriptors to support wireless RNDIS"

This commit is contained in:
Linux Build Service Account 2017-03-15 10:25:38 -07:00 committed by Gerrit - the friendly Code Review server
commit 6f55033ecf

View file

@ -153,6 +153,7 @@ static unsigned int rndis_qc_bitrate(struct usb_gadget *g)
/* interface descriptor: */ /* interface descriptor: */
/* interface descriptor: Supports "Wireless" RNDIS; auto-detected by Windows*/
static struct usb_interface_descriptor rndis_qc_control_intf = { static struct usb_interface_descriptor rndis_qc_control_intf = {
.bLength = sizeof(rndis_qc_control_intf), .bLength = sizeof(rndis_qc_control_intf),
.bDescriptorType = USB_DT_INTERFACE, .bDescriptorType = USB_DT_INTERFACE,
@ -160,9 +161,9 @@ static struct usb_interface_descriptor rndis_qc_control_intf = {
/* .bInterfaceNumber = DYNAMIC */ /* .bInterfaceNumber = DYNAMIC */
/* status endpoint is optional; this could be patched later */ /* status endpoint is optional; this could be patched later */
.bNumEndpoints = 1, .bNumEndpoints = 1,
.bInterfaceClass = USB_CLASS_COMM, .bInterfaceClass = USB_CLASS_WIRELESS_CONTROLLER,
.bInterfaceSubClass = USB_CDC_SUBCLASS_ACM, .bInterfaceSubClass = 0x01,
.bInterfaceProtocol = USB_CDC_ACM_PROTO_VENDOR, .bInterfaceProtocol = 0x03,
/* .iInterface = DYNAMIC */ /* .iInterface = DYNAMIC */
}; };
@ -214,15 +215,16 @@ static struct usb_interface_descriptor rndis_qc_data_intf = {
}; };
/* Supports "Wireless" RNDIS; auto-detected by Windows */
static struct usb_interface_assoc_descriptor static struct usb_interface_assoc_descriptor
rndis_qc_iad_descriptor = { rndis_qc_iad_descriptor = {
.bLength = sizeof(rndis_qc_iad_descriptor), .bLength = sizeof(rndis_qc_iad_descriptor),
.bDescriptorType = USB_DT_INTERFACE_ASSOCIATION, .bDescriptorType = USB_DT_INTERFACE_ASSOCIATION,
.bFirstInterface = 0, /* XXX, hardcoded */ .bFirstInterface = 0, /* XXX, hardcoded */
.bInterfaceCount = 2, /* control + data */ .bInterfaceCount = 2, /* control + data */
.bFunctionClass = USB_CLASS_COMM, .bFunctionClass = USB_CLASS_WIRELESS_CONTROLLER,
.bFunctionSubClass = USB_CDC_SUBCLASS_ETHERNET, .bFunctionSubClass = 0x01,
.bFunctionProtocol = USB_CDC_PROTO_NONE, .bFunctionProtocol = 0x03,
/* .iFunction = DYNAMIC */ /* .iFunction = DYNAMIC */
}; };