netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next 06/15] amd: mvme147: use eth_hw_addr_set()
Date: Thu, 18 Nov 2021 23:10:24 -0800	[thread overview]
Message-ID: <20211119071033.3756560-7-kuba@kernel.org> (raw)
In-Reply-To: <20211119071033.3756560-1-kuba@kernel.org>

Byte by byte assignments.

Fixes build on m68k.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 drivers/net/ethernet/amd/mvme147.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/amd/mvme147.c b/drivers/net/ethernet/amd/mvme147.c
index da97fccea9ea..410c7b67eba4 100644
--- a/drivers/net/ethernet/amd/mvme147.c
+++ b/drivers/net/ethernet/amd/mvme147.c
@@ -74,6 +74,7 @@ static struct net_device * __init mvme147lance_probe(void)
 	static int called;
 	static const char name[] = "MVME147 LANCE";
 	struct m147lance_private *lp;
+	u8 macaddr[ETH_ALEN];
 	u_long *addr;
 	u_long address;
 	int err;
@@ -93,15 +94,16 @@ static struct net_device * __init mvme147lance_probe(void)
 
 	addr = (u_long *)ETHERNET_ADDRESS;
 	address = *addr;
-	dev->dev_addr[0] = 0x08;
-	dev->dev_addr[1] = 0x00;
-	dev->dev_addr[2] = 0x3e;
+	macaddr[0] = 0x08;
+	macaddr[1] = 0x00;
+	macaddr[2] = 0x3e;
 	address = address >> 8;
-	dev->dev_addr[5] = address&0xff;
+	macaddr[5] = address&0xff;
 	address = address >> 8;
-	dev->dev_addr[4] = address&0xff;
+	macaddr[4] = address&0xff;
 	address = address >> 8;
-	dev->dev_addr[3] = address&0xff;
+	macaddr[3] = address&0xff;
+	eth_hw_addr_set(dev, macaddr);
 
 	printk("%s: MVME147 at 0x%08lx, irq %d, Hardware Address %pM\n",
 	       dev->name, dev->base_addr, MVME147_LANCE_IRQ,
-- 
2.31.1


  parent reply	other threads:[~2021-11-19  7:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19  7:10 [PATCH net-next 00/15] use eth_hw_addr_set() in arch-specific drivers Jakub Kicinski
2021-11-19  7:10 ` [PATCH net-next 01/15] amd: lance: use eth_hw_addr_set() Jakub Kicinski
2021-11-19  7:10 ` [PATCH net-next 02/15] amd: ni65: " Jakub Kicinski
2021-11-19  7:10 ` [PATCH net-next 03/15] amd: a2065/ariadne: " Jakub Kicinski
2021-11-19  7:10 ` [PATCH net-next 04/15] amd: hplance: " Jakub Kicinski
2021-11-19  7:10 ` [PATCH net-next 05/15] amd: atarilance: " Jakub Kicinski
2021-11-19  7:10 ` Jakub Kicinski [this message]
2021-11-19  7:10 ` [PATCH net-next 07/15] 8390: smc-ultra: " Jakub Kicinski
2021-11-19  7:10 ` [PATCH net-next 08/15] 8390: hydra: " Jakub Kicinski
2021-11-19  7:10 ` [PATCH net-next 09/15] 8390: mac8390: " Jakub Kicinski
2021-11-19  7:10 ` [PATCH net-next 10/15] 8390: wd: " Jakub Kicinski
2021-11-19  7:10 ` [PATCH net-next 11/15] smc9194: " Jakub Kicinski
2021-11-19  7:10 ` [PATCH net-next 12/15] lasi_82594: " Jakub Kicinski
2021-11-19  7:10 ` [PATCH net-next 13/15] apple: macmace: " Jakub Kicinski
2021-11-19  7:10 ` [PATCH net-next 14/15] cirrus: mac89x0: " Jakub Kicinski
2021-11-19  7:10 ` [PATCH net-next 15/15] natsemi: macsonic: " Jakub Kicinski
2021-11-19 11:20 ` [PATCH net-next 00/15] use eth_hw_addr_set() in arch-specific drivers patchwork-bot+netdevbpf

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=20211119071033.3756560-7-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).