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.h40
1 files changed, 33 insertions, 7 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 3a632244f31b..71d4ada6f315 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -39,7 +39,8 @@ struct ethtool_drvinfo {
39 char bus_info[ETHTOOL_BUSINFO_LEN]; /* Bus info for this IF. */ 39 char bus_info[ETHTOOL_BUSINFO_LEN]; /* Bus info for this IF. */
40 /* For PCI devices, use pci_name(pci_dev). */ 40 /* For PCI devices, use pci_name(pci_dev). */
41 char reserved1[32]; 41 char reserved1[32];
42 char reserved2[16]; 42 char reserved2[12];
43 __u32 n_priv_flags; /* number of flags valid in ETHTOOL_GPFLAGS */
43 __u32 n_stats; /* number of u64's from ETHTOOL_GSTATS */ 44 __u32 n_stats; /* number of u64's from ETHTOOL_GSTATS */
44 __u32 testinfo_len; 45 __u32 testinfo_len;
45 __u32 eedump_len; /* Size of data from ETHTOOL_GEEPROM (bytes) */ 46 __u32 eedump_len; /* Size of data from ETHTOOL_GEEPROM (bytes) */
@@ -219,6 +220,7 @@ struct ethtool_pauseparam {
219enum ethtool_stringset { 220enum ethtool_stringset {
220 ETH_SS_TEST = 0, 221 ETH_SS_TEST = 0,
221 ETH_SS_STATS, 222 ETH_SS_STATS,
223 ETH_SS_PRIV_FLAGS,
222}; 224};
223 225
224/* for passing string sets for data tagging */ 226/* for passing string sets for data tagging */
@@ -256,6 +258,19 @@ struct ethtool_perm_addr {
256 __u8 data[0]; 258 __u8 data[0];
257}; 259};
258 260
261/* boolean flags controlling per-interface behavior characteristics.
262 * When reading, the flag indicates whether or not a certain behavior
263 * is enabled/present. When writing, the flag indicates whether
264 * or not the driver should turn on (set) or off (clear) a behavior.
265 *
266 * Some behaviors may read-only (unconditionally absent or present).
267 * If such is the case, return EINVAL in the set-flags operation if the
268 * flag differs from the read-only value.
269 */
270enum ethtool_flags {
271 ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */
272};
273
259#ifdef __KERNEL__ 274#ifdef __KERNEL__
260 275
261struct net_device; 276struct net_device;
@@ -270,10 +285,10 @@ u32 ethtool_op_get_sg(struct net_device *dev);
270int ethtool_op_set_sg(struct net_device *dev, u32 data); 285int ethtool_op_set_sg(struct net_device *dev, u32 data);
271u32 ethtool_op_get_tso(struct net_device *dev); 286u32 ethtool_op_get_tso(struct net_device *dev);
272int ethtool_op_set_tso(struct net_device *dev, u32 data); 287int ethtool_op_set_tso(struct net_device *dev, u32 data);
273int ethtool_op_get_perm_addr(struct net_device *dev,
274 struct ethtool_perm_addr *addr, u8 *data);
275u32 ethtool_op_get_ufo(struct net_device *dev); 288u32 ethtool_op_get_ufo(struct net_device *dev);
276int ethtool_op_set_ufo(struct net_device *dev, u32 data); 289int ethtool_op_set_ufo(struct net_device *dev, u32 data);
290u32 ethtool_op_get_flags(struct net_device *dev);
291int ethtool_op_set_flags(struct net_device *dev, u32 data);
277 292
278/** 293/**
279 * &ethtool_ops - Alter and report network device settings 294 * &ethtool_ops - Alter and report network device settings
@@ -309,7 +324,8 @@ int ethtool_op_set_ufo(struct net_device *dev, u32 data);
309 * get_strings: Return a set of strings that describe the requested objects 324 * get_strings: Return a set of strings that describe the requested objects
310 * phys_id: Identify the device 325 * phys_id: Identify the device
311 * get_stats: Return statistics about the device 326 * get_stats: Return statistics about the device
312 * get_perm_addr: Gets the permanent hardware address 327 * get_flags: get 32-bit flags bitmap
328 * set_flags: set 32-bit flags bitmap
313 * 329 *
314 * Description: 330 * Description:
315 * 331 *
@@ -362,17 +378,23 @@ struct ethtool_ops {
362 int (*set_sg)(struct net_device *, u32); 378 int (*set_sg)(struct net_device *, u32);
363 u32 (*get_tso)(struct net_device *); 379 u32 (*get_tso)(struct net_device *);
364 int (*set_tso)(struct net_device *, u32); 380 int (*set_tso)(struct net_device *, u32);
365 int (*self_test_count)(struct net_device *);
366 void (*self_test)(struct net_device *, struct ethtool_test *, u64 *); 381 void (*self_test)(struct net_device *, struct ethtool_test *, u64 *);
367 void (*get_strings)(struct net_device *, u32 stringset, u8 *); 382 void (*get_strings)(struct net_device *, u32 stringset, u8 *);
368 int (*phys_id)(struct net_device *, u32); 383 int (*phys_id)(struct net_device *, u32);
369 int (*get_stats_count)(struct net_device *);
370 void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *); 384 void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *);
371 int (*get_perm_addr)(struct net_device *, struct ethtool_perm_addr *, u8 *);
372 int (*begin)(struct net_device *); 385 int (*begin)(struct net_device *);
373 void (*complete)(struct net_device *); 386 void (*complete)(struct net_device *);
374 u32 (*get_ufo)(struct net_device *); 387 u32 (*get_ufo)(struct net_device *);
375 int (*set_ufo)(struct net_device *, u32); 388 int (*set_ufo)(struct net_device *, u32);
389 u32 (*get_flags)(struct net_device *);
390 int (*set_flags)(struct net_device *, u32);
391 u32 (*get_priv_flags)(struct net_device *);
392 int (*set_priv_flags)(struct net_device *, u32);
393 int (*get_sset_count)(struct net_device *, int);
394
395 /* the following hooks are obsolete */
396 int (*self_test_count)(struct net_device *);/* use get_sset_count */
397 int (*get_stats_count)(struct net_device *);/* use get_sset_count */
376}; 398};
377#endif /* __KERNEL__ */ 399#endif /* __KERNEL__ */
378 400
@@ -414,6 +436,10 @@ struct ethtool_ops {
414#define ETHTOOL_SUFO 0x00000022 /* Set UFO enable (ethtool_value) */ 436#define ETHTOOL_SUFO 0x00000022 /* Set UFO enable (ethtool_value) */
415#define ETHTOOL_GGSO 0x00000023 /* Get GSO enable (ethtool_value) */ 437#define ETHTOOL_GGSO 0x00000023 /* Get GSO enable (ethtool_value) */
416#define ETHTOOL_SGSO 0x00000024 /* Set GSO enable (ethtool_value) */ 438#define ETHTOOL_SGSO 0x00000024 /* Set GSO enable (ethtool_value) */
439#define ETHTOOL_GFLAGS 0x00000025 /* Get flags bitmap(ethtool_value) */
440#define ETHTOOL_SFLAGS 0x00000026 /* Set flags bitmap(ethtool_value) */
441#define ETHTOOL_GPFLAGS 0x00000027 /* Get driver-private flags bitmap */
442#define ETHTOOL_SPFLAGS 0x00000028 /* Set driver-private flags bitmap */
417 443
418/* compatibility with older code */ 444/* compatibility with older code */
419#define SPARC_ETH_GSET ETHTOOL_GSET 445#define SPARC_ETH_GSET ETHTOOL_GSET