diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2021-12-06 17:57:48 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-12-08 23:31:14 +0100 |
commit | 947c8746e2c31bb469ba9ee02dc739be6a98ee38 (patch) | |
tree | d79bf7336fbc938ae82d29cb222ec871459a4ece /drivers/net/dsa/mv88e6xxx/chip.c | |
parent | net: dsa: make dp->bridge_num one-based (diff) | |
download | linux-947c8746e2c31bb469ba9ee02dc739be6a98ee38.tar.xz linux-947c8746e2c31bb469ba9ee02dc739be6a98ee38.zip |
net: dsa: assign a bridge number even without TX forwarding offload
The service where DSA assigns a unique bridge number for each forwarding
domain is useful even for drivers which do not implement the TX
forwarding offload feature.
For example, drivers might use the dp->bridge_num for FDB isolation.
So rename ds->num_fwd_offloading_bridges to ds->max_num_bridges, and
calculate a unique bridge_num for all drivers that set this value.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/chip.c')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/chip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index de3401b2c86c..a818df35b239 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -3186,8 +3186,8 @@ static int mv88e6xxx_setup(struct dsa_switch *ds) * time. */ if (mv88e6xxx_has_pvt(chip)) - ds->num_fwd_offloading_bridges = MV88E6XXX_MAX_PVT_SWITCHES - - ds->dst->last_switch - 1; + ds->max_num_bridges = MV88E6XXX_MAX_PVT_SWITCHES - + ds->dst->last_switch - 1; mv88e6xxx_reg_lock(chip); |