aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/dsa/ocelot/felix.c
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2023-07-05 13:44:21 +0300
committerJakub Kicinski <kuba@kernel.org>2023-07-06 19:10:22 -0700
commitc60819149b637d0f9f7f66e110d2a0d90a3993ea (patch)
tree02933f4acc429e2534e63682ccbd8843cb13f95d /drivers/net/dsa/ocelot/felix.c
parentnet: mscc: ocelot: extend ocelot->fwd_domain_lock to cover ocelot->tas_lock (diff)
downloadwireguard-linux-c60819149b637d0f9f7f66e110d2a0d90a3993ea.tar.xz
wireguard-linux-c60819149b637d0f9f7f66e110d2a0d90a3993ea.zip
net: dsa: felix: make vsc9959_tas_guard_bands_update() visible to ocelot->ops
In a future change we will need to make ocelot_port_update_active_preemptible_tcs() call vsc9959_tas_guard_bands_update(), but that is currently not possible, since the ocelot switch lib does not have access to functions private to the DSA wrapper. Move the pointer to vsc9959_tas_guard_bands_update() from felix->info (which is private to the DSA driver) to ocelot->ops (which is also visible to the ocelot switch lib). Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Message-ID: <20230705104422.49025-3-vladimir.oltean@nxp.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa/ocelot/felix.c')
-rw-r--r--drivers/net/dsa/ocelot/felix.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c
index 0c1207613aa4..dee43caee19e 100644
--- a/drivers/net/dsa/ocelot/felix.c
+++ b/drivers/net/dsa/ocelot/felix.c
@@ -1786,14 +1786,13 @@ static int felix_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
{
struct ocelot *ocelot = ds->priv;
struct ocelot_port *ocelot_port = ocelot->ports[port];
- struct felix *felix = ocelot_to_felix(ocelot);
ocelot_port_set_maxlen(ocelot, port, new_mtu);
mutex_lock(&ocelot->fwd_domain_lock);
- if (ocelot_port->taprio && felix->info->tas_guard_bands_update)
- felix->info->tas_guard_bands_update(ocelot, port);
+ if (ocelot_port->taprio && ocelot->ops->tas_guard_bands_update)
+ ocelot->ops->tas_guard_bands_update(ocelot, port);
mutex_unlock(&ocelot->fwd_domain_lock);