b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | From 0a7e5a60bdd559d092912adb34bc99c6457d3fb6 Mon Sep 17 00:00:00 2001 |
| 2 | From: Claudiu Manoil <claudiu.manoil@nxp.com> |
| 3 | Date: Sat, 9 Nov 2019 15:02:58 +0200 |
| 4 | Subject: [PATCH] net: mscc: ocelot: initialize list of multicast addresses in |
| 5 | common code |
| 6 | |
| 7 | This is just common path code that belongs to ocelot_init, |
| 8 | it has nothing to do with a specific SoC/board instance. |
| 9 | |
| 10 | Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> |
| 11 | Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> |
| 12 | Signed-off-by: David S. Miller <davem@davemloft.net> |
| 13 | --- |
| 14 | drivers/net/ethernet/mscc/ocelot.c | 1 + |
| 15 | drivers/net/ethernet/mscc/ocelot_board.c | 1 - |
| 16 | 2 files changed, 1 insertion(+), 1 deletion(-) |
| 17 | |
| 18 | --- a/drivers/net/ethernet/mscc/ocelot.c |
| 19 | +++ b/drivers/net/ethernet/mscc/ocelot.c |
| 20 | @@ -2242,6 +2242,7 @@ int ocelot_init(struct ocelot *ocelot) |
| 21 | if (!ocelot->stats_queue) |
| 22 | return -ENOMEM; |
| 23 | |
| 24 | + INIT_LIST_HEAD(&ocelot->multicast); |
| 25 | ocelot_mact_init(ocelot); |
| 26 | ocelot_vlan_init(ocelot); |
| 27 | ocelot_ace_init(ocelot); |
| 28 | --- a/drivers/net/ethernet/mscc/ocelot_board.c |
| 29 | +++ b/drivers/net/ethernet/mscc/ocelot_board.c |
| 30 | @@ -372,7 +372,6 @@ static int mscc_ocelot_probe(struct plat |
| 31 | ocelot->ports = devm_kcalloc(&pdev->dev, ocelot->num_phys_ports, |
| 32 | sizeof(struct ocelot_port *), GFP_KERNEL); |
| 33 | |
| 34 | - INIT_LIST_HEAD(&ocelot->multicast); |
| 35 | ocelot_init(ocelot); |
| 36 | |
| 37 | for_each_available_child_of_node(ports, portnp) { |