aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/drivers/net/phy/ar8216.h
diff options
context:
space:
mode:
authorChuanhong Guo <gch981213@gmail.com>2019-04-09 21:32:32 +0800
committerPetr Štetiar <ynezz@true.cz>2019-05-20 21:17:45 +0200
commit107dc4326ccfaff27bd1e698b8bc7fb942233559 (patch)
tree03bac9ce58d91967a902011e8d2a64e4cf1925d7 /target/linux/generic/files/drivers/net/phy/ar8216.h
parentdf6e8c8771d5457048a5cb1e510c6bc73bd4c173 (diff)
downloadupstream-107dc4326ccfaff27bd1e698b8bc7fb942233559.tar.gz
upstream-107dc4326ccfaff27bd1e698b8bc7fb942233559.tar.bz2
upstream-107dc4326ccfaff27bd1e698b8bc7fb942233559.zip
generic: ar8216: add mib_poll_interval switch attribute
This allows specifying interval of polling MIB counters from userspace and allow completely turning off MIB counter support by setting mib_poll_interval to 0. Since MIB counter polling is a heavy CPU load for GPIO emulated MDIO bus, disable this behavior by default. Those who wants to use swconfig LEDs can enable them with qca,mib-poll-interval dts property or with swconfig command. Fixes: FS#2230 ("kworker spikes 100% cpu every 2 second.") Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy/ar8216.h')
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8216.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.h b/target/linux/generic/files/drivers/net/phy/ar8216.h
index 35274b480a..8f77c916c0 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.h
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.h
@@ -544,6 +544,14 @@ ar8xxx_sw_set_reset_mibs(struct switch_dev *dev,
const struct switch_attr *attr,
struct switch_val *val);
int
+ar8xxx_sw_set_mib_poll_interval(struct switch_dev *dev,
+ const struct switch_attr *attr,
+ struct switch_val *val);
+int
+ar8xxx_sw_get_mib_poll_interval(struct switch_dev *dev,
+ const struct switch_attr *attr,
+ struct switch_val *val);
+int
ar8xxx_sw_set_mirror_rx_enable(struct switch_dev *dev,
const struct switch_attr *attr,
struct switch_val *val);