rndis: do not configure endpoints from Kconfig when composite enabled

This should be done from a board specific logic, as for other composite devices
This commit is contained in:
raiden00pl 2023-03-24 13:13:04 +01:00 committed by Masayuki Ishikawa
parent 498a24cc54
commit 58e817db76
2 changed files with 13 additions and 5 deletions

View File

@ -1022,8 +1022,6 @@ config RNDIS_VERSIONNO
hex "RNDIS Version Number"
default 0x0001
endif # !RNDIS_COMPOSITE
config RNDIS_EPBULKIN
int "RNDIS bulk in endpoint number"
default 1
@ -1036,6 +1034,8 @@ config RNDIS_EPINTIN
int "RNDIS interrupt in endpoint number"
default 3
endif # !RNDIS_COMPOSITE
endif # RNDIS
menuconfig DFU

View File

@ -89,9 +89,11 @@ static_assert((CONFIG_NET_LL_GUARDSIZE % 4) == 2,
#define RNDIS_NINTERFACES (2)
#define RNDIS_NSTRIDS (0)
#define RNDIS_EPINTIN_ADDR USB_EPIN(CONFIG_RNDIS_EPINTIN)
#define RNDIS_EPBULKIN_ADDR USB_EPIN(CONFIG_RNDIS_EPBULKIN)
#define RNDIS_EPBULKOUT_ADDR USB_EPOUT(CONFIG_RNDIS_EPBULKOUT)
#ifndef CONFIG_RNDIS_COMPOSITE
# define RNDIS_EPINTIN_ADDR USB_EPIN(CONFIG_RNDIS_EPINTIN)
# define RNDIS_EPBULKIN_ADDR USB_EPIN(CONFIG_RNDIS_EPBULKIN)
# define RNDIS_EPBULKOUT_ADDR USB_EPOUT(CONFIG_RNDIS_EPBULKOUT)
#endif
#define RNDIS_NUM_EPS (3)
#define RNDIS_MANUFACTURERSTRID (1)
@ -326,7 +328,9 @@ const static struct rndis_cfgdesc_s g_rndis_cfgdesc =
{
.len = USB_SIZEOF_EPDESC,
.type = USB_DESC_TYPE_ENDPOINT,
#ifndef CONFIG_RNDIS_COMPOSITE
.addr = RNDIS_EPINTIN_ADDR,
#endif
.attr = USB_EP_ATTR_XFER_INT,
.mxpacketsize =
{
@ -348,7 +352,9 @@ const static struct rndis_cfgdesc_s g_rndis_cfgdesc =
{
.len = USB_SIZEOF_EPDESC,
.type = USB_DESC_TYPE_ENDPOINT,
#ifndef CONFIG_RNDIS_COMPOSITE
.addr = RNDIS_EPBULKIN_ADDR,
#endif
.attr = USB_EP_ATTR_XFER_BULK,
#ifdef CONFIG_USBDEV_DUALSPEED
.mxpacketsize =
@ -367,7 +373,9 @@ const static struct rndis_cfgdesc_s g_rndis_cfgdesc =
{
.len = USB_SIZEOF_EPDESC,
.type = USB_DESC_TYPE_ENDPOINT,
#ifndef CONFIG_RNDIS_COMPOSITE
.addr = RNDIS_EPBULKOUT_ADDR,
#endif
.attr = USB_EP_ATTR_XFER_BULK,
#ifdef CONFIG_USBDEV_DUALSPEED
.mxpacketsize =