ramips: fix LAN/WAN MAC address for WSR-600/1166
authorFelix Fietkau <nbd@openwrt.org>
Fri, 20 Mar 2015 09:37:07 +0000 (09:37 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 20 Mar 2015 09:37:07 +0000 (09:37 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 44903

target/linux/ramips/base-files/etc/board.d/02_network

index 7e9d8c984b1cc8df8fd47689e720eb7a4268e9e9..89d168106216a2c201397d76d30221e2eb2aaf1e 100755 (executable)
@@ -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)