ath79: remove quotes for boardname in scripts
authorChuanhong Guo <gch981213@gmail.com>
Thu, 2 Aug 2018 07:14:10 +0000 (15:14 +0800)
committerMathias Kresin <dev@kresin.me>
Mon, 6 Aug 2018 05:31:54 +0000 (07:31 +0200)
Quotes are not required in case statements.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
target/linux/ath79/base-files/etc/board.d/01_leds
target/linux/ath79/base-files/etc/board.d/02_network
target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata

index f13a187350608e59b7f0fd5b59577ecc39b4315e..1ae2feb080ac6b1e1267fdcacac8484868bfe35a 100755 (executable)
@@ -8,7 +8,7 @@ board=$(board_name)
 boardname="${board##*,}"
 
 case "$board" in
-"avm,fritz300e")
+avm,fritz300e)
        ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth0"
        ucidef_set_rssimon "wlan0" "200000" "1"
        ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:green:rssi0" "wlan0" "1" "100"
@@ -17,60 +17,61 @@ case "$board" in
        ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "$boardname:green:rssi3" "wlan0" "60" "100"
        ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:green:rssi4" "wlan0" "80" "100"
        ;;
-"etactica,eg200")
+etactica,eg200)
        ucidef_set_led_netdev "lan" "LAN" "$boardname:red:eth0" "eth0"
        ucidef_set_led_oneshot "modbus" "Modbus" "$boardname:red:modbus" "100" "33"
        ucidef_set_led_default "etactica" "etactica" "$boardname:red:etactica" "ignore"
        ;;
-"netgear,wnr612-v2"|\
-"on,n150r")
+netgear,wnr612-v2|\
+on,n150r)
        ucidef_set_led_netdev "wan" "WAN" "netgear:green:wan" "eth0"
        ucidef_set_led_switch "lan1" "LAN1" "netgear:green:lan1" "switch0" "0x02" "0x0f"
        ucidef_set_led_switch "lan2" "LAN2" "netgear:green:lan2" "switch0" "0x04" "0x0f"
        ;;
-"pcs,cap324")
+pcs,cap324)
        ucidef_set_led_netdev "lan" "LAN" "pcs:lan:green" "eth0"
        ;;
-"pcs,cr3000")
+pcs,cr3000)
        ucidef_set_led_netdev "wan" "WAN" "pcs:blue:wan" "eth1"
        ucidef_set_led_switch "lan1" "LAN1" "pcs:blue:lan1" "switch0" "0x04"
        ucidef_set_led_switch "lan2" "LAN2" "pcs:blue:lan2" "switch0" "0x08"
        ucidef_set_led_switch "lan3" "LAN3" "pcs:blue:lan3" "switch0" "0x10"
        ucidef_set_led_switch "lan4" "LAN4" "pcs:blue:lan4" "switch0" "0x02"
        ;;
-"pcs,cr5000")
+pcs,cr5000)
        ucidef_set_led_usbdev "usb" "USB" "pcs:white:wps" "1-1"
        ;;
-"tplink,re450-v2")
+
+tplink,re450-v2)
        ucidef_set_led_netdev "lan_data" "LAN Data" "tp-link:green:lan_data" "eth0" "tx rx"
        ucidef_set_led_netdev "lan_link" "LAN Link" "tp-link:green:lan_link" "eth0" "link"
        ;;
-"tplink,tl-mr3020-v1")
+tplink,tl-mr3020-v1)
        ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
        ;;
-"tplink,tl-wr1043nd-v4")
+tplink,tl-wr1043nd-v4)
        ucidef_set_led_switch "wan" "WAN" "tp-link:green:wan" "switch0" "0x20"
        ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
        ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
        ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04"
        ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
        ;;
-"tplink,tl-wr740n-v2")
+tplink,tl-wr740n-v2)
        ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0"
        ucidef_set_led_switch "lan1" "LAN1" "$boardname:green:lan1" "switch0" "0x02"
        ucidef_set_led_switch "lan2" "LAN2" "$boardname:green:lan2" "switch0" "0x04"
        ucidef_set_led_switch "lan3" "LAN3" "$boardname:green:lan3" "switch0" "0x08"
        ucidef_set_led_switch "lan4" "LAN4" "$boardname:green:lan4" "switch0" "0x10"
        ;;
-"tplink,tl-wr740nd-v4"|\
-"tplink,tl-wr741nd-v4")
+tplink,tl-wr740nd-v4|\
+tplink,tl-wr741nd-v4)
        ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
        ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04"
        ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
        ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10"
        ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
        ;;
-"tplink,tl-wr841n-v9")
+tplink,tl-wr841n-v9)
        ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
        ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
        ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
index dc320f08c4ae123144c397afb03daa29ec8f8c13..d88a0f368ae557d757ca3afb3900b985e0e65e7f 100755 (executable)
@@ -9,34 +9,34 @@ ath79_setup_interfaces()
        local board="$1"
 
        case "$board" in
-       "avm,fritz300e"|\
-       "ocedo,raccoon"|\
-       "pcs,cap324"|\
-       "tplink,re450-v2"|\
-       "tplink,tl-mr10u"|\
-       "tplink,tl-mr3020-v1"|\
-       "tplink,tl-wr703n"|\
-       "ubnt,unifiac-lite"|\
-       "ubnt,unifiac-mesh"|\
-       "ubnt,unifi")
+       avm,fritz300e|\
+       ocedo,raccoon|\
+       pcs,cap324|\
+       tplink,re450-v2|\
+       tplink,tl-mr10u|\
+       tplink,tl-mr3020-v1|\
+       tplink,tl-wr703n|\
+       ubnt,unifiac-lite|\
+       ubnt,unifiac-mesh|\
+       ubnt,unifi)
                ucidef_set_interface_lan "eth0"
                ;;
-       "buffalo,wzr-hp-g450h")
+       buffalo,wzr-hp-g450h)
                ucidef_add_switch "switch0" \
                        "0@eth0" "2:lan" "3:lan" "4:lan" "5:lan" "1:wan"
                ;;
-       "embeddedwireless,dorin")
+       embeddedwireless,dorin)
                ucidef_add_switch "switch0" \
                        "0@eth0" "1:wan" "2:lan:3" "3:lan:2"
                ;;
-       "etactica,eg200")
+       etactica,eg200)
                ucidef_set_interface_lan "eth0" "dhcp"
                ;;
-       "glinet,ar150"|\
-       "glinet,ar300m")
+       glinet,ar150|\
+       glinet,ar300m)
                ucidef_set_interfaces_lan_wan "eth1" "eth0"
                ;;
-       "netgear,wndr3800")
+       netgear,wndr3800)
                ucidef_set_interfaces_lan_wan "eth0" "eth1"
                ucidef_add_switch "switch0" \
                        "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5u@eth0"
@@ -45,76 +45,76 @@ ath79_setup_interfaces()
                ucidef_add_switch_port_attr "switch0" 2 led 9
                ucidef_add_switch_port_attr "switch0" 5 led 2
                ;;
-       "netgear,wnr612-v2"|\
-       "on,n150r")
+       netgear,wnr612-v2|\
+       on,n150r)
                ucidef_set_interface_wan "eth0"
                ucidef_add_switch "switch0" \
                "0@eth1" "1:lan" "2:lan" "3:lan:3" "4:lan:4"
                ;;
-       "pcs,cr3000")
+       pcs,cr3000)
                ucidef_add_switch "switch0" \
                        "0@eth1" "1:lan:1" "2:lan:4" "3:lan:3" "4:lan:2"
                ucidef_set_interface_wan "eth0"
                ;;
-       "pcs,cr5000")
+       pcs,cr5000)
                ucidef_add_switch "switch0" \
                        "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
                ;;
-       "phicomm,k2t")
+       phicomm,k2t)
                ucidef_add_switch "switch0" \
                        "0@eth0" "3:lan:1" "5:lan:2" "4:wan"
                ;;
-       "tplink,tl-archer-c7-v2")
+       tplink,tl-archer-c7-v2)
                ucidef_add_switch "switch0" \
                        "0@eth1" "2:lan" "3:lan" "4:lan" "5:lan" "6@eth0" "1:wan"
                ;;
-       "tplink,tl-mr3220-v1"|\
-       "tplink,tl-mr3420-v1"|\
-       "tplink,tl-wr841-v7")
+       tplink,tl-mr3220-v1|\
+       tplink,tl-mr3420-v1|\
+       tplink,tl-wr841-v7)
                ucidef_set_interface_wan "eth0"
                ucidef_add_switch "switch0" \
                        "0@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
                ;;
-       "tplink,tl-wdr3600"|\
-       "tplink,tl-wdr4300")
+       tplink,tl-wdr3600|\
+       tplink,tl-wdr4300)
                ucidef_add_switch "switch0" \
                        "0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan"
                ;;
-       "tplink,tl-wr1043nd-v1")
+       tplink,tl-wr1043nd-v1)
                ucidef_add_switch "switch0" \
                        "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "5@eth0"
                ;;
-       "tplink,tl-wr1043nd-v2"|\
-       "tplink,tl-wr1043nd-v3")
+       tplink,tl-wr1043nd-v2|\
+       tplink,tl-wr1043nd-v3)
                ucidef_add_switch "switch0" \
                        "0@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" "6@eth0"
                ;;
-       "tplink,tl-wr1043nd-v4")
+       tplink,tl-wr1043nd-v4)
                ucidef_add_switch "switch0" \
                        "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
                ;;
-       "tplink,tl-wr2543-v1")
+       tplink,tl-wr2543-v1)
                ucidef_add_switch "switch0" \
                        "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9@eth0"
                ;;
-       "tplink,tl-wr740n-v2")
+       tplink,tl-wr740n-v2)
                ucidef_set_interface_wan "eth0"
                ucidef_add_switch "switch0" \
                        "0@eth1" "1:lan" "2:lan" "3:lan" "4:lan"
                ;;
-       "tplink,tl-wr740nd-v4"|\
-       "tplink,tl-wr741nd-v4")
+       tplink,tl-wr740nd-v4|\
+       tplink,tl-wr741nd-v4)
                ucidef_set_interface_wan "eth0"
                ucidef_add_switch "switch0" \
                        "0@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
                ;;
-       "tplink,tl-wr841n-v9")
+       tplink,tl-wr841n-v9)
                ucidef_set_interface_wan "eth0"
                ucidef_add_switch "switch0" \
                "0@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
                ;;
-       "ubnt,unifiac-mesh-pro"|\
-       "ubnt,unifiac-pro")
+       ubnt,unifiac-mesh-pro|\
+       ubnt,unifiac-pro)
                ucidef_add_switch "switch0" \
                        "0@eth0" "2:lan" "3:wan"
                ;;
@@ -136,7 +136,7 @@ ath79_setup_macs()
                lan_mac=$(k2t_get_mac "lan_mac")
                wan_mac=$(k2t_get_mac "wan_mac")
                ;;
-       "tplink,tl-wr1043nd-v4")
+       tplink,tl-wr1043nd-v4)
                base_mac=$(mtd_get_mac_binary product-info 8)
                wan_mac=$(macaddr_add "$base_mac" 1)
                ;;
index 2dac7768c1b9a0b6629bd6028e7d208c7df2d8b3..b55ae0dbb35cca85e3cbe410bf70bc24d85934fb 100644 (file)
@@ -47,23 +47,23 @@ board=$(board_name)
 case "$FIRMWARE" in
 "ath9k-eeprom-pci-0000:00:00.0.bin")
        case $board in
-       "avm,fritz300e")
+       avm,fritz300e)
                ath9k_eeprom_extract_reverse "urloader" 5441 1088
                ;;
-       "ocedo,raccoon"|\
-       "tplink,tl-wdr3600"|\
-       "tplink,tl-wdr4300")
+       ocedo,raccoon|\
+       tplink,tl-wdr3600|\
+       tplink,tl-wdr4300)
                ath9k_eeprom_extract "art" 20480 1088
                ;;
-       "netgear,wnr612-v2"|\
-       "on,n150r"|\
-       "pcs,cap324"|\
-       "tplink,tl-mr3220-v1"|\
-       "tplink,tl-mr3420-v1"|\
-       "tplink,tl-wr2543-v1"|\
-       "tplink,tl-wr740n-v2"|\
-       "tplink,tl-wr841-v7"|\
-       "ubnt,unifi")
+       netgear,wnr612-v2|\
+       on,n150r|\
+       pcs,cap324|\
+       tplink,tl-mr3220-v1|\
+       tplink,tl-mr3420-v1|\
+       tplink,tl-wr2543-v1|\
+       tplink,tl-wr740n-v2|\
+       tplink,tl-wr841-v7|\
+       ubnt,unifi)
                ath9k_eeprom_extract "art" 4096 2048
                ;;
        *)
index 562237f191bb7172077916d717bf37c10208926a..0d58ea0dd4d57ecaf2bd907d44123e9e55da3308 100644 (file)
@@ -87,22 +87,22 @@ board=$(board_name)
 case "$FIRMWARE" in
 "ath10k/cal-pci-0000:00:00.0.bin")
        case $board in
-       "openmesh,om5p-ac-v2")
+       openmesh,om5p-ac-v2)
                ath10kcal_extract "ART" 20480 2116
                ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16)
                ;;
-       "tplink,re450-v2")
+       tplink,re450-v2)
                ath10kcal_extract "art" 20480 2116
                ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +1)
                ;;
-       "tplink,tl-archer-c7-v2")
+       tplink,tl-archer-c7-v2)
                ath10kcal_extract "art" 20480 2116
                ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -1)
                ;;
-       "ubnt,unifiac-lite"|\
-       "ubnt,unifiac-mesh"|\
-       "ubnt,unifiac-mesh-pro"|\
-       "ubnt,unifiac-pro")
+       ubnt,unifiac-lite|\
+       ubnt,unifiac-mesh|\
+       ubnt,unifiac-mesh-pro|\
+       ubnt,unifiac-pro)
                ath10kcal_extract "EEPROM" 20480 2116
                ;;
        esac
@@ -112,7 +112,6 @@ case "$FIRMWARE" in
        phicomm,k2t)
                ath10kcal_extract "art" 20480 12064
                ath10kcal_patch_mac_crc $(k2t_get_mac "5g_mac")
-
                ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
                        /lib/firmware/ath10k/QCA9888/hw2.0/board.bin
                ;;