From 8e384ba8307742b54b2be326697a5dc2dec6880b Mon Sep 17 00:00:00 2001 From: Pramod Pancha Date: Fri, 5 Jul 2019 13:45:19 -0400 Subject: ath79: add support for Trendnet TEW-823DRU MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Trendnet TEW-823DRU is a dual-band AC1750 router. The router is based on Qualcomm/Atheros QCA9558 + QCA9880. Specification: 720 MHz CPU 256 MB of RAM 16 MB of FLASH 3T3R 2.4 GHz 3T3R 5 GHz 5x 10/100/1000 Mbps Ethernet Firmware can be flashed from the web interface. Tested on 3 routers with no issues. Signed-off-by: Pramod Pancha [whitespace fixes] Signed-off-by: Petr Štetiar --- target/linux/ath79/base-files/etc/board.d/01_leds | 3 +++ target/linux/ath79/base-files/etc/board.d/02_network | 7 ++++++- .../ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) (limited to 'target/linux/ath79/base-files') diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds b/target/linux/ath79/base-files/etc/board.d/01_leds index 054863b1ba..238dda18f6 100755 --- a/target/linux/ath79/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/base-files/etc/board.d/01_leds @@ -193,6 +193,9 @@ tplink,tl-wr842n-v2) ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10" ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02" ;; +trendnet,tew-823dru) + ucidef_set_led_netdev "wan" "WAN" "trendnet:green:planet" "eth0" + ;; ubnt,bullet-m|\ ubnt,bullet-m-xw|\ ubnt,nanostation-m|\ diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index 029aadc3eb..2413b1f4bc 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -64,7 +64,8 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "2:lan" "3:lan" "4:lan" "5:lan" "1:wan" ;; - buffalo,bhr-4grv2) + buffalo,bhr-4grv2|\ + trendnet,tew-823dru) ucidef_add_switch "switch0" \ "0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth0" ;; @@ -363,6 +364,10 @@ ath79_setup_macs() base_mac=$(mtd_get_mac_binary u-boot 130048) wan_mac=$(macaddr_add "$base_mac" 1) ;; + trendnet,tew-823dru) + lan_mac=$(mtd_get_mac_text mac 4) + wan_mac=$(mtd_get_mac_text mac 24) + ;; ubnt,routerstation|\ ubnt,routerstation-pro) wan_mac=$(fconfig -s -r -d $(find_mtd_part "RedBoot config") -n ar7100_esa) diff --git a/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index bf3e14aa9c..d9c3fe7440 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -34,6 +34,14 @@ case "$board" in [ "$PHYNBR" -eq 1 ] && \ k2t_get_mac "lan_mac" > /sys${DEVPATH}/macaddress ;; + trendnet,tew-823dru) + # set the 2.4G interface mac address to LAN MAC + [ "$PHYNBR" -eq 1 ] && \ + mtd_get_mac_text mac 4 > /sys${DEVPATH}/macaddress + # set the 5G interface mac address to WAN MAC + 1 + [ "$PHYNBR" -eq 0 ] && \ + macaddr_add "$(mtd_get_mac_text mac 24)" 1 > /sys${DEVPATH}/macaddress + ;; *) ;; esac -- cgit v1.2.3