From patchwork Wed Jul 8 15:48:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Mehlis X-Patchwork-Id: 493045 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8D8B81402BB for ; Thu, 9 Jul 2015 01:50:14 +1000 (AEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 1AEF428BDA7; Wed, 8 Jul 2015 17:49:05 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 5AACA28748E for ; Wed, 8 Jul 2015 17:48:44 +0200 (CEST) X-policyd-weight: using cached result; rate:hard: -7.6 Received: from phoenix.uberspace.de (phoenix.uberspace.de [95.143.172.135]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Wed, 8 Jul 2015 17:48:44 +0200 (CEST) Received: (qmail 11909 invoked from network); 8 Jul 2015 15:49:02 -0000 Received: from localhost (HELO black.lan.) (127.0.0.1) by phoenix.uberspace.de with SMTP; 8 Jul 2015 15:49:02 -0000 From: Christian Mehlis To: openwrt-devel@lists.openwrt.org Date: Wed, 8 Jul 2015 17:48:15 +0200 Message-Id: <1436370498-8984-2-git-send-email-christian@m3hlis.de> X-Mailer: git-send-email 2.3.4.263.gf53fc38 In-Reply-To: <1436370498-8984-1-git-send-email-christian@m3hlis.de> References: <1436370498-8984-1-git-send-email-christian@m3hlis.de> Subject: [OpenWrt-Devel] [PATCH 2/5] ar71xx: compex wpj531 fix setting mac address on ethernet X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 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 --- 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(); }