Lines Matching full:speed
30 static int speed_duplex_to_capa(int speed, unsigned int duplex) in speed_duplex_to_capa() argument
33 (speed > SPEED_1000 && duplex != DUPLEX_FULL)) in speed_duplex_to_capa()
36 switch (speed) { in speed_duplex_to_capa()
81 capa = speed_duplex_to_capa(linkmode->speed, linkmode->duplex); in phy_caps_init()
84 if (linkmode->speed != SPEED_UNKNOWN) { in phy_caps_init()
85 pr_err("Unknown speed %d, please update LINK_CAPS\n", in phy_caps_init()
86 linkmode->speed); in phy_caps_init()
118 (count == 0 || speeds[count - 1] != lcap->speed)) { in phy_caps_speeds()
119 speeds[count++] = lcap->speed; in phy_caps_speeds()
132 * Returns: The highest-speed link_capabilities that intersects the given
133 * linkmodes. In case several DUPLEX_ options exist at that speed,
153 * Returns: The lowest-speed link_capabilities that intersects the given
174 * phy_caps_lookup() - Lookup capabilities by speed/duplex that matches a mask
175 * @speed: Speed to match
181 * and that matches the passed speed and duplex.
183 * When @exact is set, an exact match is performed on speed and duplex, meaning
184 * that if the linkmodes for the given speed and duplex intersect the supported
189 * at lower speed, or the lowest matching speed, or NULL.
195 phy_caps_lookup(int speed, unsigned int duplex, const unsigned long *supported, in phy_caps_lookup() argument
203 /* exact match on speed and duplex*/ in phy_caps_lookup()
204 if (lcap->speed == speed && lcap->duplex == duplex) { in phy_caps_lookup()
207 if (lcap->speed <= speed) in phy_caps_lookup()
221 * phy_caps_linkmode_max_speed() - Clamp a linkmodes set to a max speed
222 * @max_speed: Speed limit for the linkmode set
230 if (lcap->speed > max_speed) in phy_caps_linkmode_max_speed()
237 * phy_caps_valid() - Validate a linkmodes set agains given speed and duplex
238 * @speed: input speed to validate
243 * the given speed and duplex, false otherwise.
245 bool phy_caps_valid(int speed, int duplex, const unsigned long *linkmodes) in phy_caps_valid() argument
247 int capa = speed_duplex_to_capa(speed, duplex); in phy_caps_valid()
271 * @interface: The PHY interface we want to get the possible Speed/Duplex from