From 876dd50e11fff287af351f77e3b43003e240d385 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 20 Jan 2011 13:46:59 +0000 Subject: [PATCH] mac80211: fix the br_port_exists compatibility macro for 2.6.38 SVN-Revision: 25051 --- .../patches/050-fix_br_port_exists.patch | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 package/mac80211/patches/050-fix_br_port_exists.patch 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 00000000000..b1203690538 --- /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 + #include + +-/* +- * 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 + #include + ++/* ++ * 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 */ -- 2.30.2