blob: c8a23740272981a8c21386097111019b361adfe5 [file] [log] [blame]
Michal Kubecekd44e1312019-12-11 10:58:29 +01001/* 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 Kubecek428c1222019-12-11 10:58:34 +01008/* 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 Kubecekd44e1312019-12-11 10:58:29 +010012extern const char
13netdev_features_strings[NETDEV_FEATURE_COUNT][ETH_GSTRING_LEN];
14extern const char
15rss_hash_func_strings[ETH_RSS_HASH_FUNCS_COUNT][ETH_GSTRING_LEN];
16extern const char
17tunable_strings[__ETHTOOL_TUNABLE_COUNT][ETH_GSTRING_LEN];
18extern const char
19phy_tunable_strings[__ETHTOOL_PHY_TUNABLE_COUNT][ETH_GSTRING_LEN];
Michal Kubecek428c1222019-12-11 10:58:34 +010020extern const char link_mode_names[][ETH_GSTRING_LEN];
Michal Kubecekd44e1312019-12-11 10:58:29 +010021
Michal Kubecek459e0b82019-12-27 15:55:48 +010022bool convert_legacy_settings_to_link_ksettings(
23 struct ethtool_link_ksettings *link_ksettings,
24 const struct ethtool_cmd *legacy_settings);
25
Michal Kubecekd44e1312019-12-11 10:58:29 +010026#endif /* _ETHTOOL_COMMON_H */