diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2021-12-06 17:57:52 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-12-08 23:31:15 +0100 |
commit | 36cbf39b56908bb2e7e8e392e5f08895c3ca4326 (patch) | |
tree | b0ec5a13c683593d46a164a22f26b02b6e48f059 /net/dsa/switch.c | |
parent | net: dsa: mv88e6xxx: compute port vlan membership based on dp->bridge_dev com... (diff) | |
download | linux-36cbf39b56908bb2e7e8e392e5f08895c3ca4326.tar.xz linux-36cbf39b56908bb2e7e8e392e5f08895c3ca4326.zip |
net: dsa: hide dp->bridge_dev and dp->bridge_num in the core 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.
Create 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 'net/dsa/switch.c')
-rw-r--r-- | net/dsa/switch.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/dsa/switch.c b/net/dsa/switch.c index bb155a16d454..7993192fe769 100644 --- a/net/dsa/switch.c +++ b/net/dsa/switch.c @@ -151,11 +151,9 @@ static int dsa_switch_bridge_leave(struct dsa_switch *ds, */ if (change_vlan_filtering && ds->vlan_filtering_is_global) { dsa_switch_for_each_port(dp, ds) { - struct net_device *bridge_dev; + struct net_device *br = dsa_port_bridge_dev_get(dp); - bridge_dev = dp->bridge_dev; - - if (bridge_dev && br_vlan_enabled(bridge_dev)) { + if (br && br_vlan_enabled(br)) { change_vlan_filtering = false; break; } |