net: phy: allow driver to implement their own aneg_done
authorFlorian Fainelli <f.fainelli@gmail.com>
Wed, 12 Feb 2014 01:27:37 +0000 (17:27 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Feb 2014 00:08:19 +0000 (19:08 -0500)
commit76a423a3f8f16bfc7fb86360a620be18c775b94d
tree79afe85602c388647b06b9bf00c663ff44256244
parenta9fa6e6ac29709e7a623b60695c172da675df045
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>
drivers/net/phy/phy.c
drivers/net/phy/phy_device.c
include/linux/phy.h