summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpizza <pizza>2008-07-01 20:14:28 +0000
committerpizza <pizza>2008-07-01 20:14:28 +0000
commita876c87fda9f05778012cf1ffd8c4c923569c6ca (patch)
treefe43a7c513cd0e97335689d7ed1dd46f573e2417
parentedc361a997010ee4d61a0de0bcbda8a9626c07a2 (diff)
downloadlinux-wlan-ng-a876c87fda9f05778012cf1ffd8c4c923569c6ca.tar.gz
linux-wlan-ng-a876c87fda9f05778012cf1ffd8c4c923569c6ca.tar.bz2
linux-wlan-ng-a876c87fda9f05778012cf1ffd8c4c923569c6ca.zip
From Pavel Roskin:
Provide compatibility layer for gfp_t, which appeared in Linux 2.6.14 and mutex API, which appeared in Linux 2.6.16
-rw-r--r--CHANGES1
-rw-r--r--src/include/wlan/wlan_compat.h11
2 files changed, 12 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 5b35eb5..5901d13 100644
--- a/CHANGES
+++ b/CHANGES
@@ -41,6 +41,7 @@
* Intersil Corporation as part of PRISM(R) chipset product development.
*
* --------------------------------------------------------------------
+ - Add compatibility for gfp_t and mutex APIs (Pavel Roskin)
- Fix non-posix find arguments in script (Mark Mathews)
0.2.9
- Reduce stack usage in prism2mib_priv (Richard Kennedy)
diff --git a/src/include/wlan/wlan_compat.h b/src/include/wlan/wlan_compat.h
index 428e1cf..d920318 100644
--- a/src/include/wlan/wlan_compat.h
+++ b/src/include/wlan/wlan_compat.h
@@ -291,6 +291,17 @@ typedef int64_t INT64;
#define PT_REGS
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
+#define mutex semaphore
+#define mutex_lock(_m) down(_m)
+#define mutex_unlock(_m) up(_m)
+#define mutex_init(_m) init_MUTEX(_m)
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
+typedef int gfp_t;
+#endif
+
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,7))
# define del_singleshot_timer_sync(a) del_timer_sync(a)
#endif