提交 d25fde64 编写于 作者: H Horatiu Vultur 提交者: David S. Miller

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: 7c588c3e ("net: ocelot: Extend MRP")
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NHoratiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 536e1004
......@@ -177,7 +177,7 @@ int ocelot_mrp_del(struct ocelot *ocelot, int port,
goto out;
}
ocelot_mrp_del_mac(ocelot, ocelot_port);
ocelot_mrp_del_mac(ocelot, ocelot->ports[port]);
out:
return 0;
}
......@@ -251,7 +251,7 @@ int ocelot_mrp_del_ring_role(struct ocelot *ocelot, int port,
goto out;
}
ocelot_mrp_del_mac(ocelot, ocelot_port);
ocelot_mrp_del_mac(ocelot, ocelot->ports[port]);
out:
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册