aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-12-05 17:27:07 +0000
committerGabor Juhos <juhosg@openwrt.org>2011-12-05 17:27:07 +0000
commit287e495fdd697e3def6277627ffc8da0fffd466d (patch)
tree96639f2c64211282d407594fed9562405a6f696b /target
parent306d52b8dadf8e05eb5a1af9434dc8931fcee137 (diff)
downloadmaster-187ad058-287e495fdd697e3def6277627ffc8da0fffd466d.tar.gz
master-187ad058-287e495fdd697e3def6277627ffc8da0fffd466d.tar.bz2
master-187ad058-287e495fdd697e3def6277627ffc8da0fffd466d.zip
ramips: set mac addresses for the NBG-419N
Based on a patch by Nerijus Baliunas <nerijus@users.sourceforge.net> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29454 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rwxr-xr-xtarget/linux/ramips/base-files/etc/uci-defaults/network5
-rw-r--r--target/linux/ramips/base-files/lib/preinit/06_set_iface_mac3
2 files changed, 7 insertions, 1 deletions
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/network b/target/linux/ramips/base-files/etc/uci-defaults/network
index 489057dfd7..fdd29a8d6e 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/network
@@ -60,6 +60,11 @@ ramips_setup_macs()
lan_mac=$(ramips_get_mac_binary factory 4)
wan_mac=$(/usr/sbin/maccalc add "$lan_mac" 1)
;;
+
+ nbg-419n)
+ lan_mac=$(ramips_get_mac_binary factory 4)
+ wan_mac=$(ramips_get_mac_binary factory 40)
+ ;;
esac
[ -n $lan_mac ] && ucidef_set_interface_macaddr lan $lan_mac
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 2d6a4b6dee..69b9cdfa59 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
@@ -13,7 +13,8 @@ preinit_set_mac_address() {
mac=$(maccalc or "$mac" "02:00:00:00:00:00")
ifconfig eth0 hw ether $mac 2>/dev/null
;;
- hw550-3g)
+ hw550-3g |\
+ nbg-419n)
mac=$(ramips_get_mac_binary factory 40)
ifconfig eth0 hw ether $mac 2>/dev/null
;;