aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/qca8k.c
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2021-12-06 18:57:53 +0200
committerJakub Kicinski <kuba@kernel.org>2021-12-08 14:31:15 -0800
commit41fb0cf1bced59c1fe178cf6cc9f716b5da9e40e (patch)
tree7cb05115b0a0269d3d88d41a7cac4d4d81e903c7 /drivers/net/dsa/qca8k.c
parentnet: dsa: hide dp->bridge_dev and dp->bridge_num in the core behind helpers (diff)
downloadlinux-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/qca8k.c')
-rw-r--r--drivers/net/dsa/qca8k.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
index 96a7fbf8700c..7053a3510d71 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -1823,7 +1823,7 @@ qca8k_port_bridge_join(struct dsa_switch *ds, int port, struct net_device *br)
for (i = 0; i < QCA8K_NUM_PORTS; i++) {
if (dsa_is_cpu_port(ds, i))
continue;
- if (dsa_to_port(ds, i)->bridge_dev != br)
+ if (dsa_port_bridge_dev_get(dsa_to_port(ds, i)) != br)
continue;
/* Add this port to the portvlan mask of the other ports
* in the bridge
@@ -1855,7 +1855,7 @@ qca8k_port_bridge_leave(struct dsa_switch *ds, int port, struct net_device *br)
for (i = 0; i < QCA8K_NUM_PORTS; i++) {
if (dsa_is_cpu_port(ds, i))
continue;
- if (dsa_to_port(ds, i)->bridge_dev != br)
+ if (dsa_port_bridge_dev_get(dsa_to_port(ds, i)) != br)
continue;
/* Remove this port to the portvlan mask of the other ports
* in the bridge