diff --git a/files/usr/lib/lua/aredn/hardware.lua b/files/usr/lib/lua/aredn/hardware.lua index 1e64db52..148e06cc 100644 --- a/files/usr/lib/lua/aredn/hardware.lua +++ b/files/usr/lib/lua/aredn/hardware.lua @@ -159,25 +159,6 @@ function hardware.get_link_led() return "/sys/class/leds/" .. led.user.sysfs end end - -- Exceptions - - -- This is here to handle poor board definitions. We can remove these when board definitions are updated - local board_type = aredn.hardware.get_type() - if board_type == "airrouter" then - return "/sys/class/leds/ubnt:green:globe" - elseif board_type == "gl-ar150" then - return "/sys/class/leds/gl-ar150:orange:wlan" - elseif board_type == "gl-ar300m" then - return "/sys/class/leds/gl-ar300m:green:wlan" - elseif board_type == "gl-usb150" then - return "/sys/class/leds/gl-usb150:green:wlan" - elseif board_type == "gl-ar750" then - return "/sys/class/leds/gl-ar750:white:wlan5g" - elseif board_type == "rb-912uag-5hpnd" or board_type == "rb-911g-5hpnd" then - return "/sys/class/leds/rb:green:led1" - elseif board_type == "rb-lhg-5nd" or "rb-lhg-5hpnd" or "rb-lhg-5hpnd-xl" or "rb-ldf-5nd" then - return "/sys/class/leds/rb:green:rssi0" - end - -- return nil end, function() diff --git a/patches/708-define-aredn-leds-ar71xx.patch b/patches/708-define-aredn-leds-ar71xx.patch new file mode 100644 index 00000000..c4e0f519 --- /dev/null +++ b/patches/708-define-aredn-leds-ar71xx.patch @@ -0,0 +1,56 @@ +--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds ++++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds +@@ -18,6 +18,9 @@ a60) + ucidef_set_led_default "status-red" "Status (red)" "a60:red:status" "0" + ucidef_set_led_default "status-blue" "Status (blue)" "a60:blue:status" "0" + ;; ++airrouter) ++ ucidef_set_led_timer "user" "USER" "ubnt:green:globe" "1000" "1000" ++ ;; + airgateway|\ + airgatewaypro) + ucidef_set_led_wlan "wlan" "WLAN" "ubnt:blue:wlan" "phy0tpt" +@@ -93,7 +96,7 @@ ap531b0|\ + gl-usb150|\ + sc1750|\ + sc450) +- ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt" ++ ucidef_set_led_timer "user" "USER" "$board:green:wlan" "1000" "1000" + ;; + ap91-5g|\ + n5q) +@@ -425,12 +428,12 @@ fritz450e) + ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt" + ;; + gl-ar300m) +- ucidef_set_led_wlan "wlan" "WLAN" "$board:red:wlan" "phy0tpt" + ucidef_set_led_netdev "lan" "LAN" "$board:green:lan" "eth1" ++ ucidef_set_led_timer "user" "USER" "$board:red:wlan" "1000" "1000" + ;; + gl-ar750) + ucidef_set_led_wlan "wlan2g" "WLAN2G" "$board:white:wlan2g" "phy1tpt" +- ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:white:wlan5g" "phy0tpt" ++ ucidef_set_led_timer "user" "USER" "$board:white:wlan5g" "1000" "1000" + ;; + gl-ar750s) + ucidef_set_led_wlan "wlan2g" "WLAN2G" "$board:green:wlan2g" "phy1tpt" +@@ -443,7 +446,7 @@ gl-mifi) + ucidef_set_led_netdev "3gnet" "3GNET" "$board:green:net" "3g-wan" + ;; + gl-ar150) +- ucidef_set_led_wlan "wlan" "WLAN" "$board:orange:wlan" "phy0tpt" ++ ucidef_set_led_timer "user" "USER" "$board:orange:wlan" "1000" "1000" + ucidef_set_led_netdev "wan" "WAN" "$board:green:lan" "eth0" + ucidef_set_led_netdev "lan" "LAN" "$board:green:wan" "eth1" + ;; +@@ -661,6 +664,10 @@ rb-911-2hn|\ + rb-911-5hn) + ucidef_set_led_netdev "eth" "ETH" "rb:green:eth" "eth0" + ;; ++rb-911g-5hpnd|\ ++rb-912uag-5hpnd) ++ ucidef_set_led_timer "user" "USER" "rb:green:user" "1000" "1000" ++ ;; + rb-931-2nd|\ + rb-941-2nd) + ucidef_set_led_timer "user" "USR/ACT" "rb:green:user" "1000" "1000" diff --git a/patches/series b/patches/series index d9b9a379..a7084bf5 100644 --- a/patches/series +++ b/patches/series @@ -35,6 +35,7 @@ 707-enable-board-name.patch 708-define-aredn-networks.patch 708-define-aredn-network-ath79.patch +708-define-aredn-leds-ar71xx.patch 709-iperf-fw-restart.patch 710-no-ping6-traceroute6.patch 711-nano-xw-switch-config.patch