diff options
author | 2016-05-10 15:06:21 -0400 | |
---|---|---|
committer | 2016-05-10 15:06:21 -0400 | |
commit | dc6079d8ab24283f07b8180574dcf42c78ceeb7c (patch) | |
tree | ef31fbbd76a411f195c5065a226c41b18ef7b2fb /include/linux | |
parent | Merge tag 'linux-can-next-for-4.7-20160509' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next (diff) | |
parent | net: ethernet: fec: use phy_ethtool_{get|set}_link_ksettings (diff) | |
download | linux-dev-dc6079d8ab24283f07b8180574dcf42c78ceeb7c.tar.xz linux-dev-dc6079d8ab24283f07b8180574dcf42c78ceeb7c.zip |
Merge branch 'phy_ksettings'
Philippe Reynes says:
====================
net: phy: add phy_ethtool_{get|set}_link_ksettings
Ethtool callbacks {get|set}_link_ksettings may be the
same for many drivers. So we add two generics callbacks
phy_ethtool_{get|set}_link_ksettings.
To use those generics callbacks, the ethernet driver must
use the pointer phydev contained in struct net_device, and
not use a private structure to store this pointer.
Changelog:
v3:
- rename function to phy_ethtool_{get|set}_link_ksettings
- move code to net/phy/phy.c
This feedback were provided by David Decotigny
v2:
- use generic function instead of macro
- ethernet driver use the pointer phydev provided by struct net_device
Those idea were provided by Ben Hutchings,
and Florian Fainelli acknowledge them.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/phy.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index be3f83bbdc0b..2d24b283aa2d 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -829,6 +829,10 @@ int phy_ethtool_get_eee(struct phy_device *phydev, struct ethtool_eee *data); int phy_ethtool_set_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol); void phy_ethtool_get_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol); +int phy_ethtool_get_link_ksettings(struct net_device *ndev, + struct ethtool_link_ksettings *cmd); +int phy_ethtool_set_link_ksettings(struct net_device *ndev, + const struct ethtool_link_ksettings *cmd); int __init mdio_bus_init(void); void mdio_bus_exit(void); |