Discussion:
[Synce-devel] usb-rndis & kernel >= 2.6.18
Martin Haaß
2006-11-10 09:27:29 UTC
Permalink
Hi list,
while trying to compile the usb-rndis driver i found out the usb_cdc header
was moved from include/linux/ to include/linux/usb/
I believe the move happened with kernel release 2.6.18 but i' not sure. Anyway
here is a patch which conditionally changes the include:

diff -u usb-rndis/cdc_ether.c usb-rndis.neu/cdc_ether.c
--- usb-rndis/cdc_ether.c 2006-11-10 09:50:34.000000000 +0100
+++ usb-rndis.neu/cdc_ether.c 2006-11-10 09:47:56.000000000 +0100
@@ -32,7 +32,15 @@
#include <linux/workqueue.h>
#include <linux/mii.h>
#include <linux/usb.h>
-#include <linux/usb_cdc.h>
+
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
+ #include <linux/usb/cdc.h>
+#else
+ #include <linux/usb_cdc.h>
+#endif
+
+

#include "usbnet.h"

diff -u usb-rndis/rndis_host.c usb-rndis.neu/rndis_host.c
--- usb-rndis/rndis_host.c 2006-11-10 09:50:34.000000000 +0100
+++ usb-rndis.neu/rndis_host.c 2006-11-10 09:48:14.000000000 +0100
@@ -32,7 +32,13 @@
#include <linux/workqueue.h>
#include <linux/mii.h>
#include <linux/usb.h>
-#include <linux/usb_cdc.h>
+
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
+ #include <linux/usb/cdc.h>
+#else
+ #include <linux/usb_cdc.h>
+#endif

#include "ndis.h"
#include "usbnet.h"

Hope this helps
Martin
David Eriksson
2006-11-10 17:21:34 UTC
Permalink
Post by Martin Haaß
Hi list,
while trying to compile the usb-rndis driver i found out the usb_cdc header
was moved from include/linux/ to include/linux/usb/
I believe the move happened with kernel release 2.6.18 but i' not sure. Anyway
Thanks a lot! I've commited the patch!

\David

http://www.2good.nu -- http://www.ppconsulting.se

Loading...