aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/ethtool.h124
1 files changed, 93 insertions, 31 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index ab12f84c17bd..ead7dcb1bf1e 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -683,22 +683,28 @@ void ethtool_ntuple_flush(struct net_device *dev);
683bool ethtool_invalid_flags(struct net_device *dev, u32 data, u32 supported); 683bool ethtool_invalid_flags(struct net_device *dev, u32 data, u32 supported);
684 684
685/** 685/**
686 * struct ethtool_ops - Alter and report network device settings 686 * struct ethtool_ops - optional netdev operations
687 * @get_settings: Get device-specific settings. 687 * @get_settings: Get various device settings including Ethernet link
688 * @get_settings is passed an &ethtool_cmd to fill in. It returns 688 * settings. Returns a negative error code or zero.
689 * an negative errno or zero. 689 * @set_settings: Set various device settings including Ethernet link
690 * @set_settings: Set device-specific settings. 690 * settings. Returns a negative error code or zero.
691 * @set_settings is passed an &ethtool_cmd and should attempt to set 691 * @get_drvinfo: Report driver/device information. Should only set the
692 * all the settings this device supports. It may return an error value 692 * @driver, @version, @fw_version and @bus_info fields. If not
693 * if something goes wrong (otherwise 0). 693 * implemented, the @driver and @bus_info fields will be filled in
694 * @get_drvinfo: Report driver information 694 * according to the netdev's parent device.
695 * @get_regs_len: Get buffer length required for @get_regs
695 * @get_regs: Get device registers 696 * @get_regs: Get device registers
696 * @get_wol: Report whether Wake-on-Lan is enabled 697 * @get_wol: Report whether Wake-on-Lan is enabled
697 * @set_wol: Turn Wake-on-Lan on or off 698 * @set_wol: Turn Wake-on-Lan on or off. Returns a negative error code
698 * @get_msglevel: Report driver message level 699 * or zero.
700 * @get_msglevel: Report driver message level. This should be the value
701 * of the @msg_enable field used by netif logging functions.
699 * @set_msglevel: Set driver message level 702 * @set_msglevel: Set driver message level
700 * @nway_reset: Restart autonegotiation 703 * @nway_reset: Restart autonegotiation. Returns a negative error code
701 * @get_link: Get link status 704 * or zero.
705 * @get_link: Report whether physical link is up. Will only be called if
706 * the netdev is up. Should usually be set to ethtool_op_get_link(),
707 * which uses netif_carrier_ok().
702 * @get_eeprom: Read data from the device EEPROM. 708 * @get_eeprom: Read data from the device EEPROM.
703 * Should fill in the magic field. Don't need to check len for zero 709 * Should fill in the magic field. Don't need to check len for zero
704 * or wraparound. Fill in the data argument with the eeprom values 710 * or wraparound. Fill in the data argument with the eeprom values
@@ -708,28 +714,84 @@ bool ethtool_invalid_flags(struct net_device *dev, u32 data, u32 supported);
708 * Should validate the magic field. Don't need to check len for zero 714 * Should validate the magic field. Don't need to check len for zero
709 * or wraparound. Update len to the amount written. Returns an error 715 * or wraparound. Update len to the amount written. Returns an error
710 * or zero. 716 * or zero.
711 * @get_coalesce: Get interrupt coalescing parameters 717 * @get_coalesce: Get interrupt coalescing parameters. Returns a negative
712 * @set_coalesce: Set interrupt coalescing parameters 718 * error code or zero.
719 * @set_coalesce: Set interrupt coalescing parameters. Returns a negative
720 * error code or zero.
713 * @get_ringparam: Report ring sizes 721 * @get_ringparam: Report ring sizes
714 * @set_ringparam: Set ring sizes 722 * @set_ringparam: Set ring sizes. Returns a negative error code or zero.
715 * @get_pauseparam: Report pause parameters 723 * @get_pauseparam: Report pause parameters
716 * @set_pauseparam: Set pause parameters 724 * @set_pauseparam: Set pause parameters. Returns a negative error code
717 * @get_rx_csum: Report whether receive checksums are turned on or off 725 * or zero.
718 * @set_rx_csum: Turn receive checksum on or off 726 * @get_rx_csum: Deprecated in favour of the netdev feature %NETIF_F_RXCSUM.
719 * @get_tx_csum: Report whether transmit checksums are turned on or off 727 * Report whether receive checksums are turned on or off.
720 * @set_tx_csum: Turn transmit checksums on or off 728 * @set_rx_csum: Deprecated in favour of generic netdev features. Turn
721 * @get_sg: Report whether scatter-gather is enabled 729 * receive checksum on or off. Returns a negative error code or zero.
722 * @set_sg: Turn scatter-gather on or off 730 * @get_tx_csum: Deprecated as redundant. Report whether transmit checksums
723 * @get_tso: Report whether TCP segmentation offload is enabled 731 * are turned on or off.
724 * @set_tso: Turn TCP segmentation offload on or off 732 * @set_tx_csum: Deprecated in favour of generic netdev features. Turn
725 * @get_ufo: Report whether UDP fragmentation offload is enabled 733 * transmit checksums on or off. Returns a egative error code or zero.
726 * @set_ufo: Turn UDP fragmentation offload on or off 734 * @get_sg: Deprecated as redundant. Report whether scatter-gather is
735 * enabled.
736 * @set_sg: Deprecated in favour of generic netdev features. Turn
737 * scatter-gather on or off. Returns a negative error code or zero.
738 * @get_tso: Deprecated as redundant. Report whether TCP segmentation
739 * offload is enabled.
740 * @set_tso: Deprecated in favour of generic netdev features. Turn TCP
741 * segmentation offload on or off. Returns a negative error code or zero.
727 * @self_test: Run specified self-tests 742 * @self_test: Run specified self-tests
728 * @get_strings: Return a set of strings that describe the requested objects 743 * @get_strings: Return a set of strings that describe the requested objects
729 * @phys_id: Identify the device 744 * @phys_id: Identify the physical device, e.g. by flashing an LED
730 * @get_stats: Return statistics about the device 745 * attached to it until interrupted by a signal or the given time
731 * @get_flags: get 32-bit flags bitmap 746 * (in seconds) elapses. If the given time is zero, use a default
732 * @set_flags: set 32-bit flags bitmap 747 * time limit. Returns a negative error code or zero. Being
748 * interrupted by a signal is not an error.
749 * @get_ethtool_stats: Return extended statistics about the device.
750 * This is only useful if the device maintains statistics not
751 * included in &struct rtnl_link_stats64.
752 * @begin: Function to be called before any other operation. Returns a
753 * negative error code or zero.
754 * @complete: Function to be called after any other operation except
755 * @begin. Will be called even if the other operation failed.
756 * @get_ufo: Deprecated as redundant. Report whether UDP fragmentation
757 * offload is enabled.
758 * @set_ufo: Deprecated in favour of generic netdev features. Turn UDP
759 * fragmentation offload on or off. Returns a negative error code or zero.
760 * @get_flags: Deprecated as redundant. Report features included in
761 * &enum ethtool_flags that are enabled.
762 * @set_flags: Deprecated in favour of generic netdev features. Turn
763 * features included in &enum ethtool_flags on or off. Returns a
764 * negative error code or zero.
765 * @get_priv_flags: Report driver-specific feature flags.
766 * @set_priv_flags: Set driver-specific feature flags. Returns a negative
767 * error code or zero.
768 * @get_sset_count: Get number of strings that @get_strings will write.
769 * @get_rxnfc: Get RX flow classification rules. Returns a negative
770 * error code or zero.
771 * @set_rxnfc: Set RX flow classification rules. Returns a negative
772 * error code or zero.
773 * @flash_device: Write a firmware image to device's flash memory.
774 * Returns a negative error code or zero.
775 * @reset: Reset (part of) the device, as specified by a bitmask of
776 * flags from &enum ethtool_reset_flags. Returns a negative
777 * error code or zero.
778 * @set_rx_ntuple: Set an RX n-tuple rule. Returns a negative error code
779 * or zero.
780 * @get_rx_ntuple: Deprecated.
781 * @get_rxfh_indir: Get the contents of the RX flow hash indirection table.
782 * Returns a negative error code or zero.
783 * @set_rxfh_indir: Set the contents of the RX flow hash indirection table.
784 * Returns a negative error code or zero.
785 *
786 * All operations are optional (i.e. the function pointer may be set
787 * to %NULL) and callers must take this into account. Callers must
788 * hold the RTNL, except that for @get_drvinfo the caller may or may
789 * not hold the RTNL.
790 *
791 * See the structures used by these operations for further documentation.
792 *
793 * See &struct net_device and &struct net_device_ops for documentation
794 * of the generic netdev features interface.
733 */ 795 */
734struct ethtool_ops { 796struct ethtool_ops {
735 int (*get_settings)(struct net_device *, struct ethtool_cmd *); 797 int (*get_settings)(struct net_device *, struct ethtool_cmd *);