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>
This commit is contained in:
parent
a9fa6e6ac2
commit
76a423a3f8
3 changed files with 10 additions and 3 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue