ramips: fix mac addresses used by Phicomm K2P
authorChuanhong Guo <gch981213@gmail.com>
Thu, 25 Jul 2019 11:43:32 +0000 (19:43 +0800)
committerChuanhong Guo <gch981213@gmail.com>
Thu, 25 Jul 2019 11:59:33 +0000 (19:59 +0800)
Like most mt7621 boards, Phicomm K2P stores LAN/WAN mac addresses
at 0xe000/0xe006 of factory partition.
Phicomm uses lan_mac-1 as wan_mac, while our default case in 02_network
uses lan_mac+1.

Add a special case reading lan/wan mac address for Phicomm K2P.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
target/linux/ramips/base-files/etc/board.d/02_network

index a2b7d1cf33af8699889820fe4f95dd7be875eeb9..47cf00dcee164723f6f2e0e77a96fdce723f6df0 100755 (executable)
@@ -647,6 +647,10 @@ ramips_setup_macs()
                wan_mac=$(mtd_get_mac_binary factory 4)
                lan_mac=$(mtd_get_mac_binary factory 46)
                ;;
+       phicomm,k2p)
+               lan_mac=$(mtd_get_mac_binary factory 0xe000)
+               wan_mac=$(mtd_get_mac_binary factory 0xe006)
+               ;;
        poray,m3|\
        poray,m4-4m|\
        poray,m4-8m|\