netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: phylink: set the autoneg state in phylink_phy_change
@ 2019-06-13  6:37 Ioana Ciornei
  2019-06-13  7:45 ` Ioana Ciornei
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Ioana Ciornei @ 2019-06-13  6:37 UTC (permalink / raw)
  To: linux, andrew, f.fainelli, hkallweit1, davem; +Cc: netdev, Ioana Ciornei

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>
---
 drivers/net/phy/phylink.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 5d0af041b8f9..dd1feb7b5472 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -688,6 +688,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);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-06-20 14:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-13  6:37 [PATCH] net: phylink: set the autoneg state in phylink_phy_change Ioana Ciornei
2019-06-13  7:45 ` Ioana Ciornei
2019-06-13  8:14 ` Russell King - ARM Linux admin
2019-06-13  8:55   ` Ioana Ciornei
2019-06-13  9:34     ` Russell King - ARM Linux admin
2019-06-13 14:32       ` Ioana Ciornei
2019-06-13 14:41         ` Russell King - ARM Linux admin
2019-06-13 14:56           ` Ioana Ciornei
2019-06-15 20:30 ` David Miller
2019-06-15 22:13   ` Russell King - ARM Linux admin
2019-06-16  1:08     ` David Miller
2019-06-16  9:42       ` Russell King - ARM Linux admin
2019-06-20 14:40         ` Ioana Ciornei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).