summaryrefslogtreecommitdiff
path: root/include/linux/phy.h
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2014-02-11 17:27:37 -0800
committerDavid S. Miller <davem@davemloft.net>2014-02-12 19:08:19 -0500
commit76a423a3f8f16bfc7fb86360a620be18c775b94d (patch)
tree79afe85602c388647b06b9bf00c663ff44256244 /include/linux/phy.h
parenta9fa6e6ac29709e7a623b60695c172da675df045 (diff)
downloadlwn-76a423a3f8f16bfc7fb86360a620be18c775b94d.tar.gz
lwn-76a423a3f8f16bfc7fb86360a620be18c775b94d.zip
net: phy: allow driver to implement their own aneg_done
Some PHYs out there can be very quirky with respect to how they would report the auto-negotiation is completed. Allow drivers to override the generic aneg_done() implementation by providing their own. Since not all drivers have been updated yet to use genphy_aneg_done() as aneg_done() callback, we explicitely check that this callback is valid before calling into it. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/phy.h')
-rw-r--r--include/linux/phy.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h
index c572842c9029..eede6579cae7 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -417,6 +417,9 @@ struct phy_driver {
*/
int (*config_aneg)(struct phy_device *phydev);
+ /* Determines the auto negotiation result */
+ int (*aneg_done)(struct phy_device *phydev);
+
/* Determines the negotiated speed and duplex */
int (*read_status)(struct phy_device *phydev);