diff options
Diffstat (limited to 'target/linux/ath79/generic')
4 files changed, 23 insertions, 2 deletions
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index 3b69c2bded..a2ae5cb8de 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -519,7 +519,8 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "1:lan" "2:lan" ;; - tplink,deco-m4r-v1) + tplink,deco-m4r-v1|\ + tplink,deco-s4-v2) ucidef_add_switch "switch0" \ "0@eth0" "3:lan:1" "5:lan:2" ;; @@ -677,6 +678,10 @@ ath79_setup_macs() base_mac=$(mtd_get_mac_binary u-boot 0x1fc00) wan_mac=$(macaddr_add "$base_mac" 1) ;; + tplink,deco-s4-v2) + lan_mac=$(mtd_get_mac_encrypted_deco $(find_mtd_part config)) + label_mac=$lan_mac + ;; nec,wf1200cr|\ nec,wg1200cr) lan_mac=$(mtd_get_mac_ascii devdata "lanmac") diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 9127aed36e..04705aadf8 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -71,6 +71,11 @@ case "$FIRMWARE" in caldata_extract "radiocfg" 0x1000 0x440 ath9k_patch_mac $(mtd_get_mac_ascii devdata "wlan24mac") ;; + tplink,deco-s4-v2) + caldata_extract "art" 0x1000 0x440 + base_mac=$(mtd_get_mac_encrypted_deco $(find_mtd_part config)) + ath9k_patch_mac $(macaddr_add $base_mac 1) + ;; *) caldata_die "board $board is not supported yet" ;; diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index a47b29e7c7..57e59a89d6 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -263,6 +263,13 @@ case "$FIRMWARE" in ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ /lib/firmware/ath10k/QCA9888/hw2.0/board.bin ;; + tplink,deco-s4-v2) + caldata_extract "art" 0x5000 0x2f20 + base_mac=$(mtd_get_mac_encrypted_deco $(find_mtd_part config)) + ath10k_patch_mac $(macaddr_add $base_mac 2) + ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ + /lib/firmware/ath10k/QCA9888/hw2.0/board.bin + ;; esac ;; *) diff --git a/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh b/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh index d9cb8d2b82..d06f043ad4 100644 --- a/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh +++ b/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh @@ -1,4 +1,4 @@ -. /lib/functions.sh +. /lib/functions/system.sh preinit_set_mac_address() { case $(board_name) in @@ -19,6 +19,10 @@ preinit_set_mac_address() { siemens,ws-ap3610) ip link set dev eth0 address $(mtd_get_mac_ascii cfg1 ethaddr) ;; + tplink,deco-s4-v2) + base_mac=$(mtd_get_mac_encrypted_deco $(find_mtd_part config)) + ip link set dev eth0 address $base_mac + ;; zyxel,nbg6616) ethaddr=$(mtd_get_mac_ascii u-boot-env ethaddr) ip link set dev eth0 address $(macaddr_add $ethaddr 2) |