Skip to content

Commit

Permalink
net: phylink: set the autoneg state in phylink_phy_change
Browse files Browse the repository at this point in the history
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: 9525ae8 ("phylink: add phylink infrastructure")
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ioana Ciornei authored and David S. Miller committed Jun 15, 2019
1 parent 35fc07a commit ef7bfa8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/phy/phylink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ef7bfa8

Please sign in to comment.