OSDN Git Service

mlxsw: spectrum_switchdev: Don't write mids to the HW when mc is disabled
authorNogah Frankel <nogahf@mellanox.com>
Wed, 20 Sep 2017 14:15:08 +0000 (16:15 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Sep 2017 01:03:12 +0000 (18:03 -0700)
commit846fd8a0e7dcd9f455a86dc17ddf0a51c124f9c0
treede1b090b3087d70108e89562d2d84459b123417c
parent061e55bfb83e632afcd34130bb19fe7a32325b02
mlxsw: spectrum_switchdev: Don't write mids to the HW when mc is disabled

Don't write multicast related data to the HW when mc is disabled.
Also, don't allocate mid id to new mids (so the remove function could know
that they weren't wrote to the HW)

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/spectrum_switchdev.c