aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/base-files/etc
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ath79/base-files/etc')
-rwxr-xr-xtarget/linux/ath79/base-files/etc/board.d/01_leds3
-rwxr-xr-xtarget/linux/ath79/base-files/etc/board.d/02_network7
-rw-r--r--target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac8
3 files changed, 17 insertions, 1 deletions
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