summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/net/dsa.h2
-rw-r--r--net/dsa/slave.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h
index 4e60d2610f20..090187ea0114 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -456,6 +456,8 @@ struct dsa_switch_ops {
/*
* PHYLINK integration
*/
+ void (*phylink_get_interfaces)(struct dsa_switch *ds, int port,
+ unsigned long *supported_interfaces);
void (*phylink_validate)(struct dsa_switch *ds, int port,
unsigned long *supported,
struct phylink_link_state *state);
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 4a0498bf6c65..2c8a833467e8 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -1694,6 +1694,10 @@ static int dsa_slave_phy_setup(struct net_device *slave_dev)
dp->pl_config.poll_fixed_state = true;
}
+ if (ds->ops->phylink_get_interfaces)
+ ds->ops->phylink_get_interfaces(ds, dp->index,
+ dp->pl_config.supported_interfaces);
+
dp->pl = phylink_create(&dp->pl_config, of_fwnode_handle(port_dn), mode,
&dsa_port_phylink_mac_ops);
if (IS_ERR(dp->pl)) {