mlxsw: spectrum_switchdev: Create common functions for VLAN-aware bridge
authorAmit Cohen <amcohen@nvidia.com>
Sun, 29 Nov 2020 12:54:03 +0000 (14:54 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 1 Dec 2020 23:21:12 +0000 (15:21 -0800)
commit773ce33a48602126499bd603b9c804f15bf8c730
treeb365bd4cd447b5c0798e4caf6e77376f987dc362
parent3ae7a65b6424154cb5d606ccae27ffd0ac76ed56
mlxsw: spectrum_switchdev: Create common functions for VLAN-aware bridge

The code in mlxsw_sp_bridge_8021q_port_{join, leave}() can be used also
for 802.1ad bridge.

Move the code to functions called
mlxsw_sp_bridge_vlan_aware_port_{join, leave}() and call them from
mlxsw_sp_bridge_8021q_port_{join, leave}() respectively to enable code
reuse.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c