Re: [PATCH] usb: gadget: Add Interface Association Descriptor to ECM

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

 



On Wed, Jan 25, 2012 at 11:02:03AM +0100, Linus Walleij wrote:
> --- a/drivers/usb/gadget/f_ecm.c
> +++ b/drivers/usb/gadget/f_ecm.c
> @@ -97,6 +97,20 @@ static inline unsigned ecm_bitrate(struct usb_gadget *g)
>  
>  /* interface descriptor: */
>  
> +static struct usb_interface_assoc_descriptor
> +ecm_iad_descriptor = {
> +	.bLength =		sizeof ecm_iad_descriptor,
> +	.bDescriptorType =	USB_DT_INTERFACE_ASSOCIATION,
> +
> +	/* .bFirstInterface =	DYNAMIC, */
> +	.bInterfaceCount =	2,	/* control + data */
> +	.bFunctionClass =	USB_CLASS_COMM,
> +	.bFunctionSubClass =	USB_CDC_SUBCLASS_ETHERNET,
> +	.bFunctionProtocol =	USB_CDC_PROTO_NONE,
> +	/* .iFunction =		DYNAMIC */
> +};
> +
> +
>  static struct usb_interface_descriptor ecm_control_intf = {
>  	.bLength =		sizeof ecm_control_intf,
>  	.bDescriptorType =	USB_DT_INTERFACE,
> @@ -199,6 +213,7 @@ static struct usb_endpoint_descriptor fs_ecm_out_desc = {
>  
>  static struct usb_descriptor_header *ecm_fs_function[] = {
>  	/* CDC ECM control descriptors */
> +	(struct usb_descriptor_header *) &ecm_iad_descriptor,
>  	(struct usb_descriptor_header *) &ecm_control_intf,
>  	(struct usb_descriptor_header *) &ecm_header_desc,
>  	(struct usb_descriptor_header *) &ecm_union_desc,
> @@ -247,6 +262,7 @@ static struct usb_endpoint_descriptor hs_ecm_out_desc = {
>  
>  static struct usb_descriptor_header *ecm_hs_function[] = {
>  	/* CDC ECM control descriptors */
> +	(struct usb_descriptor_header *) &ecm_iad_descriptor,
>  	(struct usb_descriptor_header *) &ecm_control_intf,
>  	(struct usb_descriptor_header *) &ecm_header_desc,
>  	(struct usb_descriptor_header *) &ecm_union_desc,

Why did you add this IAD thingy to FS and HS and not SS descriptors? I don't
see a reason so I would guess you just forgot :)

Sebastian
--
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