diff options
| author | Roman Yeryomin <roman@advem.lv> | 2013-05-26 01:02:55 +0300 |
|---|---|---|
| committer | Roman Yeryomin <roman@advem.lv> | 2013-05-26 01:02:55 +0300 |
| commit | 342045a35b1981a89e4bc80842b10c065e1050da (patch) | |
| tree | 4140720b20e8d641c11da882010d6130a75fef21 /target/linux/ramips/base-files/lib/preinit/06_set_iface_mac | |
| parent | 7338133dde8238afce34676214b494c8db96689b (diff) | |
| parent | 1a116ce7818ecee5d167a9c0ebb1a0feca9120e6 (diff) | |
Merge trunk into realtek-unstable
Conflicts:
Config.in
feeds.conf.default
package/base-files/files/etc/hotplug2-common.rules
package/network/config/netifd/files/etc/init.d/network
Diffstat (limited to 'target/linux/ramips/base-files/lib/preinit/06_set_iface_mac')
| -rw-r--r-- | target/linux/ramips/base-files/lib/preinit/06_set_iface_mac | 38 |
1 files changed, 25 insertions, 13 deletions
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 379f74dd5..022f72e24 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 @@ -5,14 +5,24 @@ preinit_set_mac_address() { local mac + . /lib/functions.sh . /lib/ramips.sh case $(ramips_board_name) in - 3g-6200n) - mac=$(ramips_get_mac_binary factory 4) + 3g-6200n |\ + 3g-6200nl |\ + 3g300m | \ + dir-620-d1 |\ + w150m | \ + mzk-w300nh2 |\ + wl-330n |\ + wl-330n3g) + mac=$(mtd_get_mac_binary factory 4) ifconfig eth0 hw ether $mac 2>/dev/null ;; bc2 |\ + broadway |\ + d105 |\ dir-620-a1 |\ esr-9753 |\ freestation5 |\ @@ -20,28 +30,30 @@ preinit_set_mac_address() { psr-680w |\ rt-n56u |\ sl-r7205) - mac=$(ramips_get_mac_binary factory 4) - mac=$(maccalc or "$mac" "02:00:00:00:00:00") + mac=$(mtd_get_mac_binary factory 4) + mac=$(macaddr_setbit_la "$mac") ifconfig eth0 hw ether $mac 2>/dev/null ;; + asl26555 |\ dir-300-b1 |\ dir-300-b2 |\ dir-600-b1) - mac=$(ramips_get_mac_binary devdata 16388) + mac=$(mtd_get_mac_binary devdata 16388) ifconfig eth0 hw ether $mac 2>/dev/null ;; dir-645) - mac=$(ramips_get_mac_nvram nvram lanmac) - mac=$(maccalc or "$mac" "02:00:00:00:00:00") + mac=$(mtd_get_mac_ascii nvram lanmac) + mac=$(macaddr_setbit_la "$mac") ifconfig eth0 hw ether $mac 2>/dev/null ;; dap-1350) - mac=$(ramips_get_mac_binary devdata 46) + mac=$(mtd_get_mac_binary devdata 46) ifconfig eth0 hw ether $mac 2>/dev/null ;; all0239-3g |\ all0256n |\ all5002 |\ + all5003 |\ carambola |\ dir-615-h1 |\ fonera20n |\ @@ -49,23 +61,23 @@ preinit_set_mac_address() { hw550-3g |\ nbg-419n |\ omni-emb |\ + omni-emb-hpm |\ tew-691gr |\ tew-692gr |\ w306r-v20 |\ w502u |\ - wl-330n |\ - wl-330n3g |\ wr6202 |\ + wnce2001 |\ xdxrn502j) - mac=$(ramips_get_mac_binary factory 40) + mac=$(mtd_get_mac_binary factory 40) ifconfig eth0 hw ether $mac 2>/dev/null ;; wl341v3) - mac=$(ramips_get_mac_binary board-nvram 65440) + mac=$(mtd_get_mac_binary board-nvram 65440) ifconfig eth0 hw ether $mac 2>/dev/null ;; rt-n10-plus) - mac=$(ramips_get_mac_binary devconf 4) + mac=$(mtd_get_mac_binary devconf 4) ifconfig eth0 hw ether $mac 2>/dev/null ;; esac |
