Skip to content

Commit b92ce9a

Browse files
jfischer-nocarlescufi
authored andcommitted
usb: function_rndis: do not force USB_COMPOSITE_DEVICE for IAD
Just always prove interface association descriptor for RNDIS function instead of forcing it via Kconfig USB_COMPOSITE_DEVICE option. Signed-off-by: Johann Fischer <[email protected]>
1 parent 70c2511 commit b92ce9a

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

subsys/usb/class/netusb/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ config USB_DEVICE_NETWORK_EEM
2727
config USB_DEVICE_NETWORK_RNDIS
2828
bool "USB Remote NDIS (RNDIS) Networking device"
2929
select USB_DEVICE_NETWORK
30-
select USB_COMPOSITE_DEVICE
3130
help
3231
Remote NDIS (RNDIS) is commonly used Microsoft vendor protocol with
3332
Specification available from Microsoft web site.

subsys/usb/class/netusb/function_rndis.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ static K_KERNEL_STACK_DEFINE(cmd_stack, 2048);
4444
static struct k_thread cmd_thread_data;
4545

4646
struct usb_rndis_config {
47-
#ifdef CONFIG_USB_COMPOSITE_DEVICE
4847
struct usb_association_descriptor iad;
49-
#endif
5048
struct usb_if_descriptor if0;
5149
struct cdc_header_descriptor if0_header;
5250
struct cdc_cm_descriptor if0_cm;
@@ -60,7 +58,6 @@ struct usb_rndis_config {
6058
} __packed;
6159

6260
USBD_CLASS_DESCR_DEFINE(primary, 0) struct usb_rndis_config rndis_cfg = {
63-
#ifdef CONFIG_USB_COMPOSITE_DEVICE
6461
.iad = {
6562
.bLength = sizeof(struct usb_association_descriptor),
6663
.bDescriptorType = USB_DESC_INTERFACE_ASSOC,
@@ -71,7 +68,6 @@ USBD_CLASS_DESCR_DEFINE(primary, 0) struct usb_rndis_config rndis_cfg = {
7168
.bFunctionProtocol = 0,
7269
.iFunction = 0,
7370
},
74-
#endif
7571
/* Interface descriptor 0 */
7672
/* CDC Communication interface */
7773
.if0 = {
@@ -1159,9 +1155,7 @@ static void netusb_interface_config(struct usb_desc_header *head,
11591155
rndis_cfg.if0_union.bControlInterface = bInterfaceNumber;
11601156
rndis_cfg.if0_union.bSubordinateInterface0 = bInterfaceNumber + 1;
11611157
rndis_cfg.if1.bInterfaceNumber = bInterfaceNumber + 1;
1162-
#ifdef CONFIG_USB_COMPOSITE_DEVICE
11631158
rndis_cfg.iad.bFirstInterface = bInterfaceNumber;
1164-
#endif
11651159
}
11661160

11671161
USBD_CFG_DATA_DEFINE(primary, netusb) struct usb_cfg_data netusb_config = {

0 commit comments

Comments
 (0)