Lines Matching refs:ecmd
2583 static int ace_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) in ace_get_settings() argument
2589 memset(ecmd, 0, sizeof(struct ethtool_cmd)); in ace_get_settings()
2590 ecmd->supported = in ace_get_settings()
2596 ecmd->port = PORT_FIBRE; in ace_get_settings()
2597 ecmd->transceiver = XCVR_INTERNAL; in ace_get_settings()
2601 ethtool_cmd_speed_set(ecmd, SPEED_1000); in ace_get_settings()
2605 ethtool_cmd_speed_set(ecmd, SPEED_100); in ace_get_settings()
2607 ethtool_cmd_speed_set(ecmd, SPEED_10); in ace_get_settings()
2609 ethtool_cmd_speed_set(ecmd, 0); in ace_get_settings()
2612 ecmd->duplex = DUPLEX_FULL; in ace_get_settings()
2614 ecmd->duplex = DUPLEX_HALF; in ace_get_settings()
2617 ecmd->autoneg = AUTONEG_ENABLE; in ace_get_settings()
2619 ecmd->autoneg = AUTONEG_DISABLE; in ace_get_settings()
2625 ecmd->trace = readl(®s->TuneTrace); in ace_get_settings()
2627 ecmd->txcoal = readl(®s->TuneTxCoalTicks); in ace_get_settings()
2628 ecmd->rxcoal = readl(®s->TuneRxCoalTicks); in ace_get_settings()
2630 ecmd->maxtxpkt = readl(®s->TuneMaxTxDesc); in ace_get_settings()
2631 ecmd->maxrxpkt = readl(®s->TuneMaxRxDesc); in ace_get_settings()
2636 static int ace_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) in ace_set_settings() argument
2659 if (ecmd->autoneg == AUTONEG_ENABLE) in ace_set_settings()
2661 if (ethtool_cmd_speed(ecmd) != speed) { in ace_set_settings()
2663 switch (ethtool_cmd_speed(ecmd)) { in ace_set_settings()
2676 if (ecmd->duplex == DUPLEX_FULL) in ace_set_settings()