summaryrefslogtreecommitdiff
path: root/target/linux/ramips/base-files
diff options
context:
space:
mode:
authorVasilis Tsiligiannis <acinonyx@openwrt.gr>2012-06-23 13:58:29 +0000
committerVasilis Tsiligiannis <acinonyx@openwrt.gr>2012-06-23 13:58:29 +0000
commiteee358338c1cc6a96496966bf57345f9af34c10b (patch)
treed891bb4c507c991ce293c912cb43314063c60324 /target/linux/ramips/base-files
parent81e8757da4e545a29178a077b257427418aaea2d (diff)
downloadmtk-20170518-eee358338c1cc6a96496966bf57345f9af34c10b.zip
mtk-20170518-eee358338c1cc6a96496966bf57345f9af34c10b.tar.gz
mtk-20170518-eee358338c1cc6a96496966bf57345f9af34c10b.tar.bz2
ramips: mac address detection for Fonera 2.0n
Detect and apply MAC address of a Fonera 2.0n (ramips) Signed-off-by: Malte Forkel <malte.forkel@berlin.de> Signed-off-by: Vasilis Tsiligiannis <b_tsiligiannis@silverton.gr> SVN-Revision: 32490
Diffstat (limited to 'target/linux/ramips/base-files')
-rwxr-xr-xtarget/linux/ramips/base-files/etc/uci-defaults/network5
-rw-r--r--target/linux/ramips/base-files/lib/preinit/06_set_iface_mac1
2 files changed, 6 insertions, 0 deletions
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/network b/target/linux/ramips/base-files/etc/uci-defaults/network
index bbf0334..cc3f212 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/network
@@ -107,6 +107,11 @@ ramips_setup_macs()
wan_mac=$(/usr/sbin/maccalc add "$lan_mac" 5)
;;
+ fonera20n)
+ lan_mac=$(ramips_get_mac_binary factory 40)
+ wan_mac=$(/usr/sbin/maccalc add "$lan_mac" 1)
+ ;;
+
dir-300-b1 |\
dir-300-b2 |\
dir-600-b1)
diff --git a/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac b/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac
index 69d1b8c..a605b22 100644
--- a/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac
+++ b/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac
@@ -26,6 +26,7 @@ preinit_set_mac_address() {
ifconfig eth0 hw ether $mac 2>/dev/null
;;
all0256n |\
+ fonera20n |\
hw550-3g |\
nbg-419n |\
omni-emb |\