Skip to contentSkip to conversation

USB config selection for RNDIS devices

PATCH New Ingo van Lil 1 participant 1 message Mar 27, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 USB config selection for RNDIS devices

Hi there,

the USB configuration selection code in drivers/usb/core/generic.c will refuse to use an RNDIS-only device if the RNDIS driver is compiled as a module. The straightforward solution would be to change the #ifndef test to include CONFIG_USB_NET_RNDIS_HOST_MODULE as well, but I'd rather suggest to drop the entire check instead. That way the RNDIS-case will be treated just like a vendor-specific configuration: It will be chosen only if no better choice (e.g. CDC) can be found.

Cheers,
Ingo

---

usb/core/generic.c renamed from usb/core/generic.c.orig +2 -6
@@ -88,17 +88,13 @@
 		}
 
 		/* If the first config's first interface is COMM/2/0xff
-		 * (MSFT RNDIS), rule it out unless Linux has host-side
-		 * RNDIS support. */
+		 * (MSFT RNDIS), select it but keep scanning something
+		 * better (ideally a CDC ethernet interface). */
 		if (i == 0 && desc
 				&& desc->bInterfaceClass == USB_CLASS_COMM
 				&& desc->bInterfaceSubClass == 2
 				&& desc->bInterfaceProtocol == 0xff) {
-#ifndef CONFIG_USB_NET_RNDIS_HOST
-			continue;
-#else
 			best = c;
-#endif
 		}
 
 		/* From the remaining configs, choose the first one whose