mlxsw: spectrum: Change bridge port attributes only when bridged
authorIdo Schimmel <idosch@mellanox.com>
Mon, 4 Jan 2016 09:42:26 +0000 (10:42 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Jan 2016 03:07:58 +0000 (22:07 -0500)
commit6c72a3d0d3e2b3055a04aa6124c2faa3420a30b1
treea4fb0928d1c3db4b46ebbe77a039ede1dfdb56b4
parent5a8f45258eb2ff9da1ee68aad96b1189df8af50e
mlxsw: spectrum: Change bridge port attributes only when bridged

Bridge port attributes are offloaded to hardware when invoked with SELF
flag set, but it really makes no sense to reflect them when port is not
bridged.

Allow a user to change these attribute only when port is bridged and
initialize them correctly when joining or leaving a bridge.

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
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c