diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2021-12-06 18:57:53 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-12-08 14:31:15 -0800 |
commit | 41fb0cf1bced59c1fe178cf6cc9f716b5da9e40e (patch) | |
tree | 7cb05115b0a0269d3d88d41a7cac4d4d81e903c7 /drivers/net/dsa/mt7530.c | |
parent | net: dsa: hide dp->bridge_dev and dp->bridge_num in the core behind helpers (diff) | |
download | linux-dev-41fb0cf1bced59c1fe178cf6cc9f716b5da9e40e.tar.xz linux-dev-41fb0cf1bced59c1fe178cf6cc9f716b5da9e40e.zip |
net: dsa: hide dp->bridge_dev and dp->bridge_num in drivers behind helpers
The location of the bridge device pointer and number is going to change.
It is not going to be kept individually per port, but in a common
structure allocated dynamically and which will have lockdep validation.
Use the helpers to access these elements so that we have a migration
path to the new organization.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa/mt7530.c')
-rw-r--r-- | drivers/net/dsa/mt7530.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index f7238f09d395..73c9f79f9e9f 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -1204,7 +1204,7 @@ mt7530_port_bridge_join(struct dsa_switch *ds, int port, * same bridge. If the port is disabled, port matrix is kept * and not being setup until the port becomes enabled. */ - if (other_dp->bridge_dev != bridge) + if (dsa_port_bridge_dev_get(other_dp) != bridge) continue; if (priv->ports[other_port].enable) @@ -1240,7 +1240,7 @@ mt7530_port_set_vlan_unaware(struct dsa_switch *ds, int port) /* This is called after .port_bridge_leave when leaving a VLAN-aware * bridge. Don't set standalone ports to fallback mode. */ - if (dsa_to_port(ds, port)->bridge_dev) + if (dsa_port_bridge_dev_get(dsa_to_port(ds, port))) mt7530_rmw(priv, MT7530_PCR_P(port), PCR_PORT_VLAN_MASK, MT7530_PORT_FALLBACK_MODE); @@ -1320,7 +1320,7 @@ mt7530_port_bridge_leave(struct dsa_switch *ds, int port, * in the same bridge. If the port is disabled, port matrix * is kept and not being setup until the port becomes enabled. */ - if (other_dp->bridge_dev != bridge) + if (dsa_port_bridge_dev_get(other_dp) != bridge) continue; if (priv->ports[other_port].enable) |