diff options
author | Thibaut VARENE <hacks@slashdirt.org> | 2017-08-04 12:29:52 +0200 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2017-09-01 09:30:35 +0200 |
commit | 0369e358916ef092a1644334f5dd1412051b68a4 (patch) | |
tree | 3778611278cb84aeaf772f7072ccf9e0ca1d6d98 /target/linux/generic/files/drivers/net/phy/rtl8366_smi.h | |
parent | 3056d09b4046e0eb0f6de0f3f5432cd9fa86fc51 (diff) | |
download | upstream-0369e358916ef092a1644334f5dd1412051b68a4.tar.gz upstream-0369e358916ef092a1644334f5dd1412051b68a4.tar.bz2 upstream-0369e358916ef092a1644334f5dd1412051b68a4.zip |
generic: provide get_port_stats() on rtl836x switches
This patch provides a generic switch_dev_ops 'get_port_stats()' callback by
taping into the relevant port MIB counters.
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/rtl8366_smi.h')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/rtl8366_smi.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366_smi.h b/target/linux/generic/files/drivers/net/phy/rtl8366_smi.h index bd41385bed..4bb9e9a66e 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8366_smi.h +++ b/target/linux/generic/files/drivers/net/phy/rtl8366_smi.h @@ -146,6 +146,9 @@ int rtl8366_sw_get_vlan_enable(struct switch_dev *dev, int rtl8366_sw_set_vlan_enable(struct switch_dev *dev, const struct switch_attr *attr, struct switch_val *val); +int rtl8366_sw_get_port_stats(struct switch_dev *dev, int port, + struct switch_port_stats *stats, + int txb_id, int rxb_id); struct rtl8366_smi* rtl8366_smi_probe(struct platform_device *pdev); |