From: BangLang Huang Date: Wed, 18 Jan 2017 09:45:48 +0000 (+0800) Subject: ramips: fix mac address of miwifi-mini X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2a7f669016f2faa29d64a59252556b96a55d071a;p=openwrt%2Fstaging%2Fynezz.git ramips: fix mac address of miwifi-mini For the miwifi-mini, the offset of ethernet mac should be 0x28 which you can easyily dump from 'Factory' partition. Signed-off-by: BangLang Huang --- diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 2d8d8edc29..e037cbce32 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -357,6 +357,10 @@ ramips_setup_macs() lan_mac=$(mtd_get_mac_binary factory_info 13) wan_mac=$(macaddr_add "$lan_mac" 1) ;; + miwifi-mini) + wan_mac=$(cat /sys/class/net/eth0/address) + lan_mac=$(macaddr_setbit_la "$wan_mac") + ;; m3|\ m4|\ x5|\ diff --git a/target/linux/ramips/dts/MIWIFI-MINI.dts b/target/linux/ramips/dts/MIWIFI-MINI.dts index 0cd511c4fa..6d8b28c3cc 100644 --- a/target/linux/ramips/dts/MIWIFI-MINI.dts +++ b/target/linux/ramips/dts/MIWIFI-MINI.dts @@ -119,7 +119,7 @@ ðernet { pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + mtd-mac-address = <&factory 0x28>; mediatek,portmap = "llllw"; };