ath79: set mib-poll-interval on mdio0 attached ar83xx switch
authorPetr Štetiar <ynezz@true.cz>
Sun, 14 Apr 2019 15:26:04 +0000 (17:26 +0200)
committerPetr Štetiar <ynezz@true.cz>
Mon, 20 May 2019 19:19:48 +0000 (21:19 +0200)
commit6648e9458f2f47cdbe16bd9537f08048a0a252fd
treea21c3f99c1907ef08b51b1323b17b560da6f3f23
parentaac8b52184e727d8ba7a13917a9a3c8b82ec4aa2
ath79: set mib-poll-interval on mdio0 attached ar83xx switch

Commit "generic: ar8216: add mib_poll_interval switch attribute" sets
mib-poll-interval as disabled by default (was set to 2s), so it makes
switch LEDs trigger disfunctional on devices which don't have
mib-poll-interval set.

So this patch sets mib-poll-interval to 500ms on devices which have
ar83xx switch connected to mdio0 bus, as the same value was set for
built in switches in 443fc9ac35 ("ath79: use ar8216 for builtin
switch").

Some measurements performed on TP-Link Archer C7-v5:

 mib-type=0, mib-poll-interval=500ms (10s pidstat)

  Average:  %usr %system  %guest   %wait    %CPU   CPU  Command
  Average:  0.00    1.93    0.00    0.00    1.93     -  kworker/0:2

  iperf3 (30s): 334 Mbits/sec

 mib-type=0, mib-poll-interval=2s (10s pidstat)

  Average:  %usr %system  %guest   %wait    %CPU   CPU  Command
  Average:  0.00    1.14    0.00    0.00    1.14     -  kworker/0:2

  iperf3 (30s): 334 Mbits/sec

So it seems like we get 4x faster LED refresh rate for additional 0.8%
CPU load.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
target/linux/ath79/dts/qca9563_dlink_dir-859-a1.dts
target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts
target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts
target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi
target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi
target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi