amd: atarilance: use eth_hw_addr_set()
authorJakub Kicinski <kuba@kernel.org>
Fri, 19 Nov 2021 07:10:23 +0000 (23:10 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Nov 2021 11:05:20 +0000 (11:05 +0000)
Byte by byte assignments.

Fixes build on m68k.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/atarilance.c

index 9c7d969..2786916 100644 (file)
@@ -471,6 +471,7 @@ static unsigned long __init lance_probe1( struct net_device *dev,
        int                                     i;
        static int                              did_version;
        unsigned short                  save1, save2;
+       u8 addr[ETH_ALEN];
 
        PROBE_PRINT(( "Probing for Lance card at mem %#lx io %#lx\n",
                                  (long)memaddr, (long)ioaddr ));
@@ -585,14 +586,16 @@ static unsigned long __init lance_probe1( struct net_device *dev,
                eth_hw_addr_set(dev, OldRieblDefHwaddr);
                break;
          case NEW_RIEBL:
-               lp->memcpy_f(dev->dev_addr, RIEBL_HWADDR_ADDR, ETH_ALEN);
+               lp->memcpy_f(addr, RIEBL_HWADDR_ADDR, ETH_ALEN);
+               eth_hw_addr_set(dev, addr);
                break;
          case PAM_CARD:
                i = IO->eeprom;
                for( i = 0; i < 6; ++i )
-                       dev->dev_addr[i] =
+                       addr[i] =
                                ((((unsigned short *)MEM)[i*2] & 0x0f) << 4) |
                                ((((unsigned short *)MEM)[i*2+1] & 0x0f));
+               eth_hw_addr_set(dev, addr);
                i = IO->mem;
                break;
        }