ramips: fix mac address of miwifi-mini
authorBangLang Huang <banglang.huang@foxmail.com>
Wed, 18 Jan 2017 09:45:48 +0000 (17:45 +0800)
committerJo-Philipp Wich <jo@mein.io>
Fri, 28 Apr 2017 15:07:04 +0000 (17:07 +0200)
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@foxmail.com>
target/linux/ramips/base-files/etc/board.d/02_network
target/linux/ramips/dts/MIWIFI-MINI.dts

index 1c40d550a11cf10b5a5ddadddda84bab8edd26e1..ebca3789728232342693e9c6e65324307e776b58 100755 (executable)
@@ -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|\
index 0cd511c4fae5c952b2d0ab5c5898841e55377013..6d8b28c3ccb9ff5d12b4c0909a483488a7066d10 100644 (file)
 &ethernet {
        pinctrl-names = "default";
        pinctrl-0 = <&ephy_pins>;
-       mtd-mac-address = <&factory 0x4>;
+       mtd-mac-address = <&factory 0x28>;
        mediatek,portmap = "llllw";
 };