Commit 9b02d32e authored by Sungbo Eo's avatar Sungbo Eo Committed by Adrian Schmutzler
Browse files

ar71xx: fix MAC address setup for TL-WDR4300 board



The current ethernet MAC address setup of TL-WDR4300 board is different
from the setup of stock firmware:

OpenWrt: lan = label_mac -2, wan = label_mac -2
  stock: lan = label_mac,    wan = label_mac +1

This patch applies to all devices using TL-WDR4300 board:
TL-WDR3600 v1
TL-WDR4300 v1
TL-WDR4300 v1 (IL)
TL-WDR4310 v1
Mercury MW4530R v1
Signed-off-by: default avatarSungbo Eo <mans0n@gorani.run>
parent a4260eaa
...@@ -633,6 +633,10 @@ ar71xx_setup_macs() ...@@ -633,6 +633,10 @@ ar71xx_setup_macs()
fritz300e) fritz300e)
lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
;; ;;
tl-wdr4300)
base_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
wan_mac=$(macaddr_add "$base_mac" 1)
;;
tl-wr1043n-v5|\ tl-wr1043n-v5|\
tl-wr1043nd-v4) tl-wr1043nd-v4)
lan_mac=$(mtd_get_mac_binary product-info 0x8) lan_mac=$(mtd_get_mac_binary product-info 0x8)
......
...@@ -183,7 +183,7 @@ static void __init wdr4300_setup(void) ...@@ -183,7 +183,7 @@ static void __init wdr4300_setup(void)
ath79_register_mdio(0, 0x0); ath79_register_mdio(0, 0x0);
ath79_init_mac(ath79_eth0_data.mac_addr, mac, -2); ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
/* GMAC0 is connected to an AR8327N switch */ /* GMAC0 is connected to an AR8327N switch */
ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment