diff --git a/src/platform/nm-platform-utils.c b/src/platform/nm-platform-utils.c index f40059a049..074e2c23e4 100644 --- a/src/platform/nm-platform-utils.c +++ b/src/platform/nm-platform-utils.c @@ -53,6 +53,15 @@ nmp_utils_if_nametoindex(const char *ifname) /*****************************************************************************/ +NM_UTILS_LOOKUP_STR_DEFINE(nm_platform_link_duplex_type_to_string, + NMPlatformLinkDuplexType, + NM_UTILS_LOOKUP_DEFAULT_WARN(NULL), + NM_UTILS_LOOKUP_STR_ITEM(NM_PLATFORM_LINK_DUPLEX_UNKNOWN, "unknown"), + NM_UTILS_LOOKUP_STR_ITEM(NM_PLATFORM_LINK_DUPLEX_FULL, "full"), + NM_UTILS_LOOKUP_STR_ITEM(NM_PLATFORM_LINK_DUPLEX_HALF, "half"), ); + +/*****************************************************************************/ + typedef struct { int fd; const int ifindex; diff --git a/src/platform/nm-platform-utils.h b/src/platform/nm-platform-utils.h index 3de40a27d0..38f8a00729 100644 --- a/src/platform/nm-platform-utils.h +++ b/src/platform/nm-platform-utils.h @@ -20,6 +20,8 @@ gboolean nmp_utils_ethtool_set_wake_on_lan(int ifindex, _NMSettingWiredWakeOnLan wol, const char * wol_password); +const char *nm_platform_link_duplex_type_to_string(NMPlatformLinkDuplexType duplex); + gboolean nmp_utils_ethtool_get_link_settings(int ifindex, gboolean * out_autoneg, guint32 * out_speed, diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index 5c92c773ff..44c6ee4797 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -3322,13 +3322,6 @@ nm_platform_ethtool_get_link_settings(NMPlatform * self, return nmp_utils_ethtool_get_link_settings(ifindex, out_autoneg, out_speed, out_duplex); } -NM_UTILS_LOOKUP_STR_DEFINE(nm_platform_link_duplex_type_to_string, - NMPlatformLinkDuplexType, - NM_UTILS_LOOKUP_DEFAULT_WARN(NULL), - NM_UTILS_LOOKUP_STR_ITEM(NM_PLATFORM_LINK_DUPLEX_UNKNOWN, "unknown"), - NM_UTILS_LOOKUP_STR_ITEM(NM_PLATFORM_LINK_DUPLEX_FULL, "full"), - NM_UTILS_LOOKUP_STR_ITEM(NM_PLATFORM_LINK_DUPLEX_HALF, "half"), ); - /*****************************************************************************/ NMEthtoolFeatureStates * diff --git a/src/platform/nm-platform.h b/src/platform/nm-platform.h index 7770492f63..a785144155 100644 --- a/src/platform/nm-platform.h +++ b/src/platform/nm-platform.h @@ -2358,8 +2358,6 @@ gboolean nm_platform_ethtool_get_link_ring(NMPlatform *self, int ifindex, NMEtht gboolean nm_platform_ethtool_set_ring(NMPlatform *self, int ifindex, const NMEthtoolRingState *ring); -const char *nm_platform_link_duplex_type_to_string(NMPlatformLinkDuplexType duplex); - void nm_platform_ip4_dev_route_blacklist_set(NMPlatform *self, int ifindex, GPtrArray * ip4_dev_route_blacklist);