ethtool: Add phy statistics
Ethernet PHYs can maintain statistics, for example errors while idle and receive errors. Add an ethtool mechanism to retrieve these statistics, using the same model as MAC statistics. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
a3748a9c7f
commit
f3a4094558
@@ -589,6 +589,12 @@ struct phy_driver {
|
||||
int (*module_eeprom)(struct phy_device *dev,
|
||||
struct ethtool_eeprom *ee, u8 *data);
|
||||
|
||||
/* Get statistics from the phy using ethtool */
|
||||
int (*get_sset_count)(struct phy_device *dev);
|
||||
void (*get_strings)(struct phy_device *dev, u8 *data);
|
||||
void (*get_stats)(struct phy_device *dev,
|
||||
struct ethtool_stats *stats, u64 *data);
|
||||
|
||||
struct device_driver driver;
|
||||
};
|
||||
#define to_phy_driver(d) container_of(d, struct phy_driver, driver)
|
||||
|
Reference in New Issue
Block a user