Commit b92ce9a6 authored by Johann Fischer's avatar Johann Fischer Committed by Carles Cufi
Browse files

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: default avatarJohann Fischer <johann.fischer@nordicsemi.no>
parent 70c25119
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ config USB_DEVICE_NETWORK_EEM
config USB_DEVICE_NETWORK_RNDIS
	bool "USB Remote NDIS (RNDIS) Networking device"
	select USB_DEVICE_NETWORK
	select USB_COMPOSITE_DEVICE
	help
	  Remote NDIS (RNDIS) is commonly used Microsoft vendor protocol with
	  Specification available from Microsoft web site.
+0 −6
Original line number Diff line number Diff line
@@ -44,9 +44,7 @@ static K_KERNEL_STACK_DEFINE(cmd_stack, 2048);
static struct k_thread cmd_thread_data;

struct usb_rndis_config {
#ifdef CONFIG_USB_COMPOSITE_DEVICE
	struct usb_association_descriptor iad;
#endif
	struct usb_if_descriptor if0;
	struct cdc_header_descriptor if0_header;
	struct cdc_cm_descriptor if0_cm;
@@ -60,7 +58,6 @@ struct usb_rndis_config {
} __packed;

USBD_CLASS_DESCR_DEFINE(primary, 0) struct usb_rndis_config rndis_cfg = {
#ifdef CONFIG_USB_COMPOSITE_DEVICE
	.iad = {
		.bLength = sizeof(struct usb_association_descriptor),
		.bDescriptorType = USB_DESC_INTERFACE_ASSOC,
@@ -71,7 +68,6 @@ USBD_CLASS_DESCR_DEFINE(primary, 0) struct usb_rndis_config rndis_cfg = {
		.bFunctionProtocol = 0,
		.iFunction = 0,
	},
#endif
	/* Interface descriptor 0 */
	/* CDC Communication interface */
	.if0 = {
@@ -1159,9 +1155,7 @@ static void netusb_interface_config(struct usb_desc_header *head,
	rndis_cfg.if0_union.bControlInterface = bInterfaceNumber;
	rndis_cfg.if0_union.bSubordinateInterface0 = bInterfaceNumber + 1;
	rndis_cfg.if1.bInterfaceNumber = bInterfaceNumber + 1;
#ifdef CONFIG_USB_COMPOSITE_DEVICE
	rndis_cfg.iad.bFirstInterface = bInterfaceNumber;
#endif
}

USBD_CFG_DATA_DEFINE(primary, netusb) struct usb_cfg_data netusb_config = {