Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx> --- include/linux/compat-2.6.36.h | 17 ----------------- include/linux/if.h | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 17 deletions(-) create mode 100644 include/linux/if.h diff --git a/include/linux/compat-2.6.36.h b/include/linux/compat-2.6.36.h index 8f6ecc4..833143e 100644 --- a/include/linux/compat-2.6.36.h +++ b/include/linux/compat-2.6.36.h @@ -179,23 +179,6 @@ extern unsigned int work_busy(struct work_struct *work); #define schedule_delayed_work_on(cpu, dwork, delay) compat_schedule_delayed_work_on(cpu, dwork, delay) #define flush_scheduled_work(a) compat_flush_scheduled_work(a) -#define br_port_exists(dev) (dev->br_port) - -#else - -/* - * 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. - */ -#define br_port_exists(dev) (dev->priv_flags & IFF_BRIDGE_PORT) - #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)) */ #endif /* LINUX_26_36_COMPAT_H */ diff --git a/include/linux/if.h b/include/linux/if.h new file mode 100644 index 0000000..64cd9e7 --- /dev/null +++ b/include/linux/if.h @@ -0,0 +1,28 @@ +#ifndef _COMPAT_LINUX_IF_H +#define _COMPAT_LINUX_IF_H + +#include_next <linux/if.h> + +#include <linux/version.h> + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)) + +#define br_port_exists(dev) (dev->br_port) + +#else + +/* + * 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. + */ +#define br_port_exists(dev) (dev->priv_flags & IFF_BRIDGE_PORT) + +#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)) */ +#endif /* _COMPAT_LINUX_IF_H */ -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html