aredn: add missing ar71xx led definitions (#241)

This commit is contained in:
Joe AE6XE 2022-02-28 19:42:43 -08:00 committed by GitHub
parent 02ffc1e1b9
commit 3e78e64bfc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 57 additions and 19 deletions

View File

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

View File

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

View File

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