Lines Matching refs:ks
177 static void set_asym_pause(u64 advertising, struct ethtool_link_ksettings *ks)
184 ethtool_link_ksettings_add_link_mode(ks, advertising,
204 struct ethtool_link_ksettings *ks)
211 ethtool_link_ksettings_zero_link_mode(ks, supported);
212 ethtool_link_ksettings_zero_link_mode(ks, advertising);
213 ethtool_link_ksettings_zero_link_mode(ks, lp_advertising);
225 ks->base.speed = speed;
226 ks->base.duplex = DUPLEX_FULL;
228 ks->link_modes.lp_advertising);
230 ks->base.speed = SPEED_UNKNOWN;
231 ks->base.duplex = DUPLEX_UNKNOWN;
234 ks->base.autoneg = (fp->advertising & FUN_PORT_CAP_AUTONEG) ?
236 ks->base.port = fun_port_type(xcvr);
238 fun_link_modes_to_ethtool(fp->port_caps, ks->link_modes.supported);
240 ethtool_link_ksettings_add_link_mode(ks, supported, Asym_Pause);
242 fun_link_modes_to_ethtool(fp->advertising, ks->link_modes.advertising);
243 set_asym_pause(fp->advertising, ks);
247 static u64 fun_advert_modes(const struct ethtool_link_ksettings *ks)
252 ethtool_link_ksettings_test_link_mode(ks, advertising, mode)
317 const struct ethtool_link_ksettings *ks)
327 if (ks->base.duplex == DUPLEX_HALF)
329 if (ks->base.autoneg == AUTONEG_ENABLE &&
333 if (ks->base.autoneg == AUTONEG_ENABLE) {
334 if (linkmode_empty(ks->link_modes.advertising))
338 if (!linkmode_subset(ks->link_modes.advertising, supported))
341 new_advert = fun_advert_modes(ks) | FUN_PORT_CAP_AUTONEG;
343 new_advert = fun_speed_to_link_mode(ks->base.speed);