mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Lothar Waßmann" <LW@KARO-electronics.de>
To: netdev@vger.kernel.org
Cc: "David Miller" <davem@davemloft.net>,
	linux-kernel@vger.kernel.org, "Shawn Guo" <shawn.guo@linaro.org>,
	"Lothar Waßmann" <LW@KARO-electronics.de>
Subject: [PATCH v3 5/8] net/fec: don't munge MAC address from platform data
Date: Thu,  8 Dec 2011 08:59:29 +0100	[thread overview]
Message-ID: <55b78c1766da5b0d0d679f5eae3fb9fc74a6ceef.1323326019.git.LW@KARO-electronics.de> (raw)
In-Reply-To: <6d1e5cdcbfc48df864ec9e0939645c0e95389d2a.1323326019.git.LW@KARO-electronics.de>
In-Reply-To: <cover.1323326019.git.LW@KARO-electronics.de>

When the MAC address is supplied via platform_data it should be OK as
it is and should not be modified in case of a dual FEC setup.
Also copying the MAC from platform_data to the single 'macaddr'
variable will overwrite the MAC for the first interface in case of a
dual FEC setup.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
---
 drivers/net/ethernet/freescale/fec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c
index e2b5ce6..11534b9 100644
--- a/drivers/net/ethernet/freescale/fec.c
+++ b/drivers/net/ethernet/freescale/fec.c
@@ -818,7 +818,7 @@ static void __inline__ fec_get_mac(struct net_device *ndev)
 			iap = (unsigned char *)FEC_FLASHMAC;
 #else
 		if (pdata)
-			memcpy(iap, pdata->mac, ETH_ALEN);
+			iap = (unsigned char *)&pdata->mac;
 #endif
 	}
 
-- 
1.5.6.5


  reply	other threads:[~2011-12-08  7:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-08  7:59 [PATCH v3 0/8] net/fec: several cleanups and bugfixes Lothar Waßmann
2011-12-08  7:59 ` [PATCH v3 1/8] net/fec: misc cleanups Lothar Waßmann
2011-12-08  7:59   ` [PATCH v3 2/8] net/fec: set con_id in clk_get() call to NULL Lothar Waßmann
2011-12-08  7:59     ` [PATCH v3 3/8] net/fec: prevent dobule restart of interface on FDX/HDX change Lothar Waßmann
2011-12-08  7:59       ` [PATCH v3 4/8] net/fec: don't request invalid IRQ Lothar Waßmann
2011-12-08  7:59         ` Lothar Waßmann [this message]
2011-12-08  7:59           ` [PATCH v3 6/8] net/fec: preserve MII/RMII setting in fec_stop() Lothar Waßmann
2011-12-08  7:59             ` [PATCH v3 7/8] net/fec: fix the .remove code Lothar Waßmann
2011-12-08  7:59               ` [PATCH v3 8/8] net/fec: make FEC driver buildable as module Lothar Waßmann
2011-12-09  0:54 ` [PATCH v3 0/8] net/fec: several cleanups and bugfixes David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55b78c1766da5b0d0d679f5eae3fb9fc74a6ceef.1323326019.git.LW@KARO-electronics.de \
    --to=lw@karo-electronics.de \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shawn.guo@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®