summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJose Abreu <Jose.Abreu@synopsys.com>2020-03-09 09:36:25 +0100
committerDavid S. Miller <davem@davemloft.net>2020-03-09 20:13:16 -0700
commit9414819654cc2968e7cca5014ed9ee433dbf2297 (patch)
tree85a154068492110fbc76053fe53b4047fe4a72cc /drivers
parentc580165ffbf24fbda5c42de269021766911221f4 (diff)
net: phylink: Test if MAC/PCS support Autoneg
We may have cases where MAC or PCS do not support Autoneg. Check if it is supported after validate callback is called. Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/phy/phylink.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 47f4ce02d7bc..19db68d74cb4 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -340,6 +340,9 @@ static int phylink_parse_mode(struct phylink *pl, struct fwnode_handle *fwnode)
"failed to validate link configuration for in-band status\n");
return -EINVAL;
}
+
+ /* Check if MAC/PCS also supports Autoneg. */
+ pl->link_config.an_enabled = phylink_test(pl->supported, Autoneg);
}
return 0;