mlxsw: spectrum: Check requested ageing time is valid
authorIdo Schimmel <idosch@mellanox.com>
Tue, 8 Mar 2016 20:59:33 +0000 (12:59 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Mar 2016 19:47:58 +0000 (14:47 -0500)
commit869f63a4d28144c03c8f4a4c0d1e8f31f8c11a10
tree31c59e1e25152de938722304ff781819c32fbcde
parent8e2ad4113ce4671686740f808ff2795395c39eef
mlxsw: spectrum: Check requested ageing time is valid

Commit c62987bbd8a1 ("bridge: push bridge setting ageing_time down to
switchdev") added a check for minimum and maximum ageing time, but this
breaks existing behaviour where one can set ageing time to 0 for a
non-learning bridge.

Push this check down to the driver and allow the check in the bridge
layer to be removed. Currently ageing time 0 is refused by the driver,
but we can later add support for this functionality.

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