From: Petr Štetiar Date: Fri, 17 May 2019 08:56:33 +0000 (+0200) Subject: ar71xx: set mib-poll-interval on devices with ar8xxx switch X-Git-Tag: v19.07.0-rc1~593 X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=73b21559ced458e562db5abae73990824dd4b6dc;p=openwrt%2Fstaging%2Fchunkeey.git ar71xx: set mib-poll-interval on devices with ar8xxx 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 are using ar8xxx switch LEDs trigger, as the same value was set for built in switches in 443fc9ac35 ("ath79: use ar8216 for builtin switch"). Signed-off-by: Petr Štetiar Signed-off-by: Chuanhong Guo --- diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index 79f9e5505e..1fcfa43c4b 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -651,10 +651,60 @@ ar71xx_setup_macs() [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac } +ar71xx_setup_ar8xxx_switch() +{ + local board="$1" + + case $board in + ap147-010|\ + archer-c25-v1|\ + archer-c58-v1|\ + archer-c59-v1|\ + archer-c59-v2|\ + archer-c60-v1|\ + archer-c60-v2|\ + archer-c7-v4|\ + archer-c7-v5|\ + cf-e375ac|\ + cf-e385ac|\ + cr3000|\ + dhp-1565-a1|\ + mynet-n600|\ + rb-2011il|\ + rb-2011ils|\ + rb-2011l|\ + rb-2011uas|\ + rb-2011uas-2hnd|\ + rb-2011uias|\ + rb-2011uias-2hnd|\ + rb-2011uias-2hnd-r2|\ + rb-750|\ + rb-750p-pbr2|\ + rb-750-r2|\ + rb-750up-r2|\ + rb-951ui-2nd|\ + rb-952ui-5ac2nd|\ + rb-map-2nd|\ + tl-wr1043nd-v4|\ + tl-wr1043n-v5|\ + wndr3700v4|\ + wndr3700v4|\ + wndr4300|\ + wnr1000-v2|\ + wnr2000-v3|\ + wnr2200|\ + wnr612-v2|\ + wpn824n) + ucidef_set_ar8xxx_switch_mib "switch0" 0 500 + ;; + esac +} + board_config_update board=$(board_name) ar71xx_setup_interfaces $board ar71xx_setup_macs $board +ar71xx_setup_ar8xxx_switch $board board_config_flush exit 0