diff options
Diffstat (limited to 'include/linux/ethtool.h')
| -rw-r--r-- | include/linux/ethtool.h | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index aac3e2eeb4fd..dc80d8294247 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
| @@ -13,6 +13,9 @@ | |||
| 13 | #ifndef _LINUX_ETHTOOL_H | 13 | #ifndef _LINUX_ETHTOOL_H |
| 14 | #define _LINUX_ETHTOOL_H | 14 | #define _LINUX_ETHTOOL_H |
| 15 | 15 | ||
| 16 | #ifdef __KERNEL__ | ||
| 17 | #include <linux/compat.h> | ||
| 18 | #endif | ||
| 16 | #include <linux/types.h> | 19 | #include <linux/types.h> |
| 17 | #include <linux/if_ether.h> | 20 | #include <linux/if_ether.h> |
| 18 | 21 | ||
| @@ -450,6 +453,37 @@ struct ethtool_rxnfc { | |||
| 450 | __u32 rule_locs[0]; | 453 | __u32 rule_locs[0]; |
| 451 | }; | 454 | }; |
| 452 | 455 | ||
| 456 | #ifdef __KERNEL__ | ||
| 457 | #ifdef CONFIG_COMPAT | ||
| 458 | |||
| 459 | struct compat_ethtool_rx_flow_spec { | ||
| 460 | u32 flow_type; | ||
| 461 | union { | ||
| 462 | struct ethtool_tcpip4_spec tcp_ip4_spec; | ||
| 463 | struct ethtool_tcpip4_spec udp_ip4_spec; | ||
| 464 | struct ethtool_tcpip4_spec sctp_ip4_spec; | ||
| 465 | struct ethtool_ah_espip4_spec ah_ip4_spec; | ||
| 466 | struct ethtool_ah_espip4_spec esp_ip4_spec; | ||
| 467 | struct ethtool_usrip4_spec usr_ip4_spec; | ||
| 468 | struct ethhdr ether_spec; | ||
| 469 | u8 hdata[72]; | ||
| 470 | } h_u, m_u; | ||
| 471 | compat_u64 ring_cookie; | ||
| 472 | u32 location; | ||
| 473 | }; | ||
| 474 | |||
| 475 | struct compat_ethtool_rxnfc { | ||
| 476 | u32 cmd; | ||
| 477 | u32 flow_type; | ||
| 478 | compat_u64 data; | ||
| 479 | struct compat_ethtool_rx_flow_spec fs; | ||
| 480 | u32 rule_cnt; | ||
| 481 | u32 rule_locs[0]; | ||
| 482 | }; | ||
| 483 | |||
| 484 | #endif /* CONFIG_COMPAT */ | ||
| 485 | #endif /* __KERNEL__ */ | ||
| 486 | |||
| 453 | /** | 487 | /** |
| 454 | * struct ethtool_rxfh_indir - command to get or set RX flow hash indirection | 488 | * struct ethtool_rxfh_indir - command to get or set RX flow hash indirection |
| 455 | * @cmd: Specific command number - %ETHTOOL_GRXFHINDIR or %ETHTOOL_SRXFHINDIR | 489 | * @cmd: Specific command number - %ETHTOOL_GRXFHINDIR or %ETHTOOL_SRXFHINDIR |
| @@ -580,7 +614,7 @@ struct ethtool_sfeatures { | |||
| 580 | * values of corresponding bits in features[].requested. Bits in .requested | 614 | * values of corresponding bits in features[].requested. Bits in .requested |
| 581 | * not set in .valid or not changeable are ignored. | 615 | * not set in .valid or not changeable are ignored. |
| 582 | * | 616 | * |
| 583 | * Returns %EINVAL when .valid contains undefined or never-changable bits | 617 | * Returns %EINVAL when .valid contains undefined or never-changeable bits |
| 584 | * or size is not equal to required number of features words (32-bit blocks). | 618 | * or size is not equal to required number of features words (32-bit blocks). |
| 585 | * Returns >= 0 if request was completed; bits set in the value mean: | 619 | * Returns >= 0 if request was completed; bits set in the value mean: |
| 586 | * %ETHTOOL_F_UNSUPPORTED - there were bits set in .valid that are not | 620 | * %ETHTOOL_F_UNSUPPORTED - there were bits set in .valid that are not |
| @@ -614,6 +648,9 @@ enum ethtool_sfeatures_retval_bits { | |||
| 614 | 648 | ||
| 615 | #include <linux/rculist.h> | 649 | #include <linux/rculist.h> |
| 616 | 650 | ||
| 651 | /* needed by dev_disable_lro() */ | ||
| 652 | extern int __ethtool_set_flags(struct net_device *dev, u32 flags); | ||
| 653 | |||
| 617 | struct ethtool_rx_ntuple_flow_spec_container { | 654 | struct ethtool_rx_ntuple_flow_spec_container { |
| 618 | struct ethtool_rx_ntuple_flow_spec fs; | 655 | struct ethtool_rx_ntuple_flow_spec fs; |
| 619 | struct list_head list; | 656 | struct list_head list; |
| @@ -643,6 +680,7 @@ int ethtool_op_set_ufo(struct net_device *dev, u32 data); | |||
| 643 | u32 ethtool_op_get_flags(struct net_device *dev); | 680 | u32 ethtool_op_get_flags(struct net_device *dev); |
| 644 | int ethtool_op_set_flags(struct net_device *dev, u32 data, u32 supported); | 681 | int ethtool_op_set_flags(struct net_device *dev, u32 data, u32 supported); |
| 645 | void ethtool_ntuple_flush(struct net_device *dev); | 682 | void ethtool_ntuple_flush(struct net_device *dev); |
| 683 | bool ethtool_invalid_flags(struct net_device *dev, u32 data, u32 supported); | ||
| 646 | 684 | ||
| 647 | /** | 685 | /** |
| 648 | * ðtool_ops - Alter and report network device settings | 686 | * ðtool_ops - Alter and report network device settings |
