aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-07-09 07:01:55 +0000
committerJohn Crispin <blogic@openwrt.org>2015-07-09 07:01:55 +0000
commit23cb6147ea67a445fd3ee75c779ede7d322efc9c (patch)
tree5de80d6a190c6f3748831231a01184504221c531 /target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
parent4abaa8e05ec82349f45afa02bb026601f658487f (diff)
downloadmaster-187ad058-23cb6147ea67a445fd3ee75c779ede7d322efc9c.tar.gz
master-187ad058-23cb6147ea67a445fd3ee75c779ede7d322efc9c.tar.bz2
master-187ad058-23cb6147ea67a445fd3ee75c779ede7d322efc9c.zip
ar71xx: compex wpj531 fix setting mac address on ethernet
Signed-off-by: Christian Mehlis <christian@m3hlis.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46282 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
index b10691766a..2cc2fe88ac 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
@@ -94,9 +94,8 @@ static struct gpio_keys_button wpj531_gpio_keys[] __initdata = {
static void __init common_setup(void)
{
- u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
- u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
- u8 tmpmac[ETH_ALEN];
+ u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
+ u8 *mac = (u8 *) KSEG1ADDR(0x1f02e000);
ath79_register_m25p80(NULL);
@@ -109,7 +108,7 @@ static void __init common_setup(void)
ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
ath79_eth0_data.speed = SPEED_100;
ath79_eth0_data.phy_mask = BIT(4);
- ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
+ ath79_init_mac(ath79_eth0_data.mac_addr, mac + WPJ531_MAC0_OFFSET, 0);
ath79_register_eth(0);
/* WAN */
@@ -118,10 +117,10 @@ static void __init common_setup(void)
ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
ath79_eth1_data.speed = SPEED_1000;
ath79_switch_data.phy_poll_mask |= BIT(4);
- ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1);
+ ath79_init_mac(ath79_eth1_data.mac_addr, mac + WPJ531_MAC1_OFFSET, 0);
ath79_register_eth(1);
- ath79_register_wmac(ee, tmpmac);
+ ath79_register_wmac(art + WPJ531_WMAC_CALDATA_OFFSET, NULL);
ath79_register_pci();
}