aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ethtool.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ethtool.h')
-rw-r--r--include/linux/ethtool.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index e17fa7140588..21eff418091b 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -137,6 +137,35 @@ struct ethtool_eeprom {
137}; 137};
138 138
139/** 139/**
140 * struct ethtool_eee - Energy Efficient Ethernet information
141 * @cmd: ETHTOOL_{G,S}EEE
142 * @supported: Mask of %SUPPORTED_* flags for the speed/duplex combinations
143 * for which there is EEE support.
144 * @advertised: Mask of %ADVERTISED_* flags for the speed/duplex combinations
145 * advertised as eee capable.
146 * @lp_advertised: Mask of %ADVERTISED_* flags for the speed/duplex
147 * combinations advertised by the link partner as eee capable.
148 * @eee_active: Result of the eee auto negotiation.
149 * @eee_enabled: EEE configured mode (enabled/disabled).
150 * @tx_lpi_enabled: Whether the interface should assert its tx lpi, given
151 * that eee was negotiated.
152 * @tx_lpi_timer: Time in microseconds the interface delays prior to asserting
153 * its tx lpi (after reaching 'idle' state). Effective only when eee
154 * was negotiated and tx_lpi_enabled was set.
155 */
156struct ethtool_eee {
157 __u32 cmd;
158 __u32 supported;
159 __u32 advertised;
160 __u32 lp_advertised;
161 __u32 eee_active;
162 __u32 eee_enabled;
163 __u32 tx_lpi_enabled;
164 __u32 tx_lpi_timer;
165 __u32 reserved[2];
166};
167
168/**
140 * struct ethtool_modinfo - plugin module eeprom information 169 * struct ethtool_modinfo - plugin module eeprom information
141 * @cmd: %ETHTOOL_GMODULEINFO 170 * @cmd: %ETHTOOL_GMODULEINFO
142 * @type: Standard the module information conforms to %ETH_MODULE_SFF_xxxx 171 * @type: Standard the module information conforms to %ETH_MODULE_SFF_xxxx
@@ -945,6 +974,8 @@ static inline u32 ethtool_rxfh_indir_default(u32 index, u32 n_rx_rings)
945 * @get_module_info: Get the size and type of the eeprom contained within 974 * @get_module_info: Get the size and type of the eeprom contained within
946 * a plug-in module. 975 * a plug-in module.
947 * @get_module_eeprom: Get the eeprom information from the plug-in module 976 * @get_module_eeprom: Get the eeprom information from the plug-in module
977 * @get_eee: Get Energy-Efficient (EEE) supported and status.
978 * @set_eee: Set EEE status (enable/disable) as well as LPI timers.
948 * 979 *
949 * All operations are optional (i.e. the function pointer may be set 980 * All operations are optional (i.e. the function pointer may be set
950 * to %NULL) and callers must take this into account. Callers must 981 * to %NULL) and callers must take this into account. Callers must
@@ -1011,6 +1042,8 @@ struct ethtool_ops {
1011 struct ethtool_modinfo *); 1042 struct ethtool_modinfo *);
1012 int (*get_module_eeprom)(struct net_device *, 1043 int (*get_module_eeprom)(struct net_device *,
1013 struct ethtool_eeprom *, u8 *); 1044 struct ethtool_eeprom *, u8 *);
1045 int (*get_eee)(struct net_device *, struct ethtool_eee *);
1046 int (*set_eee)(struct net_device *, struct ethtool_eee *);
1014 1047
1015 1048
1016}; 1049};
@@ -1089,6 +1122,8 @@ struct ethtool_ops {
1089#define ETHTOOL_GET_TS_INFO 0x00000041 /* Get time stamping and PHC info */ 1122#define ETHTOOL_GET_TS_INFO 0x00000041 /* Get time stamping and PHC info */
1090#define ETHTOOL_GMODULEINFO 0x00000042 /* Get plug-in module information */ 1123#define ETHTOOL_GMODULEINFO 0x00000042 /* Get plug-in module information */
1091#define ETHTOOL_GMODULEEEPROM 0x00000043 /* Get plug-in module eeprom */ 1124#define ETHTOOL_GMODULEEEPROM 0x00000043 /* Get plug-in module eeprom */
1125#define ETHTOOL_GEEE 0x00000044 /* Get EEE settings */
1126#define ETHTOOL_SEEE 0x00000045 /* Set EEE settings */
1092 1127
1093/* compatibility with older code */ 1128/* compatibility with older code */
1094#define SPARC_ETH_GSET ETHTOOL_GSET 1129#define SPARC_ETH_GSET ETHTOOL_GSET
@@ -1118,6 +1153,10 @@ struct ethtool_ops {
1118#define SUPPORTED_10000baseR_FEC (1 << 20) 1153#define SUPPORTED_10000baseR_FEC (1 << 20)
1119#define SUPPORTED_20000baseMLD2_Full (1 << 21) 1154#define SUPPORTED_20000baseMLD2_Full (1 << 21)
1120#define SUPPORTED_20000baseKR2_Full (1 << 22) 1155#define SUPPORTED_20000baseKR2_Full (1 << 22)
1156#define SUPPORTED_40000baseKR4_Full (1 << 23)
1157#define SUPPORTED_40000baseCR4_Full (1 << 24)
1158#define SUPPORTED_40000baseSR4_Full (1 << 25)
1159#define SUPPORTED_40000baseLR4_Full (1 << 26)
1121 1160
1122/* Indicates what features are advertised by the interface. */ 1161/* Indicates what features are advertised by the interface. */
1123#define ADVERTISED_10baseT_Half (1 << 0) 1162#define ADVERTISED_10baseT_Half (1 << 0)
@@ -1143,6 +1182,10 @@ struct ethtool_ops {
1143#define ADVERTISED_10000baseR_FEC (1 << 20) 1182#define ADVERTISED_10000baseR_FEC (1 << 20)
1144#define ADVERTISED_20000baseMLD2_Full (1 << 21) 1183#define ADVERTISED_20000baseMLD2_Full (1 << 21)
1145#define ADVERTISED_20000baseKR2_Full (1 << 22) 1184#define ADVERTISED_20000baseKR2_Full (1 << 22)
1185#define ADVERTISED_40000baseKR4_Full (1 << 23)
1186#define ADVERTISED_40000baseCR4_Full (1 << 24)
1187#define ADVERTISED_40000baseSR4_Full (1 << 25)
1188#define ADVERTISED_40000baseLR4_Full (1 << 26)
1146 1189
1147/* The following are all involved in forcing a particular link 1190/* The following are all involved in forcing a particular link
1148 * mode for the device for setting things. When getting the 1191 * mode for the device for setting things. When getting the