From patchwork Tue Mar 1 03:06:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 590285 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (caladan.dune.hu [78.24.191.180]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id E29841400CB for ; Tue, 1 Mar 2016 14:27:16 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 976B3B91F8F; Tue, 1 Mar 2016 04:08:59 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Tue, 1 Mar 2016 04:08:59 +0100 (CET) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id EF8C9B91C7C for ; Tue, 1 Mar 2016 04:07:35 +0100 (CET) X-policyd-weight: using cached result; rate: -6.1 Received: from chaos.universe-factory.net (chaos.universe-factory.net [37.72.148.22]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Tue, 1 Mar 2016 04:07:33 +0100 (CET) Received: from avalon.neoraider.dn42 (unknown [IPv6:fd1b:c28a:2fd6::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by chaos.universe-factory.net (Postfix) with ESMTPSA id 8EF7E1830AC for ; Tue, 1 Mar 2016 04:07:32 +0100 (CET) From: Matthias Schiffer To: openwrt-devel@lists.openwrt.org Date: Tue, 1 Mar 2016 04:06:59 +0100 Message-Id: <80601b52a998772da83ac0fe4b7d8388bd175698.1456800208.git.mschiffer@universe-factory.net> X-Mailer: git-send-email 2.7.2 In-Reply-To: References: In-Reply-To: References: Subject: [OpenWrt-Devel] [PATCH CC 25/32] ar71xx: compex wpj531 fix setting mac address on ethernet X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Signed-off-by: Christian Mehlis Backport of r46282 --- target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c | 11 +++++------ 1 file 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 b106917..2cc2fe8 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(); }