Hi,

Here is a patch against linux-2.6.8.1 to make usbnet works with freebox. This device is an ADSL modem which does not return a valid MAC address. CDCEther was working with it in linux-2.4 because it was not checking the MAC address.

Regards,

Guilhem Lavaux.
diff -ur -x '*.o' -x '.*.cmd' -x '*.ko' -x '*.mod.c' 
linux-2.6.8.1/drivers/usb/net/Kconfig linux-2.6.8.1.new/drivers/usb/net/Kconfig
--- linux-2.6.8.1/drivers/usb/net/Kconfig       2004-08-14 12:55:48.000000000 +0200
+++ linux-2.6.8.1.new/drivers/usb/net/Kconfig   2004-09-05 09:17:05.000000000 +0200
@@ -223,6 +223,14 @@
          to support this protocol.  Only the "eth-fd" driver really needs
          this non-conformant variant of CDC Ethernet protocol.
 
+config USB_FREEBOX
+       boolean "FreeBox USB connection support"
+       depends on USB_USBNET
+       default y
+       help
+         Choose this option to support the usb networking links used
+         by the FreeBox ADSL modem. 
+
 config USB_CDCETHER
        boolean "CDC Ethernet support (smart devices such as cable modems)"
        depends on USB_USBNET
diff -ur -x '*.o' -x '.*.cmd' -x '*.ko' -x '*.mod.c' 
linux-2.6.8.1/drivers/usb/net/usbnet.c linux-2.6.8.1.new/drivers/usb/net/usbnet.c
--- linux-2.6.8.1/drivers/usb/net/usbnet.c      2004-08-14 12:55:33.000000000 +0200
+++ linux-2.6.8.1.new/drivers/usb/net/usbnet.c  2004-09-15 07:34:50.000000000 +0200
@@ -906,6 +906,11 @@
 #define NEED_GENERIC_CDC
 #endif
 
+#ifdef  CONFIG_USB_FREEBOX
+/* Ethernet variant which does not have any MAC address */
+#define NEED_GENERIC_CDC
+#endif
+
 
 #ifdef NEED_GENERIC_CDC
 
@@ -1215,8 +1220,21 @@
        .bind =         cdc_bind,
        .unbind =       cdc_unbind,
 };
-
 #endif /* CONFIG_USB_CDCETHER */
+
+
+
+#ifdef  CONFIG_USB_FREEBOX
+#define HAVE_HARDWARE
+
+static const struct driver_info freebox_info = {
+       .description = "FreeBox Device",
+       .flags = FLAG_ETHER,
+       .bind = generic_cdc_bind,
+       .unbind = cdc_unbind,
+};
+
+#endif  /* CONFIG_USB_FREEBOX */
 
 
 
@@ -3416,6 +3434,19 @@
        // FIXME blacklist the other Zaurus models too, sigh
 #endif
 
+#ifdef CONFIG_USB_FREEBOX
+{
+       .match_flags    =   USB_DEVICE_ID_MATCH_INT_INFO
+                         | USB_DEVICE_ID_MATCH_DEVICE,
+       .idVendor               = 0x10eb,
+       .idProduct              = 0x0001,
+       .bInterfaceClass        = USB_CLASS_COMM,
+       .bInterfaceSubClass     = 6,
+       .bInterfaceProtocol     = 0,
+       .driver_info            =  (unsigned long) &freebox_info,
+},
+#endif
+
 {
        /* CDC Ether uses two interfaces, not necessarily consecutive.
         * We match the main interface, ignoring the optional device

Reply via email to