rndis: exclude the logic that belongs to composite
This commit is contained in:
parent
cb05700acf
commit
8de2197773
@ -2474,20 +2474,28 @@ static int usbclass_setup(FAR struct usbdevclass_driver_s *driver,
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_USBDEV_DUALSPEED
|
/* If the serial device is used in as part of a composite
|
||||||
|
* device, then the configuration descriptor is provided by
|
||||||
|
* logic in the composite device implementation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_CDCACM_COMPOSITE
|
||||||
|
# ifdef CONFIG_USBDEV_DUALSPEED
|
||||||
case USB_DESC_TYPE_OTHERSPEEDCONFIG:
|
case USB_DESC_TYPE_OTHERSPEEDCONFIG:
|
||||||
#endif /* CONFIG_USBDEV_DUALSPEED */
|
# endif /* CONFIG_USBDEV_DUALSPEED */
|
||||||
case USB_DESC_TYPE_CONFIG:
|
case USB_DESC_TYPE_CONFIG:
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_USBDEV_DUALSPEED
|
# ifdef CONFIG_USBDEV_DUALSPEED
|
||||||
ret = usbclass_mkcfgdesc(ctrlreq->buf, &priv->devinfo,
|
ret = usbclass_mkcfgdesc(ctrlreq->buf, &priv->devinfo,
|
||||||
dev->speed, ctrl->req);
|
dev->speed, ctrl->req);
|
||||||
#else
|
# else
|
||||||
ret = usbclass_mkcfgdesc(ctrlreq->buf, &priv->devinfo);
|
ret = usbclass_mkcfgdesc(ctrlreq->buf, &priv->devinfo);
|
||||||
#endif
|
# endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef CONFIG_CDCACM_COMPOSITE
|
||||||
case USB_DESC_TYPE_STRING:
|
case USB_DESC_TYPE_STRING:
|
||||||
{
|
{
|
||||||
/* index == language code. */
|
/* index == language code. */
|
||||||
@ -2496,6 +2504,7 @@ static int usbclass_setup(FAR struct usbdevclass_driver_s *driver,
|
|||||||
(FAR struct usb_strdesc_s *)ctrlreq->buf);
|
(FAR struct usb_strdesc_s *)ctrlreq->buf);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
@ -2516,6 +2525,12 @@ static int usbclass_setup(FAR struct usbdevclass_driver_s *driver,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* If the serial device is used in as part of a composite device,
|
||||||
|
* then the overall composite class configuration is managed by
|
||||||
|
* logic in the composite device implementation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_CDCACM_COMPOSITE
|
||||||
case USB_REQ_GETCONFIGURATION:
|
case USB_REQ_GETCONFIGURATION:
|
||||||
{
|
{
|
||||||
if (ctrl->type == USB_DIR_IN)
|
if (ctrl->type == USB_DIR_IN)
|
||||||
@ -2525,6 +2540,7 @@ static int usbclass_setup(FAR struct usbdevclass_driver_s *driver,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_UNSUPPORTEDSTDREQ),
|
usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_UNSUPPORTEDSTDREQ),
|
||||||
@ -2663,10 +2679,12 @@ static void usbclass_disconnect(FAR struct usbdevclass_driver_s *driver,
|
|||||||
leave_critical_section(flags);
|
leave_critical_section(flags);
|
||||||
|
|
||||||
/* Perform the soft connect function so that we will we can be
|
/* Perform the soft connect function so that we will we can be
|
||||||
* re-enumerated.
|
* re-enumerated (unless we are part of a composite device)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_CDCACM_COMPOSITE
|
||||||
DEV_CONNECT(dev);
|
DEV_CONNECT(dev);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user