aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChuanhong Guo <gch981213@gmail.com>2019-07-25 19:43:32 +0800
committerChuanhong Guo <gch981213@gmail.com>2019-07-25 19:59:33 +0800
commitf30d5884606e5b6a612ea13f78e5b6e9b9c0714c (patch)
treeb7f783785fc363622c24d6ac7344475ea3e0404a
parentcd91f2327ffb06a41129a35ae7be1e7923a78d74 (diff)
downloadupstream-f30d5884606e5b6a612ea13f78e5b6e9b9c0714c.tar.gz
upstream-f30d5884606e5b6a612ea13f78e5b6e9b9c0714c.tar.bz2
upstream-f30d5884606e5b6a612ea13f78e5b6e9b9c0714c.zip
ramips: fix mac addresses used by Phicomm K2P
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>
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/02_network4
1 files changed, 4 insertions, 0 deletions
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 a2b7d1cf33..47cf00dcee 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -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|\