1 #ifndef LINUX_26_37_COMPAT_H
2 #define LINUX_26_37_COMPAT_H
4 #include <linux/version.h>
6 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37))
8 #include <linux/skbuff.h>
11 * This is not part of The 2.6.37 kernel yet but we
12 * we use it to optimize the backport code we
13 * need to implement. Instead of using ifdefs
14 * to check what version of the check we use
15 * we just replace all checks on current code
16 * with this. I'll submit this upstream too, that
17 * way all we'd have to do is to implement this
18 * for older kernels, then we would not have to
19 * edit the upstrema code for backport efforts.
21 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
22 #define br_port_exists(dev) (dev->priv_flags & IFF_BRIDGE_PORT)
24 #define br_port_exists(dev) (dev->br_port)
27 #define SDIO_CLASS_BT_AMP 0x09 /* Type-A Bluetooth AMP interface */
29 extern struct kobj_ns_type_operations net_ns_type_operations;
32 * skb_checksum_none_assert - make sure skb ip_summed is CHECKSUM_NONE
35 * fresh skbs have their ip_summed set to CHECKSUM_NONE.
36 * Instead of forcing ip_summed to CHECKSUM_NONE, we can
37 * use this helper, to document places where we make this assertion.
39 static inline void skb_checksum_none_assert(struct sk_buff *skb)
42 BUG_ON(skb->ip_summed != CHECKSUM_NONE);
46 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)) */
48 #endif /* LINUX_26_37_COMPAT_H */