Lines Matching refs:ecmd

644 			   struct ethtool_link_ksettings *ecmd);
646 const struct ethtool_link_ksettings *ecmd);
2584 struct ethtool_link_ksettings *ecmd) in get_link_ksettings() argument
2588 netdev_get_ecmd(dev, ecmd); in get_link_ksettings()
2594 const struct ethtool_link_ksettings *ecmd) in set_link_ksettings() argument
2599 res = netdev_set_ecmd(dev, ecmd); in set_link_ksettings()
2830 struct ethtool_link_ksettings *ecmd) in netdev_get_ecmd() argument
2836 ecmd->base.port = dev->if_port; in netdev_get_ecmd()
2837 ecmd->base.speed = np->speed; in netdev_get_ecmd()
2838 ecmd->base.duplex = np->duplex; in netdev_get_ecmd()
2839 ecmd->base.autoneg = np->autoneg; in netdev_get_ecmd()
2854 ecmd->base.phy_address = np->phy_addr_external; in netdev_get_ecmd()
2874 switch (ecmd->base.port) { in netdev_get_ecmd()
2888 if (ecmd->base.autoneg == AUTONEG_ENABLE) { in netdev_get_ecmd()
2893 ecmd->base.speed = SPEED_100; in netdev_get_ecmd()
2895 ecmd->base.speed = SPEED_10; in netdev_get_ecmd()
2897 ecmd->base.duplex = DUPLEX_FULL; in netdev_get_ecmd()
2899 ecmd->base.duplex = DUPLEX_HALF; in netdev_get_ecmd()
2904 ethtool_convert_legacy_u32_to_link_mode(ecmd->link_modes.supported, in netdev_get_ecmd()
2906 ethtool_convert_legacy_u32_to_link_mode(ecmd->link_modes.advertising, in netdev_get_ecmd()
2913 const struct ethtool_link_ksettings *ecmd) in netdev_set_ecmd() argument
2919 ecmd->link_modes.advertising); in netdev_set_ecmd()
2921 if (ecmd->base.port != PORT_TP && in netdev_set_ecmd()
2922 ecmd->base.port != PORT_MII && in netdev_set_ecmd()
2923 ecmd->base.port != PORT_FIBRE) in netdev_set_ecmd()
2925 if (ecmd->base.autoneg == AUTONEG_ENABLE) { in netdev_set_ecmd()
2932 } else if (ecmd->base.autoneg == AUTONEG_DISABLE) { in netdev_set_ecmd()
2933 u32 speed = ecmd->base.speed; in netdev_set_ecmd()
2936 if (ecmd->base.duplex != DUPLEX_HALF && in netdev_set_ecmd()
2937 ecmd->base.duplex != DUPLEX_FULL) in netdev_set_ecmd()
2948 if (np->ignore_phy && (ecmd->base.autoneg == AUTONEG_ENABLE || in netdev_set_ecmd()
2949 ecmd->base.port == PORT_TP)) in netdev_set_ecmd()
2968 dev->if_port = ecmd->base.port; in netdev_set_ecmd()
2969 np->autoneg = ecmd->base.autoneg; in netdev_set_ecmd()
2970 np->phy_addr_external = ecmd->base.phy_address & PhyAddrMask; in netdev_set_ecmd()
2983 np->speed = ecmd->base.speed; in netdev_set_ecmd()
2984 np->duplex = ecmd->base.duplex; in netdev_set_ecmd()
2991 if (ecmd->base.port == PORT_TP) in netdev_set_ecmd()