summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale/dpaa2/dpmac-cmd.h
diff options
context:
space:
mode:
authorIoana Ciornei <ioana.ciornei@nxp.com>2019-11-07 12:44:48 +0200
committerDavid S. Miller <davem@davemloft.net>2019-11-07 15:31:53 -0800
commit991df1fbb0dc3b44a88b4775b32d95839bf779e6 (patch)
treee2e922d4388dbda32d3bbe4b680c3ac90fe59616 /drivers/net/ethernet/freescale/dpaa2/dpmac-cmd.h
parent88c8562b16a031045acb519fcbaae9908f323017 (diff)
dpaa2-eth: add ethtool MAC counters
When a DPNI is connected to a MAC, export its associated counters. Ethtool related functions are added in dpaa2_mac for returning the number of counters, their strings and also their values. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/dpaa2/dpmac-cmd.h')
-rw-r--r--drivers/net/ethernet/freescale/dpaa2/dpmac-cmd.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpmac-cmd.h b/drivers/net/ethernet/freescale/dpaa2/dpmac-cmd.h
index 96a9b0d0992e..3ea51dd9374b 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpmac-cmd.h
+++ b/drivers/net/ethernet/freescale/dpaa2/dpmac-cmd.h
@@ -22,6 +22,8 @@
#define DPMAC_CMDID_GET_ATTR DPMAC_CMD(0x004)
#define DPMAC_CMDID_SET_LINK_STATE DPMAC_CMD_V2(0x0c3)
+#define DPMAC_CMDID_GET_COUNTER DPMAC_CMD(0x0c4)
+
/* Macros for accessing command fields smaller than 1byte */
#define DPMAC_MASK(field) \
GENMASK(DPMAC_##field##_SHIFT + DPMAC_##field##_SIZE - 1, \
@@ -59,4 +61,13 @@ struct dpmac_cmd_set_link_state {
__le64 advertising;
};
+struct dpmac_cmd_get_counter {
+ u8 id;
+};
+
+struct dpmac_rsp_get_counter {
+ u64 pad;
+ u64 counter;
+};
+
#endif /* _FSL_DPMAC_CMD_H */