diff options
author | John Crispin <blogic@openwrt.org> | 2014-07-26 20:36:09 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-07-26 20:36:09 +0000 |
commit | daa1915f324c153d688cb66966dd9ace41342473 (patch) | |
tree | b7f3d2804bc8641a2484156e5496055ec717ecf0 /target/linux/ramips/base-files/etc | |
parent | ae01f1601674fd29dc1690b7d86cc84378266468 (diff) | |
download | upstream-daa1915f324c153d688cb66966dd9ace41342473.tar.gz upstream-daa1915f324c153d688cb66966dd9ace41342473.tar.bz2 upstream-daa1915f324c153d688cb66966dd9ace41342473.zip |
ramips: ethernet mac cleanup
Compile tested all subtargets and profiles.
Unfortunately I don't own any board affected by these changes, so no run tests.
Signed-off-by: Roman Yeryomin <roman@advem.lv>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41839 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ramips/base-files/etc')
-rwxr-xr-x | target/linux/ramips/base-files/etc/uci-defaults/02_network | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network b/target/linux/ramips/base-files/etc/uci-defaults/02_network index 85337c238b..f65388f613 100755 --- a/target/linux/ramips/base-files/etc/uci-defaults/02_network +++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network @@ -199,19 +199,22 @@ ramips_setup_macs() case $board in br-6475nd) - lan_mac=$(mtd_get_mac_binary devdata 13) + lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(mtd_get_mac_binary devdata 7) ;; w306r-v20) + lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$lan_mac" 5) ;; tew-691gr) + lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$lan_mac" 3) ;; tew-692gr) + lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$lan_mac" 4) ;; @@ -219,10 +222,24 @@ ramips_setup_macs() m4 |\ x5 |\ x8) - lan_mac=$(macaddr_add "$lan_mac" -1) + lan_mac=$(cat /sys/class/net/eth0/address) + lan_mac=$(macaddr_add "$lan_mac" -2) ;; - dir-620-a1) + bc2 |\ + broadway |\ + d105 |\ + dir-620-a1 |\ + esr-9753 |\ + freestation5 |\ + hlk-rm04 | \ + mpr-a1 | \ + mpr-a2 | \ + dir-300-b7 | \ + dir-320-b1 | \ + psr-680w |\ + sl-r7205) + lan_mac=$(cat /sys/class/net/eth0/address) lan_mac=$(macaddr_setbit_la "$lan_mac") wan_mac=$(macaddr_add "$lan_mac" 1) ;; @@ -233,12 +250,13 @@ ramips_setup_macs() wan_mac=$(mtd_get_mac_ascii nvram wanmac) ;; - nbg-419n | \ wcr-150gn) wan_mac=$(mtd_get_mac_binary factory 40) ;; rt-n56u) + lan_mac=$(cat /sys/class/net/eth0/address) + lan_mac=$(macaddr_setbit_la "$lan_mac") wan_mac=$(mtd_get_mac_binary factory 32772) ;; @@ -250,16 +268,6 @@ ramips_setup_macs() wan_mac=$(mtd_get_mac_binary factory 46) ;; - wl341v3) - lan_mac=$(mtd_get_mac_binary board-nvram 65440) - wan_mac=$(macaddr_add "$lan_mac" 1) - ;; - - wr8305rt) - lan_mac=$(mtd_get_mac_binary factory 4) - wan_mac=$(macaddr_add "$lan_mac" 1) - ;; - *) lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$lan_mac" 1) |