]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Centralize VLAN-aware bridge ref counting
authorIdo Schimmel <idosch@mellanox.com>
Mon, 20 Jun 2016 21:04:06 +0000 (23:04 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jun 2016 09:02:49 +0000 (05:02 -0400)
commit832baf712ad9f73f2e933c9bfae2271c241b1388
tree347d41b9c5065869af918082d5e3e2865763bf2f
parent2ba172aa4a71c8c1aa555dbc4666a2b2625358e4
mlxsw: spectrum: Centralize VLAN-aware bridge ref counting

We hold a reference count on the number of ports member in the
VLAN-aware bridge, as we only support one.

Instead of always incrementing / decrementing the reference count after
joining / leaving the bridge, simply do this accounting in the join /
leave functions.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c