summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale/dpaa2
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2022-11-29 16:12:17 +0200
committerPaolo Abeni <pabeni@redhat.com>2022-12-01 13:40:22 +0100
commitbc230671bfb25c2d3c225f674fe6c03cea88d22e (patch)
tree7f20ca3a598e085e585f070f3081a80aebc5aaf0 /drivers/net/ethernet/freescale/dpaa2
parent29811d6e19d795efcf26644b66c4152abbac35a6 (diff)
net: dpaa2-switch replace direct MAC access with dpaa2_switch_port_has_mac()
The helper function will gain a lockdep annotation in a future patch. Make sure to benefit from it. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com> Tested-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/ethernet/freescale/dpaa2')
-rw-r--r--drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c
index 40ee57ef55be..76a4b09e2854 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c
@@ -189,7 +189,7 @@ static void dpaa2_switch_ethtool_get_stats(struct net_device *netdev,
dpaa2_switch_ethtool_counters[i].name, err);
}
- if (port_priv->mac)
+ if (dpaa2_switch_port_has_mac(port_priv))
dpaa2_mac_get_ethtool_stats(port_priv->mac, data + i);
}