Skip to content

Commit 9414819

Browse files
joabreudavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c580165 commit 9414819

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/phy/phylink.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,9 @@ static int phylink_parse_mode(struct phylink *pl, struct fwnode_handle *fwnode)
340340
"failed to validate link configuration for in-band status\n");
341341
return -EINVAL;
342342
}
343+
344+
/* Check if MAC/PCS also supports Autoneg. */
345+
pl->link_config.an_enabled = phylink_test(pl->supported, Autoneg);
343346
}
344347

345348
return 0;

0 commit comments

Comments
 (0)