]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: core: Create a generic function to register / unregister traps
authorNogah Frankel <nogahf@mellanox.com>
Fri, 25 Nov 2016 09:33:30 +0000 (10:33 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Nov 2016 02:22:14 +0000 (21:22 -0500)
commit596affd433f7e1dcb9654c2c51df58adf9f957b1
treef9ef6011d77ff8f3676c9775ed20d3baba9a020b
parentf882310b62d8ca3ed60f5451e970601614730c66
mlxsw: core: Create a generic function to register / unregister traps

We have 2 types of HW traps to handle, rx traps and events.
The registration workflow for both is very similar. So it only make
sense to create one function to handle both.

This patch creates a struct to hold the data for both cases. It also
creates a registration and an un-registration functions that get this
generic struct as input.

Signed-off-by: Nogah Frankel <nogahf@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@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