[source] ramips: fix mac address of miwifi-mini

LEDE Commits lede-commits at lists.infradead.org
Fri Apr 28 08:10:55 PDT 2017


jow pushed a commit to source.git, branch lede-17.01:
https://git.lede-project.org/846457fdbffaffdf44d668715e88cb21765ec6c9

commit 846457fdbffaffdf44d668715e88cb21765ec6c9
Author: BangLang Huang <banglang.huang at foxmail.com>
AuthorDate: Wed Jan 18 17:45:48 2017 +0800

    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 <banglang.huang at foxmail.com>
---
 target/linux/ramips/base-files/etc/board.d/02_network | 4 ++++
 target/linux/ramips/dts/MIWIFI-MINI.dts               | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

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 1c40d55..ebca378 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -358,6 +358,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 0cd511c..6d8b28c 100644
--- a/target/linux/ramips/dts/MIWIFI-MINI.dts
+++ b/target/linux/ramips/dts/MIWIFI-MINI.dts
@@ -119,7 +119,7 @@
 &ethernet {
 	pinctrl-names = "default";
 	pinctrl-0 = <&ephy_pins>;
-	mtd-mac-address = <&factory 0x4>;
+	mtd-mac-address = <&factory 0x28>;
 	mediatek,portmap = "llllw";
 };
 



More information about the lede-commits mailing list