aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/base-files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-03-20 09:37:07 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-03-20 09:37:07 +0000
commit8685482158a4f1c1fd6eb172c5edd24e577f6f61 (patch)
treeb7cabb1fa1e7c4af74d63d498c78edc4b8163f39 /target/linux/ramips/base-files
parent5ca24d776ac144b91015cec44537f21ad2a1aa2d (diff)
downloadmaster-187ad058-8685482158a4f1c1fd6eb172c5edd24e577f6f61.tar.gz
master-187ad058-8685482158a4f1c1fd6eb172c5edd24e577f6f61.tar.bz2
master-187ad058-8685482158a4f1c1fd6eb172c5edd24e577f6f61.zip
ramips: fix LAN/WAN MAC address for WSR-600/1166
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44903 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ramips/base-files')
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/02_network9
1 files changed, 9 insertions, 0 deletions
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 7e9d8c984b..89d1681062 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -347,6 +347,15 @@ ramips_setup_macs()
wan_mac=$(mtd_get_mac_binary factory 46)
;;
+ wsr-600)
+ wan_mac=$(mtd_get_mac_binary factory 4)
+ lan_mac=$wan_mac
+ ;;
+ wsr-1166)
+ local index="$(find_mtd_index "board_data")"
+ wan_mac="$(grep -m1 mac= "/dev/mtd${index}" | cut -d= -f2)"
+ lan_mac=$wan_mac
+ ;;
*)
lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add "$lan_mac" 1)