diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2018-04-25 15:12:52 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-27 11:53:03 -0400 |
commit | cf963573039a333eff7156629e61a06e59da61cf (patch) | |
tree | 78375bd5f5d00dab15a09c64c962b59ed93601ab /include/net/dsa.h | |
parent | 6207a78c098a183df1620c1e2cbf620a4cc7c3e3 (diff) |
net: dsa: Allow providing PHY statistics from CPU port
Implement the same type of ethtool diversion that we have for
ETH_SS_STATS and make it work with ETH_SS_PHY_STATS. This allows
providing PHY level statistics for CPU ports that are directly
connecting to a PHY device.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/dsa.h')
-rw-r--r-- | include/net/dsa.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index 0bc0aad1b02e..462e9741b210 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h | |||
@@ -361,6 +361,8 @@ struct dsa_switch_ops { | |||
361 | void (*get_ethtool_stats)(struct dsa_switch *ds, | 361 | void (*get_ethtool_stats)(struct dsa_switch *ds, |
362 | int port, uint64_t *data); | 362 | int port, uint64_t *data); |
363 | int (*get_sset_count)(struct dsa_switch *ds, int port, int sset); | 363 | int (*get_sset_count)(struct dsa_switch *ds, int port, int sset); |
364 | void (*get_ethtool_phy_stats)(struct dsa_switch *ds, | ||
365 | int port, uint64_t *data); | ||
364 | 366 | ||
365 | /* | 367 | /* |
366 | * ethtool Wake-on-LAN | 368 | * ethtool Wake-on-LAN |
@@ -589,4 +591,9 @@ static inline int call_dsa_notifiers(unsigned long val, struct net_device *dev, | |||
589 | #define BRCM_TAG_GET_PORT(v) ((v) >> 8) | 591 | #define BRCM_TAG_GET_PORT(v) ((v) >> 8) |
590 | #define BRCM_TAG_GET_QUEUE(v) ((v) & 0xff) | 592 | #define BRCM_TAG_GET_QUEUE(v) ((v) & 0xff) |
591 | 593 | ||
594 | |||
595 | int dsa_port_get_phy_strings(struct dsa_port *dp, uint8_t *data); | ||
596 | int dsa_port_get_ethtool_phy_stats(struct dsa_port *dp, uint64_t *data); | ||
597 | int dsa_port_get_phy_sset_count(struct dsa_port *dp); | ||
598 | |||
592 | #endif | 599 | #endif |