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 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,37))
15 static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz)
17 BUILD_BUG_ON(sizeof(skb->cb) < sizeof(struct qdisc_skb_cb) + sz);
20 static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz)
27 extern struct sk_buff *__pskb_copy(struct sk_buff *skb,
28 int headroom, gfp_t gfp_mask);
30 static inline void skb_complete_wifi_ack(struct sk_buff *skb, bool acked)
34 #define NL80211_FEATURE_SK_TX_STATUS 0
36 typedef u32 netdev_features_t;
38 /* source include/linux/device.h */
40 * module_driver() - Helper macro for drivers that don't do anything
41 * special in module init/exit. This eliminates a lot of boilerplate.
42 * Each module may only use this macro once, and calling it replaces
43 * module_init() and module_exit().
45 * Use this macro to construct bus specific macros for registering
46 * drivers, and do not use it on its own.
48 #define module_driver(__driver, __register, __unregister) \
49 static int __init __driver##_init(void) \
51 return __register(&(__driver)); \
53 module_init(__driver##_init); \
54 static void __exit __driver##_exit(void) \
56 __unregister(&(__driver)); \
58 module_exit(__driver##_exit);
60 /* source include/linux/usb.h */
62 * module_usb_driver() - Helper macro for registering a USB driver
63 * @__usb_driver: usb_driver struct
65 * Helper macro for USB drivers which do not do anything special in module
66 * init/exit. This eliminates a lot of boilerplate. Each module may only
67 * use this macro once, and calling it replaces module_init() and module_exit()
69 #define module_usb_driver(__usb_driver) \
70 module_driver(__usb_driver, usb_register, \
73 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)) */
75 #endif /* LINUX_3_3_COMPAT_H */