summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/amd/sun3lance.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-13 13:44:34 -0700
committerJakub Kicinski <kuba@kernel.org>2021-10-14 09:22:25 -0700
commit562ef98a666eef8e32a6057af37a577163ab6946 (patch)
tree4e324b117548a95473925a8383f706138427b2eb /drivers/net/ethernet/amd/sun3lance.c
parent68a064028e4e85b7a9dbfe58fc43b34060c11d39 (diff)
ethernet: replace netdev->dev_addr assignment loops
A handful of drivers contains loops assigning the mac addr byte by byte. Convert those to eth_hw_addr_set(). Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/amd/sun3lance.c')
-rw-r--r--drivers/net/ethernet/amd/sun3lance.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/amd/sun3lance.c b/drivers/net/ethernet/amd/sun3lance.c
index 4a845bc071b2..007bd7787291 100644
--- a/drivers/net/ethernet/amd/sun3lance.c
+++ b/drivers/net/ethernet/amd/sun3lance.c
@@ -305,7 +305,6 @@ static int __init lance_probe( struct net_device *dev)
unsigned long ioaddr;
struct lance_private *lp;
- int i;
static int did_version;
volatile unsigned short *ioaddr_probe;
unsigned short tmp1, tmp2;
@@ -373,8 +372,7 @@ static int __init lance_probe( struct net_device *dev)
dev->irq);
/* copy in the ethernet address from the prom */
- for(i = 0; i < 6 ; i++)
- dev->dev_addr[i] = idprom->id_ethaddr[i];
+ eth_hw_addr_set(dev, idprom->id_ethaddr);
/* tell the card it's ether address, bytes swapped */
MEM->init.hwaddr[0] = dev->dev_addr[1];