net: phy: add phy_speed_down_core and phy_resolve_min_speed
authorHeiner Kallweit <hkallweit1@gmail.com>
Mon, 12 Aug 2019 21:51:27 +0000 (23:51 +0200)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 14 Aug 2019 00:14:06 +0000 (17:14 -0700)
commit331c56ac73846fa267c04ee6aa9a00bb5fed9440
treefa890b319ae331f0fd04794b169702c610537fbd
parent7b261e0ef5f88087765df7f079a4bd0d285f7579
net: phy: add phy_speed_down_core and phy_resolve_min_speed

phy_speed_down_core provides most of the functionality for
phy_speed_down. It makes use of new helper phy_resolve_min_speed that is
based on the sorting of the settings[] array. In certain cases it may be
helpful to be able to exclude legacy half duplex modes, therefore
prepare phy_resolve_min_speed() for it.

v2:
- rename __phy_speed_down to phy_speed_down_core

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
drivers/net/phy/phy-core.c
include/linux/phy.h