2009-12-22 15:21:19

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 0/5] compat: Build fixes for compat-wireless

Some fixes for compat.git and compat-wireless.git
Build test for kernel 2.6.27 to 2.6.33 was successfull.
For kernel 2.6.25 and 2.6.26 debugfs_remove_recursive is still missing.

PS: The last compat-wireless package at
http://wireless.kernel.org/download/compat-wireless-2.6/ is 2009-12-11.

--
Hauke

---
Hauke Mehrtens (2):
compat: Backport pcmcia from 2.6.33
compat: autoconf.h moved from linux/ to generated/ with kernel 2.6.33

compat/Makefile | 1 +
compat/compat-2.6.33.c | 130 +++++++++++++++++++++++++++++++++++++++++
include/linux/compat-2.6.14.h | 3 +-
include/linux/compat-2.6.18.h | 3 +-
include/linux/compat-2.6.19.h | 2 +-
include/linux/compat-2.6.21.h | 2 +-
include/linux/compat-2.6.22.h | 2 +-
include/linux/compat-2.6.23.h | 2 +-
include/linux/compat-2.6.24.h | 3 +-
include/linux/compat-2.6.25.h | 2 +-
include/linux/compat-2.6.26.h | 2 +-
include/linux/compat-2.6.27.h | 2 +-
include/linux/compat-2.6.28.h | 2 +-
include/linux/compat-2.6.29.h | 2 +-
include/linux/compat-2.6.30.h | 3 +-
include/linux/compat-2.6.31.h | 2 +-
include/linux/compat-2.6.32.h | 2 +-
include/linux/compat-2.6.33.h | 25 +++++++-
include/linux/compat-2.6.h | 6 ++-


Hauke Mehrtens (3):
compat-wireless: Activate ssb and libertas
compat-wireless: activate usbnet for kernel > 2.6.28
compat-wireless: Add more functions into netdev oops backport

Makefile | 4 +--
config.mk | 17 +++++++--
patches/01-netdev.patch | 28 +++++++++++++--
patches/18-rename-usb-net-symbols.patch | 58 +++++++++++++++++++++++++++++++
patches/99-change-makefiles.patch | 21 +++++------
scripts/admin-update.sh | 8 ++--
6 files changed, 109 insertions(+), 27 deletions(-)
create mode 100644 patches/18-rename-usb-net-symbols.patch



2009-12-22 15:21:28

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 2/2] compat: autoconf.h moved from linux/ to generated/ with kernel 2.6.33

Changed the headers, because autoconf.h moved from linux/ into generated/

Signed-off-by: Hauke Mehrtens <[email protected]>
---
include/linux/compat-2.6.14.h | 3 ++-
include/linux/compat-2.6.18.h | 3 ++-
include/linux/compat-2.6.19.h | 2 +-
include/linux/compat-2.6.21.h | 2 +-
include/linux/compat-2.6.22.h | 2 +-
include/linux/compat-2.6.23.h | 2 +-
include/linux/compat-2.6.24.h | 3 ++-
include/linux/compat-2.6.25.h | 2 +-
include/linux/compat-2.6.26.h | 2 +-
include/linux/compat-2.6.27.h | 2 +-
include/linux/compat-2.6.28.h | 2 +-
include/linux/compat-2.6.29.h | 2 +-
include/linux/compat-2.6.30.h | 3 ++-
include/linux/compat-2.6.31.h | 2 +-
include/linux/compat-2.6.32.h | 2 +-
include/linux/compat-2.6.33.h | 4 ++--
include/linux/compat-2.6.h | 6 +++++-
17 files changed, 26 insertions(+), 18 deletions(-)

diff --git a/include/linux/compat-2.6.14.h b/include/linux/compat-2.6.14.h
index 22e7e31..c509899 100644
--- a/include/linux/compat-2.6.14.h
+++ b/include/linux/compat-2.6.14.h
@@ -1,12 +1,13 @@
#ifndef LINUX_26_14_COMPAT_H
#define LINUX_26_14_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

/* Compat work for 2.6.14 */
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14))

+#include <linux/autoconf.h>
+
typedef unsigned int gfp_t;

#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)) */
diff --git a/include/linux/compat-2.6.18.h b/include/linux/compat-2.6.18.h
index 3245c42..ef0dd31 100644
--- a/include/linux/compat-2.6.18.h
+++ b/include/linux/compat-2.6.18.h
@@ -1,12 +1,13 @@
#ifndef LINUX_26_18_COMPAT_H
#define LINUX_26_18_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

/* Compat work for 2.6.18 */
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18))

+#include <linux/autoconf.h>
+
#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))

#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)) */
diff --git a/include/linux/compat-2.6.19.h b/include/linux/compat-2.6.19.h
index 017044c..67f87fc 100644
--- a/include/linux/compat-2.6.19.h
+++ b/include/linux/compat-2.6.19.h
@@ -1,12 +1,12 @@
#ifndef LINUX_26_19_COMPAT_H
#define LINUX_26_19_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

/* Compat work for 2.6.19 */
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19))

+#include <linux/autoconf.h>
#include <linux/slab.h>

static inline int
diff --git a/include/linux/compat-2.6.21.h b/include/linux/compat-2.6.21.h
index 263ebd2..25ac354 100644
--- a/include/linux/compat-2.6.21.h
+++ b/include/linux/compat-2.6.21.h
@@ -1,12 +1,12 @@
#ifndef LINUX_26_21_COMPAT_H
#define LINUX_26_21_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

/* Compat work for 2.6.21 */
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21))

+#include <linux/autoconf.h>
#include <linux/sysctl.h>

#define register_sysctl_table(table) \
diff --git a/include/linux/compat-2.6.22.h b/include/linux/compat-2.6.22.h
index 85cd9d5..42dc805 100644
--- a/include/linux/compat-2.6.22.h
+++ b/include/linux/compat-2.6.22.h
@@ -1,12 +1,12 @@
#ifndef LINUX_26_22_COMPAT_H
#define LINUX_26_22_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

/* Compat work for 2.6.21 */
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22))

+#include <linux/autoconf.h>
#include <linux/pci.h>
#include <linux/skbuff.h>

diff --git a/include/linux/compat-2.6.23.h b/include/linux/compat-2.6.23.h
index c36f90d..c73b77f 100644
--- a/include/linux/compat-2.6.23.h
+++ b/include/linux/compat-2.6.23.h
@@ -1,12 +1,12 @@
#ifndef LINUX_26_23_COMPAT_H
#define LINUX_26_23_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

/* Compat work for < 2.6.23 */
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23))

+#include <linux/autoconf.h>
#include <linux/netdevice.h>
#include <linux/sched.h>
#include <linux/workqueue.h>
diff --git a/include/linux/compat-2.6.24.h b/include/linux/compat-2.6.24.h
index 43e6302..91a3b85 100644
--- a/include/linux/compat-2.6.24.h
+++ b/include/linux/compat-2.6.24.h
@@ -1,12 +1,13 @@
#ifndef LINUX_26_24_COMPAT_H
#define LINUX_26_24_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

/* Compat work for 2.6.21, 2.6.22 and 2.6.23 */
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))

+#include <linux/autoconf.h>
+
/* Added on 2.6.24 in include/linux/types.h by Al viro on commit 142956af */
typedef unsigned long uintptr_t;

diff --git a/include/linux/compat-2.6.25.h b/include/linux/compat-2.6.25.h
index 23cf487..7477cb6 100644
--- a/include/linux/compat-2.6.25.h
+++ b/include/linux/compat-2.6.25.h
@@ -1,12 +1,12 @@
#ifndef LINUX_26_25_COMPAT_H
#define LINUX_26_25_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

/* Compat work for 2.6.24 */
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25))

+#include <linux/autoconf.h>
#include <linux/types.h>
#include <linux/io.h>
#include <linux/hw_random.h>
diff --git a/include/linux/compat-2.6.26.h b/include/linux/compat-2.6.26.h
index b7c3b05..143df3b 100644
--- a/include/linux/compat-2.6.26.h
+++ b/include/linux/compat-2.6.26.h
@@ -1,11 +1,11 @@
#ifndef LINUX_26_26_COMPAT_H
#define LINUX_26_26_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26))

+#include <linux/autoconf.h>
#include <linux/device.h>
#include <linux/list.h>
#include <linux/kernel.h>
diff --git a/include/linux/compat-2.6.27.h b/include/linux/compat-2.6.27.h
index ed10a6c..f77bb7b 100644
--- a/include/linux/compat-2.6.27.h
+++ b/include/linux/compat-2.6.27.h
@@ -1,11 +1,11 @@
#ifndef LINUX_26_27_COMPAT_H
#define LINUX_26_27_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27))

+#include <linux/autoconf.h>
#include <linux/list.h>
#include <linux/pci.h>
#include <linux/dma-mapping.h>
diff --git a/include/linux/compat-2.6.28.h b/include/linux/compat-2.6.28.h
index 8f90edc..700eab6 100644
--- a/include/linux/compat-2.6.28.h
+++ b/include/linux/compat-2.6.28.h
@@ -1,11 +1,11 @@
#ifndef LINUX_26_28_COMPAT_H
#define LINUX_26_28_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28))

+#include <linux/autoconf.h>
#include <linux/skbuff.h>
#include <linux/if_ether.h>
#include <linux/usb.h>
diff --git a/include/linux/compat-2.6.29.h b/include/linux/compat-2.6.29.h
index cad5e6b..b3c9dc2 100644
--- a/include/linux/compat-2.6.29.h
+++ b/include/linux/compat-2.6.29.h
@@ -1,11 +1,11 @@
#ifndef LINUX_26_29_COMPAT_H
#define LINUX_26_29_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29))

+#include <linux/autoconf.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/usb.h>
diff --git a/include/linux/compat-2.6.30.h b/include/linux/compat-2.6.30.h
index 2ff1d69..f0074d8 100644
--- a/include/linux/compat-2.6.30.h
+++ b/include/linux/compat-2.6.30.h
@@ -1,11 +1,12 @@
#ifndef LINUX_26_30_COMPAT_H
#define LINUX_26_30_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))

+#include <linux/autoconf.h>
+
#ifndef TP_PROTO
#define TP_PROTO(args...) TPPROTO(args)
#endif
diff --git a/include/linux/compat-2.6.31.h b/include/linux/compat-2.6.31.h
index 27dc6a1..d51e9e2 100644
--- a/include/linux/compat-2.6.31.h
+++ b/include/linux/compat-2.6.31.h
@@ -1,11 +1,11 @@
#ifndef LINUX_26_31_COMPAT_H
#define LINUX_26_31_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31))

+#include <linux/autoconf.h>
#include <linux/skbuff.h>
#include <linux/workqueue.h>
#include <linux/interrupt.h>
diff --git a/include/linux/compat-2.6.32.h b/include/linux/compat-2.6.32.h
index 727ac71..a6ed8c4 100644
--- a/include/linux/compat-2.6.32.h
+++ b/include/linux/compat-2.6.32.h
@@ -1,11 +1,11 @@
#ifndef LINUX_26_32_COMPAT_H
#define LINUX_26_32_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32))

+#include <linux/autoconf.h>
#include <linux/netdevice.h>
#include <asm/compat.h>
#include <net/iw_handler.h>
diff --git a/include/linux/compat-2.6.33.h b/include/linux/compat-2.6.33.h
index 5367cd9..a453a7e 100644
--- a/include/linux/compat-2.6.33.h
+++ b/include/linux/compat-2.6.33.h
@@ -1,12 +1,12 @@
#ifndef LINUX_26_33_COMPAT_H
#define LINUX_26_33_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>
-#include <linux/compat_autoconf.h>

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))

+#include <linux/autoconf.h>
+#include <linux/compat_autoconf.h>
#include <linux/skbuff.h>
#include <pcmcia/cs_types.h>
#include <pcmcia/cistpl.h>
diff --git a/include/linux/compat-2.6.h b/include/linux/compat-2.6.h
index bea00c9..81224de 100644
--- a/include/linux/compat-2.6.h
+++ b/include/linux/compat-2.6.h
@@ -1,8 +1,12 @@
#ifndef LINUX_26_COMPAT_H
#define LINUX_26_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
+#include <generated/autoconf.h>
+#else
+#include <linux/autoconf.h>
+#endif
#include <linux/compat_autoconf.h>

/*
--
1.6.3.3


2009-12-22 16:03:34

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [PATCH 2/2] compat: autoconf.h moved from linux/ to generated/ with kernel 2.6.33

On Tue, Dec 22, 2009 at 7:20 AM, Hauke Mehrtens <[email protected]> wrote:
> Changed the headers, because autoconf.h moved from linux/ into generated/
>
> Signed-off-by: Hauke Mehrtens <[email protected]>
> ---
>  include/linux/compat-2.6.14.h |    3 ++-
>  include/linux/compat-2.6.18.h |    3 ++-
>  include/linux/compat-2.6.19.h |    2 +-
>  include/linux/compat-2.6.21.h |    2 +-
>  include/linux/compat-2.6.22.h |    2 +-
>  include/linux/compat-2.6.23.h |    2 +-
>  include/linux/compat-2.6.24.h |    3 ++-
>  include/linux/compat-2.6.25.h |    2 +-
>  include/linux/compat-2.6.26.h |    2 +-
>  include/linux/compat-2.6.27.h |    2 +-
>  include/linux/compat-2.6.28.h |    2 +-
>  include/linux/compat-2.6.29.h |    2 +-
>  include/linux/compat-2.6.30.h |    3 ++-
>  include/linux/compat-2.6.31.h |    2 +-
>  include/linux/compat-2.6.32.h |    2 +-
>  include/linux/compat-2.6.33.h |    4 ++--
>  include/linux/compat-2.6.h    |    6 +++++-
>  17 files changed, 26 insertions(+), 18 deletions(-)
>
> diff --git a/include/linux/compat-2.6.14.h b/include/linux/compat-2.6.14.h
> index 22e7e31..c509899 100644
> --- a/include/linux/compat-2.6.14.h
> +++ b/include/linux/compat-2.6.14.h
> @@ -1,12 +1,13 @@
>  #ifndef LINUX_26_14_COMPAT_H
>  #define LINUX_26_14_COMPAT_H
>
> -#include <linux/autoconf.h>
>  #include <linux/version.h>
>
>  /* Compat work for 2.6.14 */
>  #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14))
>
> +#include <linux/autoconf.h>
> +

Would it not suffice if we just handle this on compat.h?

Luis

2009-12-23 00:53:27

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 2/2] compat: autoconf.h moved from linux/ to generated/ with kernel 2.6.33

Changed the headers, because autoconf.h moved from linux/ into generated/

Signed-off-by: Hauke Mehrtens <[email protected]>

v2:
- remove linux/autoconf.h from compat-2.6.XX.h. It is already included by compat-2.6.h
---
include/linux/compat-2.6.14.h | 1 -
include/linux/compat-2.6.18.h | 1 -
include/linux/compat-2.6.19.h | 1 -
include/linux/compat-2.6.21.h | 1 -
include/linux/compat-2.6.22.h | 1 -
include/linux/compat-2.6.23.h | 1 -
include/linux/compat-2.6.24.h | 1 -
include/linux/compat-2.6.25.h | 1 -
include/linux/compat-2.6.26.h | 1 -
include/linux/compat-2.6.27.h | 1 -
include/linux/compat-2.6.28.h | 1 -
include/linux/compat-2.6.29.h | 1 -
include/linux/compat-2.6.30.h | 1 -
include/linux/compat-2.6.31.h | 1 -
include/linux/compat-2.6.32.h | 1 -
include/linux/compat-2.6.33.h | 2 --
include/linux/compat-2.6.h | 6 +++++-
17 files changed, 5 insertions(+), 18 deletions(-)

diff --git a/include/linux/compat-2.6.14.h b/include/linux/compat-2.6.14.h
index 22e7e31..1f19f7f 100644
--- a/include/linux/compat-2.6.14.h
+++ b/include/linux/compat-2.6.14.h
@@ -1,7 +1,6 @@
#ifndef LINUX_26_14_COMPAT_H
#define LINUX_26_14_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

/* Compat work for 2.6.14 */
diff --git a/include/linux/compat-2.6.18.h b/include/linux/compat-2.6.18.h
index 3245c42..5e0182b 100644
--- a/include/linux/compat-2.6.18.h
+++ b/include/linux/compat-2.6.18.h
@@ -1,7 +1,6 @@
#ifndef LINUX_26_18_COMPAT_H
#define LINUX_26_18_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

/* Compat work for 2.6.18 */
diff --git a/include/linux/compat-2.6.19.h b/include/linux/compat-2.6.19.h
index 017044c..1e648c0 100644
--- a/include/linux/compat-2.6.19.h
+++ b/include/linux/compat-2.6.19.h
@@ -1,7 +1,6 @@
#ifndef LINUX_26_19_COMPAT_H
#define LINUX_26_19_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

/* Compat work for 2.6.19 */
diff --git a/include/linux/compat-2.6.21.h b/include/linux/compat-2.6.21.h
index 263ebd2..89ed6d9 100644
--- a/include/linux/compat-2.6.21.h
+++ b/include/linux/compat-2.6.21.h
@@ -1,7 +1,6 @@
#ifndef LINUX_26_21_COMPAT_H
#define LINUX_26_21_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

/* Compat work for 2.6.21 */
diff --git a/include/linux/compat-2.6.22.h b/include/linux/compat-2.6.22.h
index 85cd9d5..7ca1b18 100644
--- a/include/linux/compat-2.6.22.h
+++ b/include/linux/compat-2.6.22.h
@@ -1,7 +1,6 @@
#ifndef LINUX_26_22_COMPAT_H
#define LINUX_26_22_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

/* Compat work for 2.6.21 */
diff --git a/include/linux/compat-2.6.23.h b/include/linux/compat-2.6.23.h
index c36f90d..0b791b0 100644
--- a/include/linux/compat-2.6.23.h
+++ b/include/linux/compat-2.6.23.h
@@ -1,7 +1,6 @@
#ifndef LINUX_26_23_COMPAT_H
#define LINUX_26_23_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

/* Compat work for < 2.6.23 */
diff --git a/include/linux/compat-2.6.24.h b/include/linux/compat-2.6.24.h
index 43e6302..58655f6 100644
--- a/include/linux/compat-2.6.24.h
+++ b/include/linux/compat-2.6.24.h
@@ -1,7 +1,6 @@
#ifndef LINUX_26_24_COMPAT_H
#define LINUX_26_24_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

/* Compat work for 2.6.21, 2.6.22 and 2.6.23 */
diff --git a/include/linux/compat-2.6.25.h b/include/linux/compat-2.6.25.h
index 23cf487..c645d39 100644
--- a/include/linux/compat-2.6.25.h
+++ b/include/linux/compat-2.6.25.h
@@ -1,7 +1,6 @@
#ifndef LINUX_26_25_COMPAT_H
#define LINUX_26_25_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

/* Compat work for 2.6.24 */
diff --git a/include/linux/compat-2.6.26.h b/include/linux/compat-2.6.26.h
index b7c3b05..af653a9 100644
--- a/include/linux/compat-2.6.26.h
+++ b/include/linux/compat-2.6.26.h
@@ -1,7 +1,6 @@
#ifndef LINUX_26_26_COMPAT_H
#define LINUX_26_26_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26))
diff --git a/include/linux/compat-2.6.27.h b/include/linux/compat-2.6.27.h
index ed10a6c..64531a6 100644
--- a/include/linux/compat-2.6.27.h
+++ b/include/linux/compat-2.6.27.h
@@ -1,7 +1,6 @@
#ifndef LINUX_26_27_COMPAT_H
#define LINUX_26_27_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27))
diff --git a/include/linux/compat-2.6.28.h b/include/linux/compat-2.6.28.h
index 8f90edc..9cd4ae8 100644
--- a/include/linux/compat-2.6.28.h
+++ b/include/linux/compat-2.6.28.h
@@ -1,7 +1,6 @@
#ifndef LINUX_26_28_COMPAT_H
#define LINUX_26_28_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28))
diff --git a/include/linux/compat-2.6.29.h b/include/linux/compat-2.6.29.h
index cad5e6b..8a968fa 100644
--- a/include/linux/compat-2.6.29.h
+++ b/include/linux/compat-2.6.29.h
@@ -1,7 +1,6 @@
#ifndef LINUX_26_29_COMPAT_H
#define LINUX_26_29_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29))
diff --git a/include/linux/compat-2.6.30.h b/include/linux/compat-2.6.30.h
index 2ff1d69..f997d86 100644
--- a/include/linux/compat-2.6.30.h
+++ b/include/linux/compat-2.6.30.h
@@ -1,7 +1,6 @@
#ifndef LINUX_26_30_COMPAT_H
#define LINUX_26_30_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
diff --git a/include/linux/compat-2.6.31.h b/include/linux/compat-2.6.31.h
index 27dc6a1..54ddefd 100644
--- a/include/linux/compat-2.6.31.h
+++ b/include/linux/compat-2.6.31.h
@@ -1,7 +1,6 @@
#ifndef LINUX_26_31_COMPAT_H
#define LINUX_26_31_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31))
diff --git a/include/linux/compat-2.6.32.h b/include/linux/compat-2.6.32.h
index 727ac71..c3e4dbe 100644
--- a/include/linux/compat-2.6.32.h
+++ b/include/linux/compat-2.6.32.h
@@ -1,7 +1,6 @@
#ifndef LINUX_26_32_COMPAT_H
#define LINUX_26_32_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32))
diff --git a/include/linux/compat-2.6.33.h b/include/linux/compat-2.6.33.h
index 5367cd9..9bb0dbb 100644
--- a/include/linux/compat-2.6.33.h
+++ b/include/linux/compat-2.6.33.h
@@ -1,9 +1,7 @@
#ifndef LINUX_26_33_COMPAT_H
#define LINUX_26_33_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>
-#include <linux/compat_autoconf.h>

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))

diff --git a/include/linux/compat-2.6.h b/include/linux/compat-2.6.h
index bea00c9..81224de 100644
--- a/include/linux/compat-2.6.h
+++ b/include/linux/compat-2.6.h
@@ -1,8 +1,12 @@
#ifndef LINUX_26_COMPAT_H
#define LINUX_26_COMPAT_H

-#include <linux/autoconf.h>
#include <linux/version.h>
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
+#include <generated/autoconf.h>
+#else
+#include <linux/autoconf.h>
+#endif
#include <linux/compat_autoconf.h>

/*
--
1.6.3.3


2009-12-22 15:21:23

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 1/3] compat-wireless: Activate ssb and libertas

Pcmcia is backported now. So activate ssb and libertas again.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
Makefile | 4 +---
config.mk | 2 +-
patches/99-change-makefiles.patch | 13 +++++--------
scripts/admin-update.sh | 8 ++++----
4 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/Makefile b/Makefile
index d197202..0e352d7 100644
--- a/Makefile
+++ b/Makefile
@@ -30,9 +30,7 @@ obj-$(CONFIG_COMPAT_BLUETOOTH) += net/bluetooth/
obj-$(CONFIG_COMPAT_BLUETOOTH_MODULES) += drivers/bluetooth/

obj-$(CONFIG_COMPAT_NETWORK_MODULES) += drivers/net/
-obj-$(CONFIG_COMPAT_VAR_MODULES) += drivers/misc/eeprom/
-# Sorry ssb requires pcmica backport for 2.6.33 which is not done yet
-# drivers/ssb/
+obj-$(CONFIG_COMPAT_VAR_MODULES) += drivers/ssb/ drivers/misc/eeprom/

else

diff --git a/config.mk b/config.mk
index 726130f..873660d 100644
--- a/config.mk
+++ b/config.mk
@@ -45,7 +45,7 @@ endif
# as I suspect all users of this package want 802.11e (WME) and
# 802.11n (HT) support.
ifneq ($(wildcard $(KLIB_BUILD)/Makefile),)
-COMPAT_LATEST_VERSION = 32
+COMPAT_LATEST_VERSION = 33
KERNEL_SUBLEVEL := $(shell $(MAKE) -C $(KLIB_BUILD) kernelversion | sed -n 's/^2\.6\.\([0-9]\+\).*/\1/p')
COMPAT_VERSIONS := $(shell I=$(COMPAT_LATEST_VERSION); while [ "$$I" -gt $(KERNEL_SUBLEVEL) ]; do echo $$I; I=$$(($$I - 1)); done)
$(foreach ver,$(COMPAT_VERSIONS),$(eval CONFIG_COMPAT_KERNEL_$(ver)=y))
diff --git a/patches/99-change-makefiles.patch b/patches/99-change-makefiles.patch
index 35beaa8..3185040 100644
--- a/patches/99-change-makefiles.patch
+++ b/patches/99-change-makefiles.patch
@@ -40,7 +40,7 @@ only the wireless stuff.

--- a/drivers/net/wireless/Makefile 2009-12-10 22:57:15.000000000 -0800
+++ b/drivers/net/wireless/Makefile 2009-12-10 22:57:16.000000000 -0800
-@@ -5,36 +5,14 @@
+@@ -5,33 +5,16 @@
obj-$(CONFIG_IPW2100) += ipw2x00/
obj-$(CONFIG_IPW2200) += ipw2x00/

@@ -58,8 +58,8 @@ only the wireless stuff.
-obj-$(CONFIG_PRISM54) += prism54/
-
-obj-$(CONFIG_HOSTAP) += hostap/
--obj-$(CONFIG_B43) += b43/
--obj-$(CONFIG_B43LEGACY) += b43legacy/
+ obj-$(CONFIG_B43) += b43/
+ obj-$(CONFIG_B43LEGACY) += b43legacy/
obj-$(CONFIG_ZD1211RW) += zd1211rw/
obj-$(CONFIG_RTL8180) += rtl818x/
obj-$(CONFIG_RTL8187) += rtl818x/
@@ -71,12 +71,9 @@ only the wireless stuff.
obj-$(CONFIG_USB_NET_RNDIS_WLAN) += rndis_wlan.o

-obj-$(CONFIG_USB_ZD1201) += zd1201.o
--obj-$(CONFIG_LIBERTAS) += libertas/
--
--obj-$(CONFIG_LIBERTAS_THINFIRM) += libertas_tf/
-
- obj-$(CONFIG_ADM8211) += adm8211.o
+ obj-$(CONFIG_LIBERTAS) += libertas/

+ obj-$(CONFIG_LIBERTAS_THINFIRM) += libertas_tf/
--- a/net/wireless/Makefile 2009-10-06 13:00:59.000000000 -0400
+++ b/net/wireless/Makefile 2009-10-06 13:00:59.000000000 -0400
@@ -4,11 +4,6 @@
diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh
index 500fe07..9f0278b 100755
--- a/scripts/admin-update.sh
+++ b/scripts/admin-update.sh
@@ -98,9 +98,9 @@ DRIVERS="$DRIVERS drivers/net/wireless/wl12xx"
DRIVERS="$DRIVERS drivers/net/wireless/iwmc3200wifi"

# Ethernet drivers
-DRIVERS="$DRIVERS drivers/net/atl1c/"
-DRIVERS="$DRIVERS drivers/net/atl1e/"
-DRIVERS="$DRIVERS drivers/net/atlx/"
+DRIVERS="$DRIVERS drivers/net/atl1c"
+DRIVERS="$DRIVERS drivers/net/atl1e"
+DRIVERS="$DRIVERS drivers/net/atlx"

# Bluetooth drivers
DRIVERS_BT="drivers/bluetooth"
@@ -203,7 +203,7 @@ DIR="drivers/net"
echo > $DIR/Makefile
cp $GIT_TREE/$DIR/b44.[ch] $DIR
# Not yet
-#echo "obj-\$(CONFIG_B44) += b44.o" >> $DIR/Makefile
+echo "obj-\$(CONFIG_B44) += b44.o" >> $DIR/Makefile
echo "obj-\$(CONFIG_ATL1) += atlx/" >> $DIR/Makefile
echo "obj-\$(CONFIG_ATL2) += atlx/" >> $DIR/Makefile
echo "obj-\$(CONFIG_ATL1E) += atl1e/" >> $DIR/Makefile
--
1.6.3.3


2009-12-22 15:21:30

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 2/3] compat-wireless: activate usbnet for kernel > 2.6.28

Activate CONFIG_COMPAT_NET_USB_MODULES if the normal wireless system is build.
For kernel <= 2.6.28 usb_autopm_put_interface_async and usb_autopm_get_interface_async needs to be backported.
The new functions are used since commit 69ee472f2706371ca639de49b06df91615c07d8d in linux mainline.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
config.mk | 15 ++++++--
patches/18-rename-usb-net-symbols.patch | 58 +++++++++++++++++++++++++++++++
patches/99-change-makefiles.patch | 8 ++--
3 files changed, 74 insertions(+), 7 deletions(-)
create mode 100644 patches/18-rename-usb-net-symbols.patch

diff --git a/config.mk b/config.mk
index 873660d..3972e7a 100644
--- a/config.mk
+++ b/config.mk
@@ -30,6 +30,7 @@ else
# 2.6.27. But -- we could just disable those drivers from kernels
# older than 2.6.27
CONFIG_COMPAT_NETWORK_MODULES=m
+ CONFIG_COMPAT_NET_USB_MODULES=m
endif

ifeq ($(CONFIG_BT),y)
@@ -338,9 +339,17 @@ CONFIG_ZD1211RW=m
# is only wireless RNDIS chip known to date.
# Note: this depends on CONFIG_USB_NET_RNDIS_HOST and CONFIG_USB_NET_CDCETHER
# it also requires new RNDIS_HOST and CDC_ETHER modules which we add
-CONFIG_USB_NET_RNDIS_HOST=m
-CONFIG_USB_NET_RNDIS_WLAN=m
-CONFIG_USB_NET_CDCETHER=m
+ifdef CONFIG_COMPAT_KERNEL_29
+CONFIG_USB_COMPAT_USBNET=n
+CONFIG_USB_NET_COMPAT_RNDIS_HOST=n
+CONFIG_USB_NET_COMPAT_RNDIS_WLAN=n
+CONFIG_USB_NET_COMPAT_CDCETHER=n
+else
+CONFIG_USB_COMPAT_USBNET=m
+CONFIG_USB_NET_COMPAT_RNDIS_HOST=m
+CONFIG_USB_NET_COMPAT_RNDIS_WLAN=m
+CONFIG_USB_NET_COMPAT_CDCETHER=m
+endif


CONFIG_P54_USB=m
diff --git a/patches/18-rename-usb-net-symbols.patch b/patches/18-rename-usb-net-symbols.patch
new file mode 100644
index 0000000..d8f6ca3
--- /dev/null
+++ b/patches/18-rename-usb-net-symbols.patch
@@ -0,0 +1,58 @@
+Rename config names for usbnet to deactivate them also if activated in
+the main kernel configuration. This is needed because
+usb_autopm_put_interface_async and usb_autopm_get_interface_async are
+not backported to kernel 2.6.28 and earlier.
+Remove this patch if these symbols are backported.
+
+diff --git a/drivers/net/usb/Makefile b/drivers/net/usb/Makefile
+index e17afb7..ddea3ae 100644
+--- a/drivers/net/usb/Makefile
++++ b/drivers/net/usb/Makefile
+@@ -8,18 +8,18 @@ obj-$(CONFIG_USB_PEGASUS) += pegasus.o
+ obj-$(CONFIG_USB_RTL8150) += rtl8150.o
+ obj-$(CONFIG_USB_HSO) += hso.o
+ obj-$(CONFIG_USB_NET_AX8817X) += asix.o
+-obj-$(CONFIG_USB_NET_CDCETHER) += cdc_ether.o
++obj-$(CONFIG_USB_NET_COMPAT_CDCETHER) += cdc_ether.o
+ obj-$(CONFIG_USB_NET_CDC_EEM) += cdc_eem.o
+ obj-$(CONFIG_USB_NET_DM9601) += dm9601.o
+ obj-$(CONFIG_USB_NET_SMSC95XX) += smsc95xx.o
+ obj-$(CONFIG_USB_NET_GL620A) += gl620a.o
+ obj-$(CONFIG_USB_NET_NET1080) += net1080.o
+ obj-$(CONFIG_USB_NET_PLUSB) += plusb.o
+-obj-$(CONFIG_USB_NET_RNDIS_HOST) += rndis_host.o
++obj-$(CONFIG_USB_NET_COMPAT_RNDIS_HOST) += rndis_host.o
+ obj-$(CONFIG_USB_NET_CDC_SUBSET) += cdc_subset.o
+ obj-$(CONFIG_USB_NET_ZAURUS) += zaurus.o
+ obj-$(CONFIG_USB_NET_MCS7830) += mcs7830.o
+-obj-$(CONFIG_USB_USBNET) += usbnet.o
++obj-$(CONFIG_USB_COMPAT_USBNET) += usbnet.o
+ obj-$(CONFIG_USB_NET_INT51X1) += int51x1.o
+ obj-$(CONFIG_USB_CDC_PHONET) += cdc-phonet.o
+
+diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
+index 21e183a..65c385f 100644
+--- a/drivers/net/usb/cdc_ether.c
++++ b/drivers/net/usb/cdc_ether.c
+@@ -33,7 +33,7 @@
+ #include <linux/usb/usbnet.h>
+
+
+-#if defined(CONFIG_USB_NET_RNDIS_HOST) || defined(CONFIG_USB_NET_RNDIS_HOST_MODULE)
++#if defined(CONFIG_USB_NET_COMPAT_RNDIS_HOST) || defined(CONFIG_USB_NET_COMPAT_RNDIS_HOST_MODULE)
+
+ static int is_rndis(struct usb_interface_descriptor *desc)
+ {
+diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile
+index 5d4ce4d..d4e48bd 100644
+--- a/drivers/net/wireless/Makefile
++++ b/drivers/net/wireless/Makefile
+@@ -29,7 +29,7 @@ obj-$(CONFIG_RTL8187) += rtl818x/
+ obj-$(CONFIG_PCMCIA_RAYCS) += ray_cs.o
+ obj-$(CONFIG_PCMCIA_WL3501) += wl3501_cs.o
+
+-obj-$(CONFIG_USB_NET_RNDIS_WLAN) += rndis_wlan.o
++obj-$(CONFIG_USB_NET_COMPAT_RNDIS_WLAN) += rndis_wlan.o
+
+ obj-$(CONFIG_USB_ZD1201) += zd1201.o
+ obj-$(CONFIG_LIBERTAS) += libertas/
diff --git a/patches/99-change-makefiles.patch b/patches/99-change-makefiles.patch
index 3185040..c0752dc 100644
--- a/patches/99-change-makefiles.patch
+++ b/patches/99-change-makefiles.patch
@@ -23,18 +23,18 @@ only the wireless stuff.
-obj-$(CONFIG_USB_RTL8150) += rtl8150.o
-obj-$(CONFIG_USB_HSO) += hso.o
-obj-$(CONFIG_USB_NET_AX8817X) += asix.o
- obj-$(CONFIG_USB_NET_CDCETHER) += cdc_ether.o
+ obj-$(CONFIG_USB_NET_COMPAT_CDCETHER) += cdc_ether.o
-obj-$(CONFIG_USB_NET_CDC_EEM) += cdc_eem.o
-obj-$(CONFIG_USB_NET_DM9601) += dm9601.o
-obj-$(CONFIG_USB_NET_SMSC95XX) += smsc95xx.o
-obj-$(CONFIG_USB_NET_GL620A) += gl620a.o
-obj-$(CONFIG_USB_NET_NET1080) += net1080.o
-obj-$(CONFIG_USB_NET_PLUSB) += plusb.o
- obj-$(CONFIG_USB_NET_RNDIS_HOST) += rndis_host.o
+ obj-$(CONFIG_USB_NET_COMPAT_RNDIS_HOST) += rndis_host.o
-obj-$(CONFIG_USB_NET_CDC_SUBSET) += cdc_subset.o
-obj-$(CONFIG_USB_NET_ZAURUS) += zaurus.o
-obj-$(CONFIG_USB_NET_MCS7830) += mcs7830.o
- obj-$(CONFIG_USB_USBNET) += usbnet.o
+ obj-$(CONFIG_USB_COMPAT_USBNET) += usbnet.o
-obj-$(CONFIG_USB_NET_INT51X1) += int51x1.o
-obj-$(CONFIG_USB_CDC_PHONET) += cdc-phonet.o

@@ -68,7 +68,7 @@ only the wireless stuff.
-obj-$(CONFIG_PCMCIA_RAYCS) += ray_cs.o
-obj-$(CONFIG_PCMCIA_WL3501) += wl3501_cs.o
-
- obj-$(CONFIG_USB_NET_RNDIS_WLAN) += rndis_wlan.o
+ obj-$(CONFIG_USB_NET_COMPAT_RNDIS_WLAN) += rndis_wlan.o

-obj-$(CONFIG_USB_ZD1201) += zd1201.o
obj-$(CONFIG_LIBERTAS) += libertas/
--
1.6.3.3


2009-12-29 01:59:38

by Luis Chamberlain

[permalink] [raw]
Subject: Re: [PATCH 0/5] compat: Build fixes for compat-wireless

On Tue, Dec 22, 2009 at 04:19:59PM +0100, Hauke Mehrtens wrote:
> Some fixes for compat.git and compat-wireless.git
> Build test for kernel 2.6.27 to 2.6.33 was successfull.
> For kernel 2.6.25 and 2.6.26 debugfs_remove_recursive is still missing.

Applied, thanks.

> PS: The last compat-wireless package at
> http://wireless.kernel.org/download/compat-wireless-2.6/ is 2009-12-11.

Yeah, sorry about that I locked myself out of wireless.kernel.org, will fix that
soon. Been lazy during the holidays.

Luis

2009-12-22 15:21:35

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 3/3] compat-wireless: Add more functions into netdev oops backport

Add netdev->poll_controller, netdev->vlan_rx_register and netdev->set_multicast_list into the netdev_ops backport code in driver atl1c, atl1e and atlx.

This is compiling, but not really tested because I do not have these devices.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
patches/01-netdev.patch | 28 ++++++++++++++++++++++++----
1 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/patches/01-netdev.patch b/patches/01-netdev.patch
index 1ddae28..2c0aa06 100644
--- a/patches/01-netdev.patch
+++ b/patches/01-netdev.patch
@@ -629,7 +629,7 @@ diff -Nur a/net/bluetooth/bnep/netdev.c b/net/bluetooth/bnep/netdev.c

static int atl1e_init_netdev(struct net_device *netdev, struct pci_dev *pdev)
{
-@@ -2243,7 +2245,18 @@ static int atl1e_init_netdev(struct net_
+@@ -2243,7 +2245,23 @@ static int atl1e_init_netdev(struct net_
pci_set_drvdata(pdev, netdev);

netdev->irq = pdev->irq;
@@ -644,6 +644,11 @@ diff -Nur a/net/bluetooth/bnep/netdev.c b/net/bluetooth/bnep/netdev.c
+ netdev->set_mac_address = atl1e_set_mac_addr;
+ netdev->do_ioctl = atl1e_ioctl;
+ netdev->get_stats = atl1e_get_stats;
++ netdev->set_multicast_list = atl1e_set_multi;
++ netdev->vlan_rx_register = atl1e_vlan_rx_register;
++#ifdef CONFIG_NET_POLL_CONTROLLER
++ netdev->poll_controller = atl1e_netpoll;
++#endif
+#endif

netdev->watchdog_timeo = AT_TX_WATCHDOG;
@@ -666,7 +671,7 @@ diff -Nur a/net/bluetooth/bnep/netdev.c b/net/bluetooth/bnep/netdev.c

static int atl1c_init_netdev(struct net_device *netdev, struct pci_dev *pdev)
{
-@@ -2462,7 +2464,18 @@ static int atl1c_init_netdev(struct net_
+@@ -2462,7 +2464,23 @@ static int atl1c_init_netdev(struct net_
pci_set_drvdata(pdev, netdev);

netdev->irq = pdev->irq;
@@ -681,6 +686,11 @@ diff -Nur a/net/bluetooth/bnep/netdev.c b/net/bluetooth/bnep/netdev.c
+ netdev->set_mac_address = atl1c_set_mac_addr;
+ netdev->do_ioctl = atl1c_ioctl;
+ netdev->get_stats = atl1c_get_stats;
++ netdev->set_multicast_list = atl1c_set_multi;
++ netdev->vlan_rx_register = atl1c_vlan_rx_register;
++#ifdef CONFIG_NET_POLL_CONTROLLER
++ netdev->poll_controller = atl1c_netpoll;
++#endif
+#endif
netdev->watchdog_timeo = AT_TX_WATCHDOG;
atl1c_set_ethtool_ops(netdev);
@@ -703,7 +713,7 @@ diff -Nur a/net/bluetooth/bnep/netdev.c b/net/bluetooth/bnep/netdev.c

/*
* atl1_probe - Device Initialization Routine
-@@ -2981,7 +2983,17 @@ static int __devinit atl1_probe(struct p
+@@ -2981,7 +2983,22 @@ static int __devinit atl1_probe(struct p
adapter->mii.phy_id_mask = 0x1f;
adapter->mii.reg_num_mask = 0x1f;

@@ -717,6 +727,11 @@ diff -Nur a/net/bluetooth/bnep/netdev.c b/net/bluetooth/bnep/netdev.c
+ netdev->tx_timeout = atlx_tx_timeout;
+ netdev->set_mac_address = atl1_set_mac;
+ netdev->do_ioctl = atlx_ioctl;
++ netdev->set_multicast_list = atlx_set_multi;
++ netdev->vlan_rx_register = atlx_vlan_rx_register;
++#ifdef CONFIG_NET_POLL_CONTROLLER
++ netdev->poll_controller = atl1_poll_controller;
++#endif
+#endif
netdev->watchdog_timeo = 5 * HZ;

@@ -739,7 +754,7 @@ diff -Nur a/net/bluetooth/bnep/netdev.c b/net/bluetooth/bnep/netdev.c

/*
* atl2_probe - Device Initialization Routine
-@@ -1395,7 +1397,17 @@ static int __devinit atl2_probe(struct p
+@@ -1395,7 +1397,22 @@ static int __devinit atl2_probe(struct p

atl2_setup_pcicmd(pdev);

@@ -753,6 +768,11 @@ diff -Nur a/net/bluetooth/bnep/netdev.c b/net/bluetooth/bnep/netdev.c
+ netdev->tx_timeout = atl2_tx_timeout;
+ netdev->set_mac_address = atl2_set_mac;
+ netdev->do_ioctl = atl2_ioctl;
++ netdev->set_multicast_list = atl2_set_multi;
++ netdev->vlan_rx_register = atl2_vlan_rx_register;
++#ifdef CONFIG_NET_POLL_CONTROLLER
++ netdev->poll_controller = atl2_poll_controller;
++#endif
+#endif
atl2_set_ethtool_ops(netdev);
netdev->watchdog_timeo = 5 * HZ;
--
1.6.3.3


2009-12-22 15:21:25

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 1/2] compat: Backport pcmcia from 2.6.33

This backports the pcmcia_loop_tuple function and change the signature
of pcmcia_request_window and pcmcia_map_mem_page as needed for older
kernels.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
compat/Makefile | 1 +
compat/compat-2.6.33.c | 130 +++++++++++++++++++++++++++++++++++++++++
include/linux/compat-2.6.33.h | 21 +++++++
3 files changed, 152 insertions(+), 0 deletions(-)
create mode 100644 compat/compat-2.6.33.c

diff --git a/compat/Makefile b/compat/Makefile
index 20d80e2..fd2f99f 100644
--- a/compat/Makefile
+++ b/compat/Makefile
@@ -19,3 +19,4 @@ compat-$(CONFIG_COMPAT_KERNEL_29) += compat-2.6.29.o
compat-$(CONFIG_COMPAT_KERNEL_30) += compat-2.6.30.o
compat-$(CONFIG_COMPAT_KERNEL_31) += compat-2.6.31.o
compat-$(CONFIG_COMPAT_KERNEL_32) += compat-2.6.32.o
+compat-$(CONFIG_COMPAT_KERNEL_33) += compat-2.6.33.o
diff --git a/compat/compat-2.6.33.c b/compat/compat-2.6.33.c
new file mode 100644
index 0000000..052c609
--- /dev/null
+++ b/compat/compat-2.6.33.c
@@ -0,0 +1,130 @@
+/*
+ * Copyright 2009 Hauke Mehrtens <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Compatibility file for Linux wireless for kernels 2.6.33.
+ */
+
+#include <linux/compat.h>
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
+
+
+/**
+ * pccard_loop_tuple() - loop over tuples in the CIS
+ * @s: the struct pcmcia_socket where the card is inserted
+ * @function: the device function we loop for
+ * @code: which CIS code shall we look for?
+ * @parse: buffer where the tuple shall be parsed (or NULL, if no parse)
+ * @priv_data: private data to be passed to the loop_tuple function.
+ * @loop_tuple: function to call for each CIS entry of type @function. IT
+ * gets passed the raw tuple, the paresed tuple (if @parse is
+ * set) and @priv_data.
+ *
+ * pccard_loop_tuple() loops over all CIS entries of type @function, and
+ * calls the @loop_tuple function for each entry. If the call to @loop_tuple
+ * returns 0, the loop exits. Returns 0 on success or errorcode otherwise.
+ */
+int pccard_loop_tuple(struct pcmcia_socket *s, unsigned int function,
+ cisdata_t code, cisparse_t *parse, void *priv_data,
+ int (*loop_tuple) (tuple_t *tuple,
+ cisparse_t *parse,
+ void *priv_data))
+{
+ tuple_t tuple;
+ cisdata_t *buf;
+ int ret;
+
+ buf = kzalloc(256, GFP_KERNEL);
+ if (buf == NULL) {
+ dev_printk(KERN_WARNING, &s->dev, "no memory to read tuple\n");
+ return -ENOMEM;
+ }
+
+ tuple.TupleData = buf;
+ tuple.TupleDataMax = 255;
+ tuple.TupleOffset = 0;
+ tuple.DesiredTuple = code;
+ tuple.Attributes = 0;
+
+ ret = pccard_get_first_tuple(s, function, &tuple);
+ while (!ret) {
+ if (pccard_get_tuple_data(s, &tuple))
+ goto next_entry;
+
+ if (parse)
+ if (pcmcia_parse_tuple(&tuple, parse))
+ goto next_entry;
+
+ ret = loop_tuple(&tuple, parse, priv_data);
+ if (!ret)
+ break;
+
+next_entry:
+ ret = pccard_get_next_tuple(s, function, &tuple);
+ }
+
+ kfree(buf);
+ return ret;
+}
+EXPORT_SYMBOL(pccard_loop_tuple);
+/* Source: drivers/pcmcia/cistpl.c */
+
+
+struct pcmcia_loop_mem {
+ struct pcmcia_device *p_dev;
+ void *priv_data;
+ int (*loop_tuple) (struct pcmcia_device *p_dev,
+ tuple_t *tuple,
+ void *priv_data);
+};
+
+/**
+ * pcmcia_do_loop_tuple() - internal helper for pcmcia_loop_config()
+ *
+ * pcmcia_do_loop_tuple() is the internal callback for the call from
+ * pcmcia_loop_tuple() to pccard_loop_tuple(). Data is transferred
+ * by a struct pcmcia_cfg_mem.
+ */
+static int pcmcia_do_loop_tuple(tuple_t *tuple, cisparse_t *parse, void *priv)
+{
+ struct pcmcia_loop_mem *loop = priv;
+
+ return loop->loop_tuple(loop->p_dev, tuple, loop->priv_data);
+};
+
+/**
+ * pcmcia_loop_tuple() - loop over tuples in the CIS
+ * @p_dev: the struct pcmcia_device which we need to loop for.
+ * @code: which CIS code shall we look for?
+ * @priv_data: private data to be passed to the loop_tuple function.
+ * @loop_tuple: function to call for each CIS entry of type @function. IT
+ * gets passed the raw tuple and @priv_data.
+ *
+ * pcmcia_loop_tuple() loops over all CIS entries of type @function, and
+ * calls the @loop_tuple function for each entry. If the call to @loop_tuple
+ * returns 0, the loop exits. Returns 0 on success or errorcode otherwise.
+ */
+int pcmcia_loop_tuple(struct pcmcia_device *p_dev, cisdata_t code,
+ int (*loop_tuple) (struct pcmcia_device *p_dev,
+ tuple_t *tuple,
+ void *priv_data),
+ void *priv_data)
+{
+ struct pcmcia_loop_mem loop = {
+ .p_dev = p_dev,
+ .loop_tuple = loop_tuple,
+ .priv_data = priv_data};
+
+ return pccard_loop_tuple(p_dev->socket, p_dev->func, code, NULL,
+ &loop, pcmcia_do_loop_tuple);
+}
+EXPORT_SYMBOL(pcmcia_loop_tuple);
+/* Source: drivers/pcmcia/pcmcia_resource.c */
+
+
+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) */
+
diff --git a/include/linux/compat-2.6.33.h b/include/linux/compat-2.6.33.h
index 0942baf..5367cd9 100644
--- a/include/linux/compat-2.6.33.h
+++ b/include/linux/compat-2.6.33.h
@@ -8,6 +8,9 @@
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))

#include <linux/skbuff.h>
+#include <pcmcia/cs_types.h>
+#include <pcmcia/cistpl.h>
+#include <pcmcia/ds.h>

#define IFF_DONT_BRIDGE 0x800 /* disallow bridging this ether dev */
/* source: include/linux/if.h */
@@ -28,6 +31,24 @@ static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev,
return skb;
}

+#define pcmcia_request_window(a, b, c) pcmcia_request_window(&a, b, c)
+
+#define pcmcia_map_mem_page(a, b, c) pcmcia_map_mem_page(b, c)
+
+/* loop over CIS entries */
+int pcmcia_loop_tuple(struct pcmcia_device *p_dev, cisdata_t code,
+ int (*loop_tuple) (struct pcmcia_device *p_dev,
+ tuple_t *tuple,
+ void *priv_data),
+ void *priv_data);
+
+/* loop over CIS entries */
+int pccard_loop_tuple(struct pcmcia_socket *s, unsigned int function,
+ cisdata_t code, cisparse_t *parse, void *priv_data,
+ int (*loop_tuple) (tuple_t *tuple,
+ cisparse_t *parse,
+ void *priv_data));
+
#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) */

#endif /* LINUX_26_33_COMPAT_H */
--
1.6.3.3