ipq806x: swap lan leds for Meraki MR52
[openwrt/staging/pepe2k.git] / target / linux / armsr / patches-6.1 / 701-v6.2-0008-net-dpaa2-switch-replace-direct-MAC-access-with-dpaa.patch
1 From c838d9fd7e6ba9ddd6006bf0a296396266e9f121 Mon Sep 17 00:00:00 2001
2 From: Vladimir Oltean <vladimir.oltean@nxp.com>
3 Date: Tue, 29 Nov 2022 16:12:17 +0200
4 Subject: [PATCH 10/14] net: dpaa2-switch replace direct MAC access with
5 dpaa2_switch_port_has_mac()
6
7 The helper function will gain a lockdep annotation in a future patch.
8 Make sure to benefit from it.
9
10 Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
11 Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com>
12 Tested-by: Ioana Ciornei <ioana.ciornei@nxp.com>
13 Signed-off-by: Paolo Abeni <pabeni@redhat.com>
14 ---
15 drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c
19 +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c
20 @@ -189,7 +189,7 @@ static void dpaa2_switch_ethtool_get_sta
21 dpaa2_switch_ethtool_counters[i].name, err);
22 }
23
24 - if (port_priv->mac)
25 + if (dpaa2_switch_port_has_mac(port_priv))
26 dpaa2_mac_get_ethtool_stats(port_priv->mac, data + i);
27 }
28