summaryrefslogtreecommitdiff
path: root/net/dsa/port.c
diff options
context:
space:
mode:
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2021-11-30 13:10:01 +0000
committerJakub Kicinski <kuba@kernel.org>2021-12-01 18:58:00 -0800
commit072eea6c22b2af680c3949e64f9adde278c71e68 (patch)
treee8ff1f87b9c52127e576a41194adaeb37bfe32c4 /net/dsa/port.c
parent21bd64bd717dedac96f53b668144cbe37d3c12d4 (diff)
net: dsa: replace phylink_get_interfaces() with phylink_get_caps()
Phylink needs slightly more information than phylink_get_interfaces() allows us to get from the DSA drivers - we need the MAC capabilities. Replace the phylink_get_interfaces() method with phylink_get_caps() to allow DSA drivers to fill in the phylink_config MAC capabilities field as well. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Marek BehĂșn <kabel@kernel.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/dsa/port.c')
-rw-r--r--net/dsa/port.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/dsa/port.c b/net/dsa/port.c
index eaa66114924b..ef0acf005f8f 100644
--- a/net/dsa/port.c
+++ b/net/dsa/port.c
@@ -1091,9 +1091,8 @@ int dsa_port_phylink_create(struct dsa_port *dp)
if (err)
mode = PHY_INTERFACE_MODE_NA;
- if (ds->ops->phylink_get_interfaces)
- ds->ops->phylink_get_interfaces(ds, dp->index,
- dp->pl_config.supported_interfaces);
+ if (ds->ops->phylink_get_caps)
+ ds->ops->phylink_get_caps(ds, dp->index, &dp->pl_config);
dp->pl = phylink_create(&dp->pl_config, of_fwnode_handle(dp->dn),
mode, &dsa_port_phylink_mac_ops);