summaryrefslogtreecommitdiff
path: root/drivers/net/phy/phylink.c
diff options
context:
space:
mode:
authorOng Boon Leong <boon.leong.ong@intel.com>2021-03-15 08:27:08 +0300
committerDavid S. Miller <davem@davemloft.net>2021-03-15 22:53:12 +0300
commitab39385021d1e0b4cd6cc521dc35c2fe659bbddf (patch)
treed07baa62dab9645c39f7ab6cabdf4ea9685152d8 /drivers/net/phy/phylink.c
parentb97b5331b8ab7f60fb880e0c31c9b09b73d2fa4e (diff)
downloadlinux-ab39385021d1e0b4cd6cc521dc35c2fe659bbddf.tar.xz
net: phylink: make phylink_parse_mode() support non-DT platform
Certain platform does not support DT, so we make phylink_parse_mode() to allow non-DT platform to use it to setup in-band AN advertising. Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phylink.c')
-rw-r--r--drivers/net/phy/phylink.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 053c92e02cd8..12a047d47dec 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -271,8 +271,9 @@ static int phylink_parse_mode(struct phylink *pl, struct fwnode_handle *fwnode)
pl->cfg_link_an_mode = MLO_AN_FIXED;
fwnode_handle_put(dn);
- if (fwnode_property_read_string(fwnode, "managed", &managed) == 0 &&
- strcmp(managed, "in-band-status") == 0) {
+ if ((fwnode_property_read_string(fwnode, "managed", &managed) == 0 &&
+ strcmp(managed, "in-band-status") == 0) ||
+ pl->config->ovr_an_inband) {
if (pl->cfg_link_an_mode == MLO_AN_FIXED) {
phylink_err(pl,
"can't use both fixed-link and in-band-status\n");