b1203690538e694bae089a6d734232d15d6d58f4
[openwrt-10.03/.git] / package / mac80211 / patches / 050-fix_br_port_exists.patch
1 --- a/include/linux/compat-2.6.38.h
2 +++ b/include/linux/compat-2.6.38.h
3 @@ -8,23 +8,6 @@
4  #include <linux/kernel.h>
5  #include <linux/skbuff.h>
6  
7 -/*
8 - * This is not part of The 2.6.37 kernel yet but we
9 - * we use it to optimize the backport code we
10 - * need to implement. Instead of using ifdefs
11 - * to check what version of the check we use
12 - * we just replace all checks on current code
13 - * with this. I'll submit this upstream too, that
14 - * way all we'd have to do is to implement this
15 - * for older kernels, then we would not have to
16 - * edit the upstrema code for backport efforts.
17 - */
18 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
19 -#define br_port_exists(dev)    (dev->priv_flags & IFF_BRIDGE_PORT)
20 -#else
21 -#define br_port_exists(dev)    (dev->br_port)
22 -#endif
23 -
24  /* rename member in struct mmc_host in include/linux/mmc/host.h */
25  #define max_segs       max_hw_segs
26  
27 --- a/include/linux/compat-2.6.h
28 +++ b/include/linux/compat-2.6.h
29 @@ -32,4 +32,21 @@
30  #include <linux/compat-2.6.37.h>
31  #include <linux/compat-2.6.38.h>
32  
33 +/*
34 + * This is not part of The 2.6.37 kernel yet but we
35 + * we use it to optimize the backport code we
36 + * need to implement. Instead of using ifdefs
37 + * to check what version of the check we use
38 + * we just replace all checks on current code
39 + * with this. I'll submit this upstream too, that
40 + * way all we'd have to do is to implement this
41 + * for older kernels, then we would not have to
42 + * edit the upstrema code for backport efforts.
43 + */
44 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
45 +#define br_port_exists(dev)    (dev->priv_flags & IFF_BRIDGE_PORT)
46 +#else
47 +#define br_port_exists(dev)    (dev->br_port)
48 +#endif
49 +
50  #endif /* LINUX_26_COMPAT_H */