net: phy: move phy_lookup_setting() and guts of phy_supported_speeds() to phy-core
authorRussell King <rmk+kernel@armlinux.org.uk>
Tue, 25 Jul 2017 14:02:47 +0000 (15:02 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Aug 2017 03:55:28 +0000 (20:55 -0700)
commit0ccb4fc65d2799a315d5ee8732d75f35a114379c
tree129d60d315cb50841aa088e45c36e8553907e674
parentda4625ac2637e4e5249dc08a10f8dce7643603d2
net: phy: move phy_lookup_setting() and guts of phy_supported_speeds() to phy-core

phy_lookup_setting() provides useful functionality in ethtool code
outside phylib.  Move it to phy-core and allow it to be re-used (eg,
in phylink) rather than duplicated elsewhere.  Note that this supports
the larger linkmode space.

As we move the phy settings table, we also need to move the guts of
phy_supported_speeds() as well.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy-core.c
drivers/net/phy/phy.c
include/linux/phy.h