mlxsw: spectrum: Adjust switchdev ops for VLAN devices
authorIdo Schimmel <idosch@mellanox.com>
Tue, 15 Dec 2015 15:03:41 +0000 (16:03 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Dec 2015 16:58:22 +0000 (11:58 -0500)
commit54a732018d8e016e899817eda4af517729e0571c
treeefb0c45341c6ef5def9d5ae8b82add9371f034a0
parent9de6a80e061238d0c1765e0b8d71bd22116edd9d
mlxsw: spectrum: Adjust switchdev ops for VLAN devices

switchdev ops can now be called for VLAN devices and we need to be
prepared for it. Until now they were only called for the port netdev.

Use the newly propagated orig_dev passed as part of the switchdev
attr/obj and determine whether the original device is a VLAN device. If
so, act accordingly, otherwise continue as usual.

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