From patchwork Thu Apr 30 20:31:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 466722 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.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 54538140310 for ; Fri, 1 May 2015 06:34:44 +1000 (AEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 8595628BC4B; Thu, 30 Apr 2015 22:32:13 +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, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 9625C28A60C for ; Thu, 30 Apr 2015 22:31:16 +0200 (CEST) X-policyd-weight: using cached result; rate: -7.6 Received: from chaos.universe-factory.net (chaos.universe-factory.net [37.72.148.22]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Thu, 30 Apr 2015 22:31:08 +0200 (CEST) Received: from avalon.neoraider.dn42 (unknown [82.139.197.228]) (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 2645E18965F for ; Thu, 30 Apr 2015 22:32:13 +0200 (CEST) From: Matthias Schiffer To: openwrt-devel@lists.openwrt.org Date: Thu, 30 Apr 2015 22:31:44 +0200 Message-Id: X-Mailer: git-send-email 2.3.7 In-Reply-To: References: In-Reply-To: References: Subject: [OpenWrt-Devel] [PATCH v2 4/4] mpc85xx: replace WDR4900 uci-defaults ethernet MAC address hack with DTS entry 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" This also changes the MAC address to one of the adresses actually used by the stock firmware on one of the ethernet interfaces. Signed-off-by: Matthias Schiffer --- target/linux/mpc85xx/base-files/etc/uci-defaults/02_network | 2 -- target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/target/linux/mpc85xx/base-files/etc/uci-defaults/02_network b/target/linux/mpc85xx/base-files/etc/uci-defaults/02_network index e4e3566..525a552 100644 --- a/target/linux/mpc85xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/mpc85xx/base-files/etc/uci-defaults/02_network @@ -20,8 +20,6 @@ tl-wdr4900-v1) ucidef_add_switch "switch0" "1" "1" ucidef_add_switch_vlan "switch0" "1" "0t 2 3 4 5" ucidef_add_switch_vlan "switch0" "2" "0t 1" - ucidef_set_interface_macaddr lan "$(mtd_get_mac_binary config 338)" - ucidef_set_interface_macaddr wan "$(mtd_get_mac_binary config 344)" ;; *) ucidef_set_interfaces_lan_wan "eth0" "eth1" diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts index 49e516c..7e48e23 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts @@ -63,7 +63,7 @@ label = "rootfs"; }; - config@fe0000 { + config: config@fe0000 { reg = <0x00fe0000 0x00010000>; label = "config"; read-only; @@ -118,6 +118,7 @@ enet0: ethernet@b0000 { phy-handle = <&phy0>; phy-connection-type = "rgmii-id"; + mtd-mac-address = <&config 0x14c>; }; enet1: ethernet@b1000 {