Added support for linux-3.18
[~tnikolova/compat/.git] / include / linux / compat-3.17.h
1 #ifndef LINUX_3_17_COMPAT_H
2 #define LINUX_3_17_COMPAT_H
3
4 #include <linux/version.h>
5 #include <linux/dcbnl.h>
6
7 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0))
8
9 #include <linux/netdevice.h>
10
11 #ifdef alloc_netdev
12 #undef alloc_netdev
13 #define alloc_netdev(sizeof_priv, name, name_assign_type, setup) \
14         alloc_netdev_mqs(sizeof_priv, name, setup, 1, 1)
15 #endif
16
17 #ifndef CONFIG_COMPAT_IS_QCN
18
19 enum dcbnl_cndd_states {
20         DCB_CNDD_RESET = 0,
21         DCB_CNDD_EDGE,
22         DCB_CNDD_INTERIOR,
23         DCB_CNDD_INTERIOR_READY,
24 };
25
26 struct ieee_qcn {
27         __u8 rpg_enable[IEEE_8021QAZ_MAX_TCS];
28         __u32 rppp_max_rps[IEEE_8021QAZ_MAX_TCS];
29         __u32 rpg_time_reset[IEEE_8021QAZ_MAX_TCS];
30         __u32 rpg_byte_reset[IEEE_8021QAZ_MAX_TCS];
31         __u32 rpg_threshold[IEEE_8021QAZ_MAX_TCS];
32         __u32 rpg_max_rate[IEEE_8021QAZ_MAX_TCS];
33         __u32 rpg_ai_rate[IEEE_8021QAZ_MAX_TCS];
34         __u32 rpg_hai_rate[IEEE_8021QAZ_MAX_TCS];
35         __u32 rpg_gd[IEEE_8021QAZ_MAX_TCS];
36         __u32 rpg_min_dec_fac[IEEE_8021QAZ_MAX_TCS];
37         __u32 rpg_min_rate[IEEE_8021QAZ_MAX_TCS];
38         __u32 cndd_state_machine[IEEE_8021QAZ_MAX_TCS];
39 };
40
41 struct ieee_qcn_stats {
42         __u64 rppp_rp_centiseconds[IEEE_8021QAZ_MAX_TCS];
43         __u32 rppp_created_rps[IEEE_8021QAZ_MAX_TCS];
44         __u32 ignored_cnm[IEEE_8021QAZ_MAX_TCS];
45         __u32 estimated_total_rate[IEEE_8021QAZ_MAX_TCS];
46         __u32 cnms_handled_successfully[IEEE_8021QAZ_MAX_TCS];
47         __u32 min_total_limiters_rate[IEEE_8021QAZ_MAX_TCS];
48         __u32 max_total_limiters_rate[IEEE_8021QAZ_MAX_TCS];
49 };
50
51 #endif
52
53
54 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */
55
56 #endif /* LINUX_3_17_COMPAT_H */