ath79: remove quotes for boardname in scripts

Quotes are not required in case statements.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
master
Chuanhong Guo 6 years ago committed by Mathias Kresin
parent f9065e44a6
commit 2da431e583
  1. 29
      target/linux/ath79/base-files/etc/board.d/01_leds
  2. 78
      target/linux/ath79/base-files/etc/board.d/02_network
  3. 26
      target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
  4. 15
      target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata

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

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

@ -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
;;
*)

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

Loading…
Cancel
Save