Browse Source

mvebu: fix Linksys WRT LAN/WAN MAC addresses

According to 02_network, eth0.1 is LAN and eth1.2 is WAN,
but $mac_wan was assigned incorrectly to eth0 in preinit.

Swap eth0 and eth1 to fix this.

Signed-off-by: DENG Qingfang <[email protected]>
DENG Qingfang 6 years ago
parent
commit
26851f9db2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac

+ 2 - 2
target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac

@@ -21,8 +21,8 @@ preinit_set_mac_address() {
 
 		mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
 		mac_wan=$(macaddr_setbit_la "$mac")
-		ip link set dev eth1 address $mac 2>/dev/null
-		ip link set dev eth0 address $mac_wan 2>/dev/null
+		ip link set dev eth0 address $mac 2>/dev/null
+		ip link set dev eth1 address $mac_wan 2>/dev/null
 		;;
 	linksys,mamba)
 		mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)