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 <ynezz@true.cz>
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
This commit is contained in:
Petr Štetiar 2019-05-17 10:56:33 +02:00
parent 00d14635db
commit 73b21559ce

View File

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