mlxsw: spectrum: Teach mlxsw_sp_port_vlan_set to accept any vlan range
authorJiri Pirko <jiri@mellanox.com>
Tue, 18 Apr 2017 14:55:35 +0000 (16:55 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Apr 2017 19:32:30 +0000 (15:32 -0400)
commit93cd081305092929a8be1ebed9eb5bcbe54e4b7d
tree53da1c57ebd1ad2246c2ef6c11722cd24c30faf2
parentcedbb8b25948764689385075fce793e63fab9973
mlxsw: spectrum: Teach mlxsw_sp_port_vlan_set to accept any vlan range

So far, mlxsw_sp_port_vlan_set range is limited by
MLXSW_REG_SPVM_REC_MAX_COUNT. In spectrum_switchdev code this is
wrapped up by a helper function which actually does multiple calls
to FW for bigger ranges. Move the code into mlxsw_sp_port_vlan_set
and use it always. That allows caller not to care about the range.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@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