1 #ifndef LINUX_3_3_COMPAT_H
2 #define LINUX_3_3_COMPAT_H
4 #include <linux/version.h>
6 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
8 /* include to override NL80211_FEATURE_SK_TX_STATUS */
9 #include <linux/nl80211.h>
10 #include <linux/skbuff.h>
11 #include <net/sch_generic.h>
13 #if !((LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,9) && LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)) || (LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,23) && LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)))
14 /* mask qdisc_cb_private_validate as RHEL6.3 backports it */
15 #define qdisc_cb_private_validate(a, b) compat_qdisc_cb_private_validate(a, b)
16 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,37))
17 static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz)
19 BUILD_BUG_ON(sizeof(skb->cb) < sizeof(struct qdisc_skb_cb) + sz);
22 static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz)
29 extern struct sk_buff *__pskb_copy(struct sk_buff *skb,
30 int headroom, gfp_t gfp_mask);
32 static inline void skb_complete_wifi_ack(struct sk_buff *skb, bool acked)
36 #define NL80211_FEATURE_SK_TX_STATUS 0
38 typedef u32 netdev_features_t;
40 /* source include/linux/device.h */
42 * module_driver() - Helper macro for drivers that don't do anything
43 * special in module init/exit. This eliminates a lot of boilerplate.
44 * Each module may only use this macro once, and calling it replaces
45 * module_init() and module_exit().
47 * Use this macro to construct bus specific macros for registering
48 * drivers, and do not use it on its own.
50 #define module_driver(__driver, __register, __unregister) \
51 static int __init __driver##_init(void) \
53 return __register(&(__driver)); \
55 module_init(__driver##_init); \
56 static void __exit __driver##_exit(void) \
58 __unregister(&(__driver)); \
60 module_exit(__driver##_exit);
62 /* source include/linux/usb.h */
64 * module_usb_driver() - Helper macro for registering a USB driver
65 * @__usb_driver: usb_driver struct
67 * Helper macro for USB drivers which do not do anything special in module
68 * init/exit. This eliminates a lot of boilerplate. Each module may only
69 * use this macro once, and calling it replaces module_init() and module_exit()
71 #define module_usb_driver(__usb_driver) \
72 module_driver(__usb_driver, usb_register, \
75 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)) */
77 #endif /* LINUX_3_3_COMPAT_H */