summaryrefslogtreecommitdiff
path: root/target/linux/lantiq/base-files
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2013-11-07 12:46:24 +0000
committerJohn Crispin <john@openwrt.org>2013-11-07 12:46:24 +0000
commit7ee1546ca37e40bc8641e9525d1f6f465ac6866e (patch)
tree53a5d2a97df995de676393a45e182b3c0e7d2403 /target/linux/lantiq/base-files
parent8965a29bb0bc8cf83d58844df07166ace0c20b8f (diff)
downloadmtk-20170518-7ee1546ca37e40bc8641e9525d1f6f465ac6866e.zip
mtk-20170518-7ee1546ca37e40bc8641e9525d1f6f465ac6866e.tar.gz
mtk-20170518-7ee1546ca37e40bc8641e9525d1f6f465ac6866e.tar.bz2
lantiq: fix TDW8970 lan/wan mac
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 38677
Diffstat (limited to 'target/linux/lantiq/base-files')
-rw-r--r--target/linux/lantiq/base-files/etc/uci-defaults/02_network10
1 files changed, 9 insertions, 1 deletions
diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/02_network b/target/linux/lantiq/base-files/etc/uci-defaults/02_network
index 86a47b4..ed556fc 100644
--- a/target/linux/lantiq/base-files/etc/uci-defaults/02_network
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_network
@@ -40,6 +40,8 @@ vpi=1
vci=32
encaps="llc"
payload="bridged"
+lan_mac=""
+wan_mac=""
board=$(lantiq_board_id)
@@ -97,10 +99,16 @@ P2601HNFX)
ucidef_add_switch "switch0" "1" "1"
ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 5t"
;;
+
+TDW8970)
+ lan_mac=$(mtd_get_mac_binary boardconfig 61696)
+ wan_mac=$(macaddr_add "$lan_mac" 1)
+ ;;
esac
[ -z "$(ls /lib/modules/`uname -r`/ltq_atm*)" ] || set_atm_wan "$vpi" "$vci" "$encaps" "$payload"
-
+[ -n "$lan_mac" ] && ucidef_set_interface_macaddr lan $lan_mac
+[ -n "$wan_mac" ] && ucidef_set_interface_macaddr wan $wan_mac
uci commit network