diff options
Diffstat (limited to 'drivers/net/dsa/ocelot/felix.c')
-rw-r--r-- | drivers/net/dsa/ocelot/felix.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c index 187893678f66..84cfaf163f0e 100644 --- a/drivers/net/dsa/ocelot/felix.c +++ b/drivers/net/dsa/ocelot/felix.c @@ -999,9 +999,14 @@ static void felix_phylink_validate(struct dsa_switch *ds, int port, { struct ocelot *ocelot = ds->priv; struct felix *felix = ocelot_to_felix(ocelot); + unsigned long caps; - if (felix->info->phylink_validate) - felix->info->phylink_validate(ocelot, port, supported, state); + if (!felix->info->phylink_caps) + return; + + caps = felix->info->phylink_caps(state->interface); + + phylink_validate_mask_caps(supported, state, caps); } static struct phylink_pcs *felix_phylink_mac_select_pcs(struct dsa_switch *ds, |