aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ixp4xx/base-files/lib
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2012-11-11 21:04:30 +0000
committerImre Kaloz <kaloz@openwrt.org>2012-11-11 21:04:30 +0000
commit505a81f173aad0941645e039df6154ff5f8def8e (patch)
treec7766f67f122d7f78e1b86b7ab10e7b3bfabb1fa /target/linux/ixp4xx/base-files/lib
parenta20b4c62429a68128f75850b9c3c63fa46b49d64 (diff)
downloadupstream-505a81f173aad0941645e039df6154ff5f8def8e.tar.gz
upstream-505a81f173aad0941645e039df6154ff5f8def8e.tar.bz2
upstream-505a81f173aad0941645e039df6154ff5f8def8e.zip
[ixp4xx:] add support for the Tonze AP-422/425
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34165 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ixp4xx/base-files/lib')
-rw-r--r--target/linux/ixp4xx/base-files/lib/preinit/05_set_ether_mac_ixp4xx9
1 files changed, 9 insertions, 0 deletions
diff --git a/target/linux/ixp4xx/base-files/lib/preinit/05_set_ether_mac_ixp4xx b/target/linux/ixp4xx/base-files/lib/preinit/05_set_ether_mac_ixp4xx
index e19e0ec250..e707dabf05 100644
--- a/target/linux/ixp4xx/base-files/lib/preinit/05_set_ether_mac_ixp4xx
+++ b/target/linux/ixp4xx/base-files/lib/preinit/05_set_ether_mac_ixp4xx
@@ -17,6 +17,15 @@ set_ether_mac() {
if [ "$(ifconfig eth0 2>/dev/null | grep -c 00:00:00:00:00:00)" == "1" ]; then
ifconfig eth0 hw ether $(fconfig -s -r -d /dev/$RB_CONFIG -n zcom_npe_esa)
fi
+
+ # Others (*cough*, Tonze) are dumb enough to not handle mac addresses at all
+
+ if [ "$(ifconfig eth0 2>/dev/null | grep -c 00:00:00:00:00:00)" == "1" ]; then
+ ifconfig eth0 hw ether 00:11:22:33:44:55
+ fi
+ if [ "$(ifconfig eth1 2>/dev/null | grep -c 00:00:00:00:00:00)" == "1" ]; then
+ ifconfig eth1 hw ether 00:11:22:33:44:56
+ fi
}
boot_hook_add preinit_main set_ether_mac