diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-01-20 13:46:59 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-01-20 13:46:59 +0000 |
commit | b872aec3572d0348cb5543a10b5ee6c21f906846 (patch) | |
tree | b8473ac87b30c6bdf96c24324f6ebf5a76356630 /package/mac80211 | |
parent | cb175f3466aa182682a4245a3b9b90d051382c5a (diff) | |
download | master-187ad058-b872aec3572d0348cb5543a10b5ee6c21f906846.tar.gz master-187ad058-b872aec3572d0348cb5543a10b5ee6c21f906846.tar.bz2 master-187ad058-b872aec3572d0348cb5543a10b5ee6c21f906846.zip |
mac80211: fix the br_port_exists compatibility macro for 2.6.38
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25051 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211')
-rw-r--r-- | package/mac80211/patches/050-fix_br_port_exists.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/package/mac80211/patches/050-fix_br_port_exists.patch b/package/mac80211/patches/050-fix_br_port_exists.patch new file mode 100644 index 0000000000..b120369053 --- /dev/null +++ b/package/mac80211/patches/050-fix_br_port_exists.patch @@ -0,0 +1,50 @@ +--- a/include/linux/compat-2.6.38.h ++++ b/include/linux/compat-2.6.38.h +@@ -8,23 +8,6 @@ + #include <linux/kernel.h> + #include <linux/skbuff.h> + +-/* +- * 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 +- + /* rename member in struct mmc_host in include/linux/mmc/host.h */ + #define max_segs max_hw_segs + +--- a/include/linux/compat-2.6.h ++++ b/include/linux/compat-2.6.h +@@ -32,4 +32,21 @@ + #include <linux/compat-2.6.37.h> + #include <linux/compat-2.6.38.h> + ++/* ++ * 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_26_COMPAT_H */ |