Lines Matching refs:cmd
34 static int ehea_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) in ehea_get_settings() argument
63 cmd->duplex = port->full_duplex == 1 ? in ehea_get_settings()
67 cmd->duplex = DUPLEX_UNKNOWN; in ehea_get_settings()
69 ethtool_cmd_speed_set(cmd, speed); in ehea_get_settings()
71 if (cmd->speed == SPEED_10000) { in ehea_get_settings()
72 cmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE); in ehea_get_settings()
73 cmd->advertising = (ADVERTISED_10000baseT_Full | ADVERTISED_FIBRE); in ehea_get_settings()
74 cmd->port = PORT_FIBRE; in ehea_get_settings()
76 cmd->supported = (SUPPORTED_1000baseT_Full | SUPPORTED_100baseT_Full in ehea_get_settings()
80 cmd->advertising = (ADVERTISED_1000baseT_Full | ADVERTISED_Autoneg in ehea_get_settings()
82 cmd->port = PORT_TP; in ehea_get_settings()
85 cmd->autoneg = port->autoneg == 1 ? AUTONEG_ENABLE : AUTONEG_DISABLE; in ehea_get_settings()
90 static int ehea_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) in ehea_set_settings() argument
96 if (cmd->autoneg == AUTONEG_ENABLE) { in ehea_set_settings()
101 switch (cmd->speed) { in ehea_set_settings()
103 if (cmd->duplex == DUPLEX_FULL) in ehea_set_settings()
110 if (cmd->duplex == DUPLEX_FULL) in ehea_set_settings()
117 if (cmd->duplex == DUPLEX_FULL) in ehea_set_settings()
124 if (cmd->duplex == DUPLEX_FULL) in ehea_set_settings()