Michal Kubecek | d44e131 | 2019-12-11 10:58:29 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #ifndef _ETHTOOL_COMMON_H |
| 4 | #define _ETHTOOL_COMMON_H |
| 5 | |
| 6 | #include <linux/ethtool.h> |
| 7 | |
Michal Kubecek | 428c122 | 2019-12-11 10:58:34 +0100 | [diff] [blame] | 8 | /* compose link mode index from speed, type and duplex */ |
| 9 | #define ETHTOOL_LINK_MODE(speed, type, duplex) \ |
| 10 | ETHTOOL_LINK_MODE_ ## speed ## base ## type ## _ ## duplex ## _BIT |
| 11 | |
Michal Kubecek | d44e131 | 2019-12-11 10:58:29 +0100 | [diff] [blame] | 12 | extern const char |
| 13 | netdev_features_strings[NETDEV_FEATURE_COUNT][ETH_GSTRING_LEN]; |
| 14 | extern const char |
| 15 | rss_hash_func_strings[ETH_RSS_HASH_FUNCS_COUNT][ETH_GSTRING_LEN]; |
| 16 | extern const char |
| 17 | tunable_strings[__ETHTOOL_TUNABLE_COUNT][ETH_GSTRING_LEN]; |
| 18 | extern const char |
| 19 | phy_tunable_strings[__ETHTOOL_PHY_TUNABLE_COUNT][ETH_GSTRING_LEN]; |
Michal Kubecek | 428c122 | 2019-12-11 10:58:34 +0100 | [diff] [blame] | 20 | extern const char link_mode_names[][ETH_GSTRING_LEN]; |
Michal Kubecek | d44e131 | 2019-12-11 10:58:29 +0100 | [diff] [blame] | 21 | |
Michal Kubecek | 459e0b8 | 2019-12-27 15:55:48 +0100 | [diff] [blame^] | 22 | bool convert_legacy_settings_to_link_ksettings( |
| 23 | struct ethtool_link_ksettings *link_ksettings, |
| 24 | const struct ethtool_cmd *legacy_settings); |
| 25 | |
Michal Kubecek | d44e131 | 2019-12-11 10:58:29 +0100 | [diff] [blame] | 26 | #endif /* _ETHTOOL_COMMON_H */ |