]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/shared/ethtool-util.h
udev/net: support to set MDI-X mode
[thirdparty/systemd.git] / src / shared / ethtool-util.h
index 8ca221bc090d736f2f206a2018e042376c8fb4c7..d07cfaefb26b919a2685e39ccbe421ac6f6a23a6 100644 (file)
@@ -168,9 +168,15 @@ int ethtool_get_permanent_hw_addr(int *ethtool_fd, const char *ifname, struct hw
 int ethtool_set_wol(int *ethtool_fd, const char *ifname, uint32_t wolopts, const uint8_t password[SOPASS_MAX]);
 int ethtool_set_nic_buffer_size(int *ethtool_fd, const char *ifname, const netdev_ring_param *ring);
 int ethtool_set_features(int *ethtool_fd, const char *ifname, const int features[static _NET_DEV_FEAT_MAX]);
-int ethtool_set_glinksettings(int *ethtool_fd, const char *ifname,
-                              int autonegotiation, const uint32_t advertise[static N_ADVERTISE],
-                              uint64_t speed, Duplex duplex, NetDevPort port);
+int ethtool_set_glinksettings(
+                int *fd,
+                const char *ifname,
+                int autonegotiation,
+                const uint32_t advertise[static N_ADVERTISE],
+                uint64_t speed,
+                Duplex duplex,
+                NetDevPort port,
+                uint8_t mdi);
 int ethtool_set_channels(int *ethtool_fd, const char *ifname, const netdev_channels *channels);
 int ethtool_set_flow_control(int *fd, const char *ifname, int rx, int tx, int autoneg);
 int ethtool_set_nic_coalesce_settings(int *ethtool_fd, const char *ifname, const netdev_coalesce_param *coalesce);
@@ -183,12 +189,15 @@ int wol_options_to_string_alloc(uint32_t opts, char **ret);
 const char *port_to_string(NetDevPort port) _const_;
 NetDevPort port_from_string(const char *port) _pure_;
 
+const char *mdi_to_string(int mdi) _const_;
+
 const char *ethtool_link_mode_bit_to_string(enum ethtool_link_mode_bit_indices val) _const_;
 enum ethtool_link_mode_bit_indices ethtool_link_mode_bit_from_string(const char *str) _pure_;
 
 CONFIG_PARSER_PROTOTYPE(config_parse_duplex);
 CONFIG_PARSER_PROTOTYPE(config_parse_wol);
 CONFIG_PARSER_PROTOTYPE(config_parse_port);
+CONFIG_PARSER_PROTOTYPE(config_parse_mdi);
 CONFIG_PARSER_PROTOTYPE(config_parse_advertise);
 CONFIG_PARSER_PROTOTYPE(config_parse_ring_buffer_or_channel);
 CONFIG_PARSER_PROTOTYPE(config_parse_coalesce_u32);