Discussion:
[PATCH] Compatibility update
Pavel Roskin
2008-06-20 19:21:42 UTC
Permalink
Provide compatibility layer for gfp_t, which appeared in Linux 2.6.14
and mutex API, which appeared in Linux 2.6.16

Index: src/include/wlan/wlan_compat.h
===================================================================
--- src/include/wlan/wlan_compat.h (revision 1862)
+++ src/include/wlan/wlan_compat.h (working copy)
@@ -291,6 +291,17 @@
#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
--
Regards,
Pavel Roskin
Loading...