diff options
author | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-09-27 19:40:51 +0200 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-10-02 14:51:57 +0200 |
commit | c846dd91f0a6f99b529ed6e1ec4ab149466dc0d2 (patch) | |
tree | 700447cce24d5047340897eb5e5cf5c9d0e03726 /target/linux/ramips/rt305x | |
parent | 9b4eab023c0add0063260e8a5da6193fc44f1658 (diff) | |
download | upstream-c846dd91f0a6f99b529ed6e1ec4ab149466dc0d2.tar.gz upstream-c846dd91f0a6f99b529ed6e1ec4ab149466dc0d2.tar.bz2 upstream-c846dd91f0a6f99b529ed6e1ec4ab149466dc0d2.zip |
ramips: remove model name from LED labels
Like in the previous patch for ath79 target, this will remove the
"devicename" from LED labels in ramips as well.
The devicename is removed in DTS files and 01_leds, consolidation
of definitions into DTSI files is done where (easily) possible,
and migration scripts are updated.
For the latter, all existing definitions were actually just
devicename migrations anyway. Therefore, those are removed and
a common migration file is created in target base-files. This is
actually another example of how the devicename removal makes things
easier.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/ramips/rt305x')
-rwxr-xr-x | target/linux/ramips/rt305x/base-files/etc/board.d/01_leds | 50 | ||||
-rw-r--r-- | target/linux/ramips/rt305x/base-files/etc/uci-defaults/04_led_migration | 17 |
2 files changed, 23 insertions, 44 deletions
diff --git a/target/linux/ramips/rt305x/base-files/etc/board.d/01_leds b/target/linux/ramips/rt305x/base-files/etc/board.d/01_leds index 8260b09821..3f6b70341c 100755 --- a/target/linux/ramips/rt305x/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/rt305x/base-files/etc/board.d/01_leds @@ -7,9 +7,7 @@ set_wifi_led() { ucidef_set_led_netdev "wifi_led" "wifi" "${1}" "${2:-wlan0}" } - board=$(board_name) -boardname="${board##*,}" board_config_update @@ -18,14 +16,15 @@ led_wlan="$(get_dt_led wlan)" case $board in 7links,px-4885-4m|\ -7links,px-4885-8m) - set_wifi_led "px-4885:orange:wifi" +7links,px-4885-8m|\ +fon,fonera-20n) + set_wifi_led "orange:wifi" ;; airlive,air3gii|\ aximcom,mr-102n|\ edimax,3g-6200nl|\ netgear,wnce2001) - set_wifi_led "$boardname:green:wlan" + set_wifi_led "green:wlan" ;; alfa-network,w502u|\ dlink,dir-300-b1|\ @@ -49,61 +48,58 @@ zyxel,nbg-419n-v2) allnet,all0256n-4m|\ allnet,all0256n-8m) 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" + ucidef_set_led_rssi "rssilow" "RSSILOW" "green:rssilow" "wlan0" "1" "40" "0" "6" + ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "green:rssimed" "wlan0" "30" "80" "-29" "5" + ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "70" "100" "-69" "8" set_wifi_led "rt2800pci-phy0::radio" ;; alphanetworks,asl26555-8m|\ alphanetworks,asl26555-16m) - ucidef_set_led_netdev "eth" "ETH" "asl26555:green:eth" "eth0" - set_wifi_led "asl26555:green:wlan" + ucidef_set_led_netdev "eth" "ETH" "green:eth" "eth0" + set_wifi_led "green:wlan" ;; asiarf,awapn2403) set_wifi_led "rt2800soc-phy0::radio" ;; dlink,dcs-930l-b1) - ucidef_set_led_netdev "wifi" "WiFi" "$boardname:blue:wps" + ucidef_set_led_netdev "wifi" "WiFi" "blue:wps" ;; dlink,dir-615-d) - ucidef_set_led_netdev "wan" "WAN (green)" "$boardname:green:wan" "eth0.2" + ucidef_set_led_netdev "wan" "WAN (green)" "green:wan" "eth0.2" set_wifi_led "rt2800soc-phy0::radio" ;; dlink,dir-620-d1|\ trendnet,tew-714tru) - set_wifi_led "$boardname:green:wifi" + set_wifi_led "green:wifi" ;; edimax,3g-6200n|\ planex,mzk-w300nh2) - set_wifi_led "$boardname:amber:wlan" - ;; -fon,fonera-20n) - set_wifi_led "$boardname:orange:wifi" + set_wifi_led "amber:wlan" ;; hauppauge,broadway) - set_wifi_led "$boardname:red:wps_active" + set_wifi_led "red:wps_active" ;; hootoo,ht-tm02) - ucidef_set_led_netdev "eth" "Ethernet" "$boardname:green:lan" "eth0" - set_wifi_led "$boardname:blue:wlan" + ucidef_set_led_netdev "eth" "Ethernet" "green:lan" "eth0" + set_wifi_led "blue:wlan" ;; huawei,hg255d) - set_wifi_led "$boardname:green:wlan" - ucidef_set_led_netdev "internet" "internet" "$boardname:green:internet" "eth0.2" + set_wifi_led "green:wlan" + ucidef_set_led_netdev "internet" "internet" "green:internet" "eth0.2" ;; intenso,memory2move) - set_wifi_led "$boardname:blue:wifi" - ucidef_set_led_netdev "eth" "Ethernet" "$boardname:green:wan" "eth0" + set_wifi_led "blue:wifi" + ucidef_set_led_netdev "eth" "Ethernet" "green:wan" "eth0" ;; omnima,miniembplug) - set_wifi_led "$boardname:red:wlan" + set_wifi_led "red:wlan" ;; vocore,vocore-8m|\ vocore,vocore-16m) - ucidef_set_led_netdev "eth" "ETH" "vocore:orange:eth" "eth0" + ucidef_set_led_netdev "eth" "ETH" "orange:eth" "eth0" ;; zorlik,zl5900v2) - ucidef_set_led_netdev "lan" "lan" "$boardname:green:lan" eth0 + ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0" ;; esac diff --git a/target/linux/ramips/rt305x/base-files/etc/uci-defaults/04_led_migration b/target/linux/ramips/rt305x/base-files/etc/uci-defaults/04_led_migration deleted file mode 100644 index 1009154cac..0000000000 --- a/target/linux/ramips/rt305x/base-files/etc/uci-defaults/04_led_migration +++ /dev/null @@ -1,17 +0,0 @@ -. /lib/functions.sh -. /lib/functions/migrations.sh - -board=$(board_name) - -case "$board" in -fon,fonera-20n) - migrate_leds "^fonera20n:=fonera-20n:" - ;; -intenso,memory2move) - migrate_leds "^m2m:=memory2move:" - ;; -esac - -migrations_apply system - -exit 0 |