aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/generic/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ath79/generic/base-files')
-rwxr-xr-xtarget/linux/ath79/generic/base-files/etc/board.d/02_network1
-rw-r--r--target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac3
-rw-r--r--target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh13
3 files changed, 17 insertions, 0 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 a3fcf35715..69c19358e2 100755
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -30,6 +30,7 @@ ath79_setup_interfaces()
pisen,ts-d084|\
pisen,wmb001n|\
pisen,wmm003n|\
+ siemens,ws-ap3610|\
tplink,cpe210-v2|\
tplink,cpe210-v3|\
tplink,cpe510-v2|\
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index 8c8b7932bc..f814bd46ad 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -34,6 +34,9 @@ case "$board" in
[ "$PHYNBR" -eq 1 ] && \
k2t_get_mac "lan_mac" > /sys${DEVPATH}/macaddress
;;
+ siemens,ws-ap3610)
+ mtd_get_mac_ascii cfg1 RADIOADDR${PHYNBR} > /sys${DEVPATH}/macaddress
+ ;;
trendnet,tew-823dru)
# set the 2.4G interface mac address to LAN MAC
[ "$PHYNBR" -eq 1 ] && \
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
new file mode 100644
index 0000000000..a0fb9fc717
--- /dev/null
+++ b/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+. /lib/functions.sh
+
+preinit_set_mac_address() {
+ case $(board_name) in
+ siemens,ws-ap3610)
+ ip link set dev eth0 address $(mtd_get_mac_ascii cfg1 ethaddr)
+ ;;
+ esac
+}
+
+boot_hook_add preinit_main preinit_set_mac_address