mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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>
This commit is contained in:
parent
6207a78c09
commit
cf96357303
3 changed files with 106 additions and 5 deletions
|
@ -361,6 +361,8 @@ struct dsa_switch_ops {
|
|||
void (*get_ethtool_stats)(struct dsa_switch *ds,
|
||||
int port, uint64_t *data);
|
||||
int (*get_sset_count)(struct dsa_switch *ds, int port, int sset);
|
||||
void (*get_ethtool_phy_stats)(struct dsa_switch *ds,
|
||||
int port, uint64_t *data);
|
||||
|
||||
/*
|
||||
* ethtool Wake-on-LAN
|
||||
|
@ -589,4 +591,9 @@ static inline int call_dsa_notifiers(unsigned long val, struct net_device *dev,
|
|||
#define BRCM_TAG_GET_PORT(v) ((v) >> 8)
|
||||
#define BRCM_TAG_GET_QUEUE(v) ((v) & 0xff)
|
||||
|
||||
|
||||
int dsa_port_get_phy_strings(struct dsa_port *dp, uint8_t *data);
|
||||
int dsa_port_get_ethtool_phy_stats(struct dsa_port *dp, uint64_t *data);
|
||||
int dsa_port_get_phy_sset_count(struct dsa_port *dp);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue