aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/drivers/net/phy/ar8327.c
diff options
context:
space:
mode:
authorThibaut VARENE <hacks@slashdirt.org>2017-08-04 12:28:23 +0200
committerJohn Crispin <john@phrozen.org>2017-09-01 09:30:35 +0200
commit4d8a66d9346373c2a7fcac5bdae3f662a9dbd9df (patch)
treefd5b5a63dd8d2a0c55cd95575c0c31b169a9b175 /target/linux/generic/files/drivers/net/phy/ar8327.c
parent2b3ab0208eddadbf4413576eb57e608ee6e45d5c (diff)
downloadupstream-4d8a66d9346373c2a7fcac5bdae3f662a9dbd9df.tar.gz
upstream-4d8a66d9346373c2a7fcac5bdae3f662a9dbd9df.tar.bz2
upstream-4d8a66d9346373c2a7fcac5bdae3f662a9dbd9df.zip
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>
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy/ar8327.c')
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8327.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c
index 24a13c6418..bae9744736 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8327.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.c
@@ -1411,6 +1411,7 @@ static const struct switch_dev_ops ar8327_sw_ops = {
.apply_config = ar8327_sw_hw_apply,
.reset_switch = ar8xxx_sw_reset_switch,
.get_port_link = ar8xxx_sw_get_port_link,
+ .get_port_stats = ar8xxx_sw_get_port_stats,
};
const struct ar8xxx_chip ar8327_chip = {