unsigned long reg_addr, reg_len;
        struct amd8111e_priv *lp;
        struct net_device *dev;
+       u8 addr[ETH_ALEN];
 
        err = pci_enable_device(pdev);
        if (err) {
 
        /* Initializing MAC address */
        for (i = 0; i < ETH_ALEN; i++)
-               dev->dev_addr[i] = readb(lp->mmio + PADR + i);
+               addr[i] = readb(lp->mmio + PADR + i);
+       eth_hw_addr_set(dev, addr);
 
        /* Setting user defined parametrs */
        lp->ext_phy_option = speed_duplex[card_idx];
 
        struct net_device *dev;
        const struct pcnet32_access *a = NULL;
        u8 promaddr[ETH_ALEN];
+       u8 addr[ETH_ALEN];
        int ret = -ENODEV;
 
        /* reset the chip */
                unsigned int val;
                val = a->read_csr(ioaddr, i + 12) & 0x0ffff;
                /* There may be endianness issues here. */
-               dev->dev_addr[2 * i] = val & 0x0ff;
-               dev->dev_addr[2 * i + 1] = (val >> 8) & 0x0ff;
+               addr[2 * i] = val & 0x0ff;
+               addr[2 * i + 1] = (val >> 8) & 0x0ff;
        }
+       eth_hw_addr_set(dev, addr);
 
        /* read PROM address and compare with CSR address */
        for (i = 0; i < ETH_ALEN; i++)
        }
 
        /* if the ethernet address is not valid, force to 00:00:00:00:00:00 */
-       if (!is_valid_ether_addr(dev->dev_addr))
-               eth_zero_addr(dev->dev_addr);
+       if (!is_valid_ether_addr(dev->dev_addr)) {
+               static const u8 zero_addr[ETH_ALEN] = {};
+
+               eth_hw_addr_set(dev, zero_addr);
+       }
 
        if (pcnet32_debug & NETIF_MSG_PROBE) {
                pr_cont(" %pM", dev->dev_addr);