forked from Minki/linux
459e0b81b3
Implement LINKINFO_GET netlink request to get basic link settings provided by ETHTOOL_GLINKSETTINGS and ETHTOOL_GSET ioctl commands. This request provides settings not directly related to autonegotiation and link mode selection: physical port, phy MDIO address, MDI(-X) status, MDI(-X) control and transceiver. LINKINFO_GET request can be used with NLM_F_DUMP (without device identification) to request the information for all devices in current network namespace providing the data. Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
27 lines
858 B
C
27 lines
858 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
|
|
#ifndef _ETHTOOL_COMMON_H
|
|
#define _ETHTOOL_COMMON_H
|
|
|
|
#include <linux/ethtool.h>
|
|
|
|
/* compose link mode index from speed, type and duplex */
|
|
#define ETHTOOL_LINK_MODE(speed, type, duplex) \
|
|
ETHTOOL_LINK_MODE_ ## speed ## base ## type ## _ ## duplex ## _BIT
|
|
|
|
extern const char
|
|
netdev_features_strings[NETDEV_FEATURE_COUNT][ETH_GSTRING_LEN];
|
|
extern const char
|
|
rss_hash_func_strings[ETH_RSS_HASH_FUNCS_COUNT][ETH_GSTRING_LEN];
|
|
extern const char
|
|
tunable_strings[__ETHTOOL_TUNABLE_COUNT][ETH_GSTRING_LEN];
|
|
extern const char
|
|
phy_tunable_strings[__ETHTOOL_PHY_TUNABLE_COUNT][ETH_GSTRING_LEN];
|
|
extern const char link_mode_names[][ETH_GSTRING_LEN];
|
|
|
|
bool convert_legacy_settings_to_link_ksettings(
|
|
struct ethtool_link_ksettings *link_ksettings,
|
|
const struct ethtool_cmd *legacy_settings);
|
|
|
|
#endif /* _ETHTOOL_COMMON_H */
|