mlxsw: spectrum_trap: Prepare mlxsw_core_trap_action_set() to handle not only action
authorJiri Pirko <jiri@mellanox.com>
Mon, 24 Feb 2020 07:35:46 +0000 (08:35 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Feb 2020 19:55:06 +0000 (11:55 -0800)
commit4a23d45a3e0cfaf9676ba2e67f2c2bca5a1478f0
tree56ea155130d5823c08f9a1ab2afaf01b39e0baa4
parent99ff9cc249ff3c75aa12f52f12a35b3b9cfa32f7
mlxsw: spectrum_trap: Prepare mlxsw_core_trap_action_set() to handle not only action

Rename function mlxsw_core_trap_action_set() to
mlxsw_core_trap_state_set() and pass bool enabled instead of action.
Figure out the action according to the enabled state there.

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