]> git.baikalelectronics.ru Git - kernel.git/commit
net: ocelot: Fix deletetion of MRP entries from MAC table
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Thu, 18 Mar 2021 19:29:38 +0000 (20:29 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Mar 2021 02:13:42 +0000 (19:13 -0700)
commitea14a222cddaf894a5e329d334f087c21ec853aa
tree1965afedbe12717a4b370d06144ba3cf28b69d04
parent6fcc1ac91b65e4467d9bad26c0b903785e689bae
net: ocelot: Fix deletetion of MRP entries from MAC table

When a MRP ring was deleted or disabled, the driver was iterating over
the ports to detect if any other MPR rings exists and in case it didn't
exist it would delete the MAC table entry. But the problem was that it
used the last iterated port to delete the MAC table entry and this could
be a NULL port.

The fix consists of using the port on which the function was called.

Fixes: 851ffc78844fbb76 ("net: ocelot: Extend MRP")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot_mrp.c