2
0
forked from Ivasoft/openwrt

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>
This commit is contained in:
Thibaut VARENE
2017-08-04 12:28:23 +02:00
committed by John Crispin
parent 2b3ab0208e
commit 4d8a66d934
3 changed files with 61 additions and 0 deletions

View File

@@ -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 = {