From 8f4cb0fec33d6251039461f3e52cca8ac7d19382 Mon Sep 17 00:00:00 2001 From: zhangyuan21 Date: Thu, 15 Dec 2022 13:49:54 +0800 Subject: [PATCH] rndis: add endpoint configure ep3 is not avaliable in dummy hcd, so need to make the endpoint number configurable. Signed-off-by: zhangyuan21 --- drivers/usbdev/Kconfig | 13 +++++++++++++ drivers/usbdev/rndis.c | 6 +++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/usbdev/Kconfig b/drivers/usbdev/Kconfig index e4807d47f8..c41de08f0d 100644 --- a/drivers/usbdev/Kconfig +++ b/drivers/usbdev/Kconfig @@ -1023,6 +1023,19 @@ config RNDIS_VERSIONNO default 0x0001 endif # !RNDIS_COMPOSITE + +config RNDIS_EPBULKIN + int "RNDIS bulk in endpoint number" + default 1 + +config RNDIS_EPBULKOUT + int "RNDIS bulk out endpoint number" + default 2 + +config RNDIS_EPINTIN + int "RNDIS interrupt in endpoint number" + default 3 + endif # RNDIS menuconfig DFU diff --git a/drivers/usbdev/rndis.c b/drivers/usbdev/rndis.c index 52b5e7fa49..8ca3968458 100644 --- a/drivers/usbdev/rndis.c +++ b/drivers/usbdev/rndis.c @@ -75,9 +75,9 @@ #define RNDIS_CONFIGIDNONE (0) #define RNDIS_NINTERFACES (2) -#define RNDIS_EPINTIN_ADDR USB_EPIN(3) -#define RNDIS_EPBULKIN_ADDR USB_EPIN(1) -#define RNDIS_EPBULKOUT_ADDR USB_EPOUT(2) +#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) #define RNDIS_NUM_EPS (3) #define RNDIS_MANUFACTURERSTRID (1)