diff options
Diffstat (limited to 'include/linux/ethtool.h')
-rw-r--r-- | include/linux/ethtool.h | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index 23ccea811297..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 { | |||
219 | enum ethtool_stringset { | 220 | enum 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 | */ | ||
270 | enum ethtool_flags { | ||
271 | ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */ | ||
272 | }; | ||
273 | |||
259 | #ifdef __KERNEL__ | 274 | #ifdef __KERNEL__ |
260 | 275 | ||
261 | struct net_device; | 276 | struct net_device; |
@@ -272,6 +287,8 @@ u32 ethtool_op_get_tso(struct net_device *dev); | |||
272 | int ethtool_op_set_tso(struct net_device *dev, u32 data); | 287 | int ethtool_op_set_tso(struct net_device *dev, u32 data); |
273 | u32 ethtool_op_get_ufo(struct net_device *dev); | 288 | u32 ethtool_op_get_ufo(struct net_device *dev); |
274 | int ethtool_op_set_ufo(struct net_device *dev, u32 data); | 289 | int ethtool_op_set_ufo(struct net_device *dev, u32 data); |
290 | u32 ethtool_op_get_flags(struct net_device *dev); | ||
291 | int ethtool_op_set_flags(struct net_device *dev, u32 data); | ||
275 | 292 | ||
276 | /** | 293 | /** |
277 | * ðtool_ops - Alter and report network device settings | 294 | * ðtool_ops - Alter and report network device settings |
@@ -307,6 +324,8 @@ int ethtool_op_set_ufo(struct net_device *dev, u32 data); | |||
307 | * 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 |
308 | * phys_id: Identify the device | 325 | * phys_id: Identify the device |
309 | * get_stats: Return statistics about the device | 326 | * get_stats: Return statistics about the device |
327 | * get_flags: get 32-bit flags bitmap | ||
328 | * set_flags: set 32-bit flags bitmap | ||
310 | * | 329 | * |
311 | * Description: | 330 | * Description: |
312 | * | 331 | * |
@@ -359,16 +378,23 @@ struct ethtool_ops { | |||
359 | int (*set_sg)(struct net_device *, u32); | 378 | int (*set_sg)(struct net_device *, u32); |
360 | u32 (*get_tso)(struct net_device *); | 379 | u32 (*get_tso)(struct net_device *); |
361 | int (*set_tso)(struct net_device *, u32); | 380 | int (*set_tso)(struct net_device *, u32); |
362 | int (*self_test_count)(struct net_device *); | ||
363 | void (*self_test)(struct net_device *, struct ethtool_test *, u64 *); | 381 | void (*self_test)(struct net_device *, struct ethtool_test *, u64 *); |
364 | void (*get_strings)(struct net_device *, u32 stringset, u8 *); | 382 | void (*get_strings)(struct net_device *, u32 stringset, u8 *); |
365 | int (*phys_id)(struct net_device *, u32); | 383 | int (*phys_id)(struct net_device *, u32); |
366 | int (*get_stats_count)(struct net_device *); | ||
367 | void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *); | 384 | void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *); |
368 | int (*begin)(struct net_device *); | 385 | int (*begin)(struct net_device *); |
369 | void (*complete)(struct net_device *); | 386 | void (*complete)(struct net_device *); |
370 | u32 (*get_ufo)(struct net_device *); | 387 | u32 (*get_ufo)(struct net_device *); |
371 | 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 */ | ||
372 | }; | 398 | }; |
373 | #endif /* __KERNEL__ */ | 399 | #endif /* __KERNEL__ */ |
374 | 400 | ||
@@ -410,6 +436,10 @@ struct ethtool_ops { | |||
410 | #define ETHTOOL_SUFO 0x00000022 /* Set UFO enable (ethtool_value) */ | 436 | #define ETHTOOL_SUFO 0x00000022 /* Set UFO enable (ethtool_value) */ |
411 | #define ETHTOOL_GGSO 0x00000023 /* Get GSO enable (ethtool_value) */ | 437 | #define ETHTOOL_GGSO 0x00000023 /* Get GSO enable (ethtool_value) */ |
412 | #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 */ | ||
413 | 443 | ||
414 | /* compatibility with older code */ | 444 | /* compatibility with older code */ |
415 | #define SPARC_ETH_GSET ETHTOOL_GSET | 445 | #define SPARC_ETH_GSET ETHTOOL_GSET |