diff options
author | Ioana Ciornei <ioana.ciornei@nxp.com> | 2019-06-13 09:37:51 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-15 13:29:32 -0700 |
commit | ef7bfa84725d891bbdb88707ed55b2cbf94942bb (patch) | |
tree | 22137c5cb7422c35ee37ace2d26823a1912ed6bf /drivers | |
parent | 35fc07aee8f6d55aeacdbfdccc425e684737f741 (diff) |
net: phylink: set the autoneg state in phylink_phy_change
The phy_state field of phylink should carry only valid information
especially when this can be passed to the .mac_config callback.
Update the an_enabled field with the autoneg state in the
phylink_phy_change function.
Fixes: 9525ae83959b ("phylink: add phylink infrastructure")
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/phy/phylink.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index 4c0616ba314d..c638e13fbf81 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -635,6 +635,7 @@ static void phylink_phy_change(struct phy_device *phydev, bool up, pl->phy_state.pause |= MLO_PAUSE_ASYM; pl->phy_state.interface = phydev->interface; pl->phy_state.link = up; + pl->phy_state.an_enabled = phydev->autoneg; mutex_unlock(&pl->state_mutex); phylink_run_resolve(pl); |