generic: provide get_port_stats() on ar8xxx switches
authorThibaut VARENE <hacks@slashdirt.org>
Fri, 4 Aug 2017 10:28:23 +0000 (12:28 +0200)
committerJohn Crispin <john@phrozen.org>
Fri, 1 Sep 2017 07:30:35 +0000 (09:30 +0200)
commit4d8a66d9346373c2a7fcac5bdae3f662a9dbd9df
treefd5b5a63dd8d2a0c55cd95575c0c31b169a9b175
parent2b3ab0208eddadbf4413576eb57e608ee6e45d5c
generic: provide get_port_stats() on ar8xxx switches

This patch provides a generic switch_dev_ops 'get_port_stats()' callback by
taping into the relevant port MIB counters.

The implementation uses a generic callback that select the correct MIB counter
index based on chip version.

This callback is used by swconfig_leds led trigger to blink LEDs with port
network traffic.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
target/linux/generic/files/drivers/net/phy/ar8216.c
target/linux/generic/files/drivers/net/phy/ar8216.h
target/linux/generic/files/drivers/net/phy/ar8327.c