|
@@ -0,0 +1,101 @@
|
|
|
+From: Martin Weinelt <martin@darmstadt.freifunk.net>
|
|
|
+Date: Wed, 2 Nov 2016 16:10:44 +0100
|
|
|
+Subject: ar71xx, ramips: reduce CPU load and flickering on devices using rsslieds
|
|
|
+
|
|
|
+Polling every 40ms causes more than 10% CPU load on weak devices. An
|
|
|
+interval of 200ms is much more reasonable.
|
|
|
+
|
|
|
+Signed-off-by: Martin Weinelt <martin@darmstadt.freifunk.net>
|
|
|
+[Matthias Schiffer: adapt OpenWrt patch; add ramips; extend commit message]
|
|
|
+Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
|
|
+
|
|
|
+Backport of LEDE 5247ac2f805e39afe2e6e30980e439ea8b8ae7f8
|
|
|
+
|
|
|
+diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
|
|
|
+index 87d6fcc..2a0f996 100644
|
|
|
+--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
|
|
|
++++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
|
|
|
+@@ -18,14 +18,14 @@ alfa-nx)
|
|
|
+ ;;
|
|
|
+
|
|
|
+ all0258n)
|
|
|
+- ucidef_set_rssimon "wlan0" "40000" "1"
|
|
|
++ ucidef_set_rssimon "wlan0" "200000" "1"
|
|
|
+ ucidef_set_led_rssi "rssilow" "RSSILOW" "all0258n:red:rssilow" "wlan0" "1" "40" "0" "6"
|
|
|
+ ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "all0258n:yellow:rssimedium" "wlan0" "30" "80" "-29" "5"
|
|
|
+ ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "all0258n:green:rssihigh" "wlan0" "70" "100" "-69" "8"
|
|
|
+ ;;
|
|
|
+
|
|
|
+ all0315n)
|
|
|
+- ucidef_set_rssimon "wlan0" "40000" "1"
|
|
|
++ ucidef_set_rssimon "wlan0" "200000" "1"
|
|
|
+ ucidef_set_led_rssi "rssilow" "RSSILOW" "all0315n:red:rssilow" "wlan0" "1" "40" "0" "6"
|
|
|
+ ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "all0315n:yellow:rssimedium" "wlan0" "30" "80" "-29" "5"
|
|
|
+ ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "all0315n:green:rssihigh" "wlan0" "70" "100" "-69" "8"
|
|
|
+@@ -82,7 +82,7 @@ cpe210|\
|
|
|
+ cpe510)
|
|
|
+ ucidef_set_led_switch "lan0" "LAN0" "tp-link:green:lan0" "switch0" "0x20"
|
|
|
+ ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
|
|
|
+- ucidef_set_rssimon "wlan0" "40000" "1"
|
|
|
++ ucidef_set_rssimon "wlan0" "200000" "1"
|
|
|
+ ucidef_set_led_rssi "rssilow" "RSSILOW" "tp-link:green:link1" "wlan0" "1" "100" "0" "13"
|
|
|
+ ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "tp-link:green:link2" "wlan0" "26" "100" "-25" "13"
|
|
|
+ ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "tp-link:green:link3" "wlan0" "51" "100" "-50" "13"
|
|
|
+@@ -271,7 +271,7 @@ mynet-n600)
|
|
|
+
|
|
|
+ mynet-rext)
|
|
|
+ ucidef_set_led_netdev "lan" "LAN" "wd:blue:ethernet" "eth0"
|
|
|
+- ucidef_set_rssimon "wlan0" "40000" "1"
|
|
|
++ ucidef_set_rssimon "wlan0" "200000" "1"
|
|
|
+ ucidef_set_led_rssi "rssilow" "RSSILOW" "wd:blue:quality1" "wlan0" "1" "40" "0" "6"
|
|
|
+ ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "wd:blue:quality2" "wlan0" "30" "80" "-29" "5"
|
|
|
+ ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "wd:blue:quality3" "wlan0" "70" "100" "-69" "8"
|
|
|
+@@ -381,7 +381,7 @@ tl-mr3420-v2)
|
|
|
+
|
|
|
+ tl-wa7210n-v2)
|
|
|
+ ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
|
|
|
+- ucidef_set_rssimon "wlan0" "40000" "1"
|
|
|
++ ucidef_set_rssimon "wlan0" "200000" "1"
|
|
|
+ ucidef_set_led_rssi "rssilow" "RSSILOW" "tp-link:green:signal1" "wlan0" "1" "100" "0" "13"
|
|
|
+ ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "tp-link:green:signal2" "wlan0" "26" "100" "-25" "13"
|
|
|
+ ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "tp-link:green:signal3" "wlan0" "51" "100" "-50" "13"
|
|
|
+@@ -391,7 +391,7 @@ tl-wa7210n-v2)
|
|
|
+ tl-wa750re)
|
|
|
+ ucidef_set_led_netdev "lan" "LAN" "tp-link:orange:lan" "eth0"
|
|
|
+ ucidef_set_led_wlan "wlan" "WLAN" "tp-link:orange:wlan" "phy0tpt"
|
|
|
+- ucidef_set_rssimon "wlan0" "40000" "1"
|
|
|
++ ucidef_set_rssimon "wlan0" "200000" "1"
|
|
|
+ ucidef_set_led_rssi "rssilow" "RSSILOW" "tp-link:orange:signal1" "wlan0" "1" "100" "0" "13"
|
|
|
+ ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "tp-link:orange:signal2" "wlan0" "20" "100" "-19" "13"
|
|
|
+ ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "tp-link:orange:signal3" "wlan0" "40" "100" "-39" "13"
|
|
|
+@@ -402,7 +402,7 @@ tl-wa750re)
|
|
|
+ tl-wa850re)
|
|
|
+ ucidef_set_led_netdev "lan" "LAN" "tp-link:blue:lan" "eth0"
|
|
|
+ ucidef_set_led_wlan "wlan" "WLAN" "tp-link:blue:wlan" "phy0tpt"
|
|
|
+- ucidef_set_rssimon "wlan0" "40000" "1"
|
|
|
++ ucidef_set_rssimon "wlan0" "200000" "1"
|
|
|
+ ucidef_set_led_rssi "rssilow" "RSSILOW" "tp-link:blue:signal1" "wlan0" "1" "100" "0" "13"
|
|
|
+ ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "tp-link:blue:signal2" "wlan0" "20" "100" "-19" "13"
|
|
|
+ ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "tp-link:blue:signal3" "wlan0" "40" "100" "-39" "13"
|
|
|
+@@ -553,7 +553,7 @@ tl-wr2543n)
|
|
|
+
|
|
|
+ tube2h)
|
|
|
+ ucidef_set_led_netdev "lan" "LAN" "alfa:blue:lan" "eth0"
|
|
|
+- ucidef_set_rssimon "wlan0" "40000" "1"
|
|
|
++ ucidef_set_rssimon "wlan0" "200000" "1"
|
|
|
+ ucidef_set_led_rssi "signal1" "SIGNAL1" "alfa:red:signal1" "wlan0" "1" "100" "0" "13"
|
|
|
+ ucidef_set_led_rssi "signal2" "SIGNAL2" "alfa:orange:signal2" "wlan0" "26" "100" "-25" "13"
|
|
|
+ ucidef_set_led_rssi "signal3" "SIGNAL3" "alfa:green:signal3" "wlan0" "51" "100" "-50" "13"
|
|
|
+diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
|
|
|
+index 5fb28a5..2b0341d 100755
|
|
|
+--- a/target/linux/ramips/base-files/etc/board.d/01_leds
|
|
|
++++ b/target/linux/ramips/base-files/etc/board.d/01_leds
|
|
|
+@@ -40,7 +40,7 @@ case $board in
|
|
|
+ set_usb_led "airlive:green:mobile"
|
|
|
+ ;;
|
|
|
+ all0256n)
|
|
|
+- ucidef_set_rssimon "wlan0" "40000" "1"
|
|
|
++ ucidef_set_rssimon "wlan0" "200000" "1"
|
|
|
+ ucidef_set_led_rssi "rssilow" "RSSILOW" "all0256n:green:rssilow" "wlan0" "1" "40" "0" "6"
|
|
|
+ ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "all0256n:green:rssimed" "wlan0" "30" "80" "-29" "5"
|
|
|
+ ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "all0256n:green:rssihigh" "wlan0" "70" "100" "-69" "8"
|