compat: Added headers and macros to support RHEL7.0
[compat-rdma/compat.git] / include / linux / ethtool.h
1 #ifndef __COMPAT_ETHTOOL_H
2 #define __COMPAT_ETHTOOL_H
3
4 #include_next <linux/ethtool.h>
5
6 #ifndef ETH_MODULE_SFF_8636
7 #define ETH_MODULE_SFF_8636             0x3
8 #define ETH_MODULE_SFF_8636_LEN         256
9 #endif
10
11 #ifndef ETH_MODULE_SFF_8436
12 #define ETH_MODULE_SFF_8436             0x4
13 #define ETH_MODULE_SFF_8436_LEN         256
14 #endif
15
16 #ifndef SPEED_20000
17 #define SPEED_20000 20000
18 #define SUPPORTED_20000baseMLD2_Full    (1 << 21)
19 #define SUPPORTED_20000baseKR2_Full     (1 << 22)
20 #define ADVERTISED_20000baseMLD2_Full   (1 << 21)
21 #define ADVERTISED_20000baseKR2_Full    (1 << 22)
22 #endif
23
24 #ifndef SPEED_40000
25 #define SPEED_40000 40000
26 #endif
27
28 #ifndef SPEED_56000
29 #define SPEED_56000 56000
30 #define SUPPORTED_56000baseKR4_Full     (1 << 27)
31 #define SUPPORTED_56000baseCR4_Full     (1 << 28)
32 #define SUPPORTED_56000baseSR4_Full     (1 << 29)
33 #define SUPPORTED_56000baseLR4_Full     (1 << 30)
34 #define ADVERTISED_56000baseKR4_Full    (1 << 27)
35 #define ADVERTISED_56000baseCR4_Full    (1 << 28)
36 #define ADVERTISED_56000baseSR4_Full    (1 << 29)
37 #define ADVERTISED_56000baseLR4_Full    (1 << 30)
38 #endif
39
40 #define SPEED_25000 25000
41 #define SPEED_50000 50000
42 #define SPEED_100000 100000
43 /*TODO Ethtool new SPEED API */
44 #define SUPPORTED_100000baseCR4_Full 0
45 #define ADVERTISED_100000baseCR4_Full 0
46 #define SUPPORTED_100000baseSR4_Full 0
47 #define ADVERTISED_100000baseSR4_Full 0
48 #define SUPPORTED_100000baseKR4_Full 0
49 #define ADVERTISED_100000baseKR4_Full 0
50 #define SUPPORTED_1000000baseLR4_Full 0
51 #define ADVERTISED_1000000baseLR4_Full 0
52 #define SUPPORTED_100baseTX_Full 0
53 #define ADVERTISED_100baseTX_Full 0
54 #define SUPPORTED_25000baseCR_Full 0
55 #define ADVERTISED_25000baseCR_Full 0
56 #define SUPPORTED_25000baseKR_Full 0
57 #define ADVERTISED_25000baseKR_Full 0
58 #define SUPPORTED_25000baseSR_Full 0
59 #define ADVERTISED_25000baseSR_Full 0
60 #define SUPPORTED_50000baseCR2_Full 0
61 #define ADVERTISED_50000baseCR2_Full 0
62 #define SUPPORTED_50000baseKR2_Full 0
63 #define ADVERTISED_50000baseKR2_Full 0
64
65 #ifndef SPEED_UNKNOWN
66 #define SPEED_UNKNOWN           -1
67 #endif
68
69 #ifndef DUPLEX_UNKNOWN
70 #define DUPLEX_UNKNOWN          -1
71 #endif
72
73 #ifndef SUPPORTED_40000baseKR4_Full
74 /* Add missing defines for supported and advertised speed features */
75 #define SUPPORTED_40000baseKR4_Full     (1 << 23)
76 #define SUPPORTED_40000baseCR4_Full     (1 << 24)
77 #define SUPPORTED_40000baseSR4_Full     (1 << 25)
78 #define SUPPORTED_40000baseLR4_Full     (1 << 26)
79 #define ADVERTISED_40000baseKR4_Full    (1 << 23)
80 #define ADVERTISED_40000baseCR4_Full    (1 << 24)
81 #define ADVERTISED_40000baseSR4_Full    (1 << 25)
82 #define ADVERTISED_40000baseLR4_Full    (1 << 26)
83 #endif
84 #endif