diff options
Diffstat (limited to 'include/linux/ethtool.h')
-rw-r--r-- | include/linux/ethtool.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index f5647b59a90e..89d68d837b6e 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -726,6 +726,29 @@ struct ethtool_sfeatures { | |||
726 | struct ethtool_set_features_block features[0]; | 726 | struct ethtool_set_features_block features[0]; |
727 | }; | 727 | }; |
728 | 728 | ||
729 | /** | ||
730 | * struct ethtool_ts_info - holds a device's timestamping and PHC association | ||
731 | * @cmd: command number = %ETHTOOL_GET_TS_INFO | ||
732 | * @so_timestamping: bit mask of the sum of the supported SO_TIMESTAMPING flags | ||
733 | * @phc_index: device index of the associated PHC, or -1 if there is none | ||
734 | * @tx_types: bit mask of the supported hwtstamp_tx_types enumeration values | ||
735 | * @rx_filters: bit mask of the supported hwtstamp_rx_filters enumeration values | ||
736 | * | ||
737 | * The bits in the 'tx_types' and 'rx_filters' fields correspond to | ||
738 | * the 'hwtstamp_tx_types' and 'hwtstamp_rx_filters' enumeration values, | ||
739 | * respectively. For example, if the device supports HWTSTAMP_TX_ON, | ||
740 | * then (1 << HWTSTAMP_TX_ON) in 'tx_types' will be set. | ||
741 | */ | ||
742 | struct ethtool_ts_info { | ||
743 | __u32 cmd; | ||
744 | __u32 so_timestamping; | ||
745 | __s32 phc_index; | ||
746 | __u32 tx_types; | ||
747 | __u32 tx_reserved[3]; | ||
748 | __u32 rx_filters; | ||
749 | __u32 rx_reserved[3]; | ||
750 | }; | ||
751 | |||
729 | /* | 752 | /* |
730 | * %ETHTOOL_SFEATURES changes features present in features[].valid to the | 753 | * %ETHTOOL_SFEATURES changes features present in features[].valid to the |
731 | * values of corresponding bits in features[].requested. Bits in .requested | 754 | * values of corresponding bits in features[].requested. Bits in .requested |
@@ -788,6 +811,7 @@ struct net_device; | |||
788 | 811 | ||
789 | /* Some generic methods drivers may use in their ethtool_ops */ | 812 | /* Some generic methods drivers may use in their ethtool_ops */ |
790 | u32 ethtool_op_get_link(struct net_device *dev); | 813 | u32 ethtool_op_get_link(struct net_device *dev); |
814 | int ethtool_op_get_ts_info(struct net_device *dev, struct ethtool_ts_info *eti); | ||
791 | 815 | ||
792 | /** | 816 | /** |
793 | * ethtool_rxfh_indir_default - get default value for RX flow hash indirection | 817 | * ethtool_rxfh_indir_default - get default value for RX flow hash indirection |
@@ -893,6 +917,9 @@ static inline u32 ethtool_rxfh_indir_default(u32 index, u32 n_rx_rings) | |||
893 | * and flag of the device. | 917 | * and flag of the device. |
894 | * @get_dump_data: Get dump data. | 918 | * @get_dump_data: Get dump data. |
895 | * @set_dump: Set dump specific flags to the device. | 919 | * @set_dump: Set dump specific flags to the device. |
920 | * @get_ts_info: Get the time stamping and PTP hardware clock capabilities. | ||
921 | * Drivers supporting transmit time stamps in software should set this to | ||
922 | * ethtool_op_get_ts_info(). | ||
896 | * | 923 | * |
897 | * All operations are optional (i.e. the function pointer may be set | 924 | * All operations are optional (i.e. the function pointer may be set |
898 | * to %NULL) and callers must take this into account. Callers must | 925 | * to %NULL) and callers must take this into account. Callers must |
@@ -954,6 +981,7 @@ struct ethtool_ops { | |||
954 | int (*get_dump_data)(struct net_device *, | 981 | int (*get_dump_data)(struct net_device *, |
955 | struct ethtool_dump *, void *); | 982 | struct ethtool_dump *, void *); |
956 | int (*set_dump)(struct net_device *, struct ethtool_dump *); | 983 | int (*set_dump)(struct net_device *, struct ethtool_dump *); |
984 | int (*get_ts_info)(struct net_device *, struct ethtool_ts_info *); | ||
957 | 985 | ||
958 | }; | 986 | }; |
959 | #endif /* __KERNEL__ */ | 987 | #endif /* __KERNEL__ */ |
@@ -1028,6 +1056,7 @@ struct ethtool_ops { | |||
1028 | #define ETHTOOL_SET_DUMP 0x0000003e /* Set dump settings */ | 1056 | #define ETHTOOL_SET_DUMP 0x0000003e /* Set dump settings */ |
1029 | #define ETHTOOL_GET_DUMP_FLAG 0x0000003f /* Get dump settings */ | 1057 | #define ETHTOOL_GET_DUMP_FLAG 0x0000003f /* Get dump settings */ |
1030 | #define ETHTOOL_GET_DUMP_DATA 0x00000040 /* Get dump data */ | 1058 | #define ETHTOOL_GET_DUMP_DATA 0x00000040 /* Get dump data */ |
1059 | #define ETHTOOL_GET_TS_INFO 0x00000041 /* Get time stamping and PHC info */ | ||
1031 | 1060 | ||
1032 | /* compatibility with older code */ | 1061 | /* compatibility with older code */ |
1033 | #define SPARC_ETH_GSET ETHTOOL_GSET | 1062 | #define SPARC_ETH_GSET ETHTOOL_GSET |