diff options
author | Andrew Lunn <andrew@lunn.ch> | 2016-11-21 23:26:58 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-11-22 09:55:30 -0500 |
commit | a605a0fe7115ead62f9a2e93819e21776261efec (patch) | |
tree | a711d4b3434153c6daa4252cb5df18b556323342 /drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | |
parent | net: dsa: mv88e6xxx: Add the mv88e6390 family (diff) | |
download | linux-dev-a605a0fe7115ead62f9a2e93819e21776261efec.tar.xz linux-dev-a605a0fe7115ead62f9a2e93819e21776261efec.zip |
net: dsa: mv88e6xxx: Abstract stats_snapshot into ops structure
Taking a stats snapshot differs between same families. Abstract this
into an ops member. At the same time, move the code into global1.[ch],
since the registers are in the global1 range.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h b/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h index de179c59f5cf..7c61cf626e56 100644 --- a/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h +++ b/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h @@ -794,6 +794,11 @@ struct mv88e6xxx_ops { * Use SPEED_UNFORCED for normal detection, SPEED_MAX for max value. */ int (*port_set_speed)(struct mv88e6xxx_chip *chip, int port, int speed); + + /* Snapshot the statistics for a port. The statistics can then + * be read back a leisure but still with a consistent view. + */ + int (*stats_snapshot)(struct mv88e6xxx_chip *chip, int port); }; enum stat_type { |