]> git.openfabrics.org - ~emulex/compat.git/commitdiff
compat: add support for linux 3.1
authorHauke Mehrtens <hauke@hauke-m.de>
Mon, 15 Aug 2011 18:32:50 +0000 (20:32 +0200)
committerLuis R. Rodriguez <mcgrof@qca.qualcomm.com>
Mon, 22 Aug 2011 15:06:42 +0000 (08:06 -0700)
br_port_exists is not in mainline, will it ever?

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
include/linux/compat-2.6.h
include/linux/compat-3.1.h
include/linux/compat-3.2.h [new file with mode: 0644]

index e4ca6aa607bbd9d9a08e27e3e83207aaf8c2db44..d933602d4c5fa3823bdfc958ce31c118782d3737 100644 (file)
@@ -34,5 +34,6 @@
 #include <linux/compat-2.6.39.h>
 #include <linux/compat-3.0.h>
 #include <linux/compat-3.1.h>
+#include <linux/compat-3.2.h>
 
 #endif /* LINUX_26_COMPAT_H */
index cff65213bee0c1244a8cef024e5b5f5d635fbb38..93bb1f6e9b71aa0077b2a21d4950dd865558b2f7 100644 (file)
@@ -5,23 +5,6 @@
 
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
 
-/*
- * This is not part of The 2.6.37 kernel yet but we
- * we use it to optimize the backport code we
- * need to implement. Instead of using ifdefs
- * to check what version of the check we use
- * we just replace all checks on current code
- * with this. I'll submit this upstream too, that
- * way all we'd have to do is to implement this
- * for older kernels, then we would not have to
- * edit the upstrema code for backport efforts.
- */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
-#define br_port_exists(dev)    (dev->priv_flags & IFF_BRIDGE_PORT)
-#else
-#define br_port_exists(dev)    (dev->br_port)
-#endif
-
 #define genl_dump_check_consistent(cb, user_hdr, family)
 
 #define IFF_TX_SKB_SHARING     0x10000 /* The interface supports sharing
diff --git a/include/linux/compat-3.2.h b/include/linux/compat-3.2.h
new file mode 100644 (file)
index 0000000..9cba461
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef LINUX_3_2_COMPAT_H
+#define LINUX_3_2_COMPAT_H
+
+#include <linux/version.h>
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0))
+
+/*
+ * This is not part of The 2.6.37 kernel yet but we
+ * we use it to optimize the backport code we
+ * need to implement. Instead of using ifdefs
+ * to check what version of the check we use
+ * we just replace all checks on current code
+ * with this. I'll submit this upstream too, that
+ * way all we'd have to do is to implement this
+ * for older kernels, then we would not have to
+ * edit the upstrema code for backport efforts.
+ */
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+#define br_port_exists(dev)    (dev->priv_flags & IFF_BRIDGE_PORT)
+#else
+#define br_port_exists(dev)    (dev->br_port)
+#endif
+
+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0)) */
+
+#endif /* LINUX_3_2_COMPAT_H */