[OpenWrt-Devel] [PATCH] ramips: Remove redundant LED-cases

Kristian Evensen kristian.evensen at gmail.com
Thu Jun 6 12:27:39 EDT 2019


01_leds has several redundant LED-cases. This commit cleans
up the file by merging these cases into shared cases.

Signed-off-by: Kristian Evensen <kristian.evensen at gmail.com>
---
 .../ramips/base-files/etc/board.d/01_leds     | 100 ++++++------------
 1 file changed, 32 insertions(+), 68 deletions(-)

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 1b02088ed2..35d046cc90 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -13,30 +13,29 @@ boardname="${board##*,}"
 board_config_update
 
 case $board in
-3g-6200n)
+3g-6200n|\
+br-6475nd|\
+mzk-w300nh2)
 	set_wifi_led "$boardname:amber:wlan"
 	;;
 3g-6200nl|\
+air3gii|\
 hilink,hlk-7628n|\
+mr-102n|\
 skylab,skw92a|\
-wnce2001)
+wnce2001|\
+zbt-we2026)
 	set_wifi_led "$boardname:green:wlan"
 	;;
-br-6475nd|\
-mzk-w300nh2)
-	set_wifi_led "$boardname:amber:wlan"
-	;;
 ai-br100)
 	ucidef_set_led_netdev "wan" "wan" "$boardname:blue:wan" "eth0.2"
 	set_wifi_led "$boardname:blue:wlan"
 	;;
-air3gii)
-	set_wifi_led "$boardname:green:wlan"
-	;;
 alfa-network,ac1200rm)
 	set_wifi_led "$boardname:green:wlan2g" "wlan1"
 	;;
-alfa-network,awusfree1)
+alfa-network,awusfree1|\
+edimax,br-6478ac-v2)
 	set_wifi_led "$boardname:blue:wlan"
 	;;
 alfa-network,tube-e4g)
@@ -96,37 +95,47 @@ cudy,wr1000)
 	ucidef_set_led_switch "lan1" "lan1" "$boardname:blue:lan1" "switch0" "0x08"
 	ucidef_set_led_switch "lan2" "lan2" "$boardname:blue:lan2" "switch0" "0x04"
 	;;
-d240)
+d240|\
+mlw221|\
+mlwg2|\
+rakwireless,rak633|\
+rt-ac51u)
 	set_wifi_led "$boardname:blue:wifi"
 	;;
 dcs-930l-b1)
 	ucidef_set_led_netdev "wifi" "WiFi" "$boardname:blue:wps"
 	;;
 dir-300-b1|\
-dir-600-b1|\
-dir-620-a1)
-	set_wifi_led "rt2800pci-phy0::radio"
-	;;
 dir-300-b7|\
 dir-320-b1|\
+dir-600-b1|\
 dir-610-a1|\
+dir-615-d|\
+dir-615-h1|\
+dir-620-a1|\
 esr-9753|\
 hlk-rm04|\
+kn|\
+nbg-419n2|\
 sl-r7205|\
 v11st-fe|\
 w306r-v20|\
+w502u|\
 wt1520-4M|\
-wt1520-8M)
-	set_wifi_led "rt2800pci-phy0::radio"
-	;;
-dir-615-d|\
-dir-615-h1)
+wt1520-8M|\
+zyxel,keenetic-start)
 	set_wifi_led "rt2800pci-phy0::radio"
 	;;
 dir-620-d1|\
 dlink,dwr-116-a1|\
 head-weblink,hdrm200|\
-mzk-ex300np)
+kn_rc|\
+kn_rf|\
+kng_rc|\
+mzk-ex300np|\
+oy-0001|\
+tew-714tru|\
+zbt-wr8305rt)
 	set_wifi_led "$boardname:green:wifi"
 	;;
 dlink,dwr-118-a1)
@@ -149,9 +158,6 @@ dlink,dwr-922-e2)
 dir-860l-b1)
 	ucidef_set_led_netdev "wan" "wan" "$boardname:green:net" "eth0.2"
 	;;
-edimax,br-6478ac-v2)
-	set_wifi_led "$boardname:blue:wlan"
-	;;
 ex2700|\
 wn3000rpv3)
 	set_wifi_led "$boardname:green:router"
@@ -163,7 +169,8 @@ ex3700)
 f5d8235-v1)
 	set_wifi_led "$boardname:blue:wireless"
 	;;
-fonera20n)
+fonera20n|\
+tiny-ac)
 	set_wifi_led "$boardname:orange:wifi"
 	;;
 gnubee,gb-pc1|\
@@ -212,15 +219,6 @@ kimax,u35wf)
 	set_wifi_led "$boardname:blue:wifi"
 	ucidef_set_led_netdev "eth" "ETH" "$boardname:green:eth" "eth0"
 	;;
-kn|\
-nbg-419n2)
-	set_wifi_led "rt2800pci-phy0::radio"
-	;;
-kn_rc|\
-kn_rf|\
-kng_rc)
-	set_wifi_led "$boardname:green:wifi"
-	;;
 lava,lr-25g001)
 	ucidef_set_led_netdev "wlan2g" "WiFi 2.4GHz" "$boardname:green:wlan2g" "wlan1"
 	ucidef_set_led_netdev "wlan5g" "WiFi 5GHz" "$boardname:green:wlan5g" "wlan0"
@@ -243,13 +241,6 @@ mikrotik,rbm11g)
 miniembplug)
 	set_wifi_led "$boardname:red:wlan"
 	;;
-mlw221|\
-mlwg2)
-	set_wifi_led "$boardname:blue:wifi"
-	;;
-mr-102n)
-	set_wifi_led "$boardname:green:wlan"
-	;;
 mr200)
 	ucidef_set_led_netdev "lan" "lan" "$boardname:white:lan" "eth0.1"
 	ucidef_set_led_netdev "wan" "wan" "$boardname:white:wan" "usb0"
@@ -267,9 +258,6 @@ netgear,r6120)
 	ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x10"
 	ucidef_set_led_wlan "wlan2g" "WiFi 2.4GHz" "$boardname:green:wlan2g" "phy0tpt"
 	;;
-oy-0001)
-	set_wifi_led "$boardname:green:wifi"
-	;;
 gehua,ghl-r-001|\
 pbr-m1)
 	ucidef_set_led_netdev "internet" "internet" "$boardname:blue:internet" "eth0.2"
@@ -292,9 +280,6 @@ wndr3700v5)
 	ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x10"
 	set_wifi_led "$boardname:green:wifi"
 	;;
-rakwireless,rak633)
-	set_wifi_led "$boardname:blue:wifi"
-	;;
 re350-v1)
 	ucidef_set_led_netdev "wifi2g" "Wifi 2.4G" "$boardname:blue:wifi2G" "wlan0"
 	ucidef_set_led_netdev "wifi5g" "Wifi 5G" "$boardname:blue:wifi5G" "wlan1"
@@ -305,9 +290,6 @@ rp-n53)
 	ucidef_set_led_netdev "eth" "Network" "$boardname:white:back" "eth0"
 	set_wifi_led "$boardname:blue:wifi"
 	;;
-rt-ac51u)
-	set_wifi_led "$boardname:blue:wifi"
-	;;
 rt-n12p)
 	ucidef_set_led_netdev "lan" "lan" "$boardname:green:lan" eth0.1
 	ucidef_set_led_netdev "wan" "wan" "$boardname:green:wan" eth0.2
@@ -322,12 +304,6 @@ tama,w06)
 	ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0"
 	ucidef_set_led_wlan "wlan" "WLAN" "$boardname:green:wlan" "phy0tpt"
 	;;
-tew-714tru)
-	set_wifi_led "$boardname:green:wifi"
-	;;
-tiny-ac)
-	set_wifi_led "$boardname:orange:wifi"
-	;;
 tl-wr840n-v4)
 	ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan" "phy0tpt"
 	ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e"
@@ -397,9 +373,6 @@ vocore-8M|\
 vocore-16M)
 	ucidef_set_led_netdev "eth" "ETH" "vocore:orange:eth" "eth0"
 	;;
-w502u)
-	set_wifi_led "rt2800pci-phy0::radio"
-	;;
 wavlink,wl-wn570ha1)
 	ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01"
 	ucidef_set_rssimon "wlan0" "200000" "1"
@@ -457,9 +430,6 @@ zbt-ape522ii)
 zbt-wa05)
 	set_wifi_led "$boardname:blue:air"
 	;;
-zbt-we2026)
-	set_wifi_led "$boardname:green:wlan"
-	;;
 zbt-we826-16M|\
 zbt-we826-32M)
 	set_wifi_led "zbt-we826:green:wifi"
@@ -470,9 +440,6 @@ zbtlink,zbt-we1226)
 	ucidef_set_led_switch "lan2" "LAN2" "$boardname:green:lan2" "switch0" "0x02"
 	ucidef_set_led_switch "wan" "WAN" "$boardname:green:wan" "switch0" "0x10"
 	;;
-zbt-wr8305rt)
-	set_wifi_led "$boardname:green:wifi"
-	;;
 zorlik,zl5900v2)
 	ucidef_set_led_netdev "lan" "lan" "$boardname:green:lan" eth0
 	;;
@@ -480,9 +447,6 @@ zyxel,keenetic-extra-ii)
 	set_wifi_led "$boardname:green:wifi"
 	ucidef_set_led_switch "internet" "internet" "$boardname:green:internet" "switch0" "0x01"
 	;;
-zyxel,keenetic-start)
-	set_wifi_led "rt2800pci-phy0::radio"
-	;;
 youku-yk1)
 	set_wifi_led "$boardname:blue:air"
 	ucidef_set_led_switch "wan" "wan" "$boardname:blue:wan" "switch0" "0x10"
-- 
2.19.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list