diff options
Diffstat (limited to 'drivers/net/ethernet/dec/tulip/uli526x.c')
-rw-r--r-- | drivers/net/ethernet/dec/tulip/uli526x.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/ethernet/dec/tulip/uli526x.c b/drivers/net/ethernet/dec/tulip/uli526x.c index d67ef7d02d6b..77d9058431e3 100644 --- a/drivers/net/ethernet/dec/tulip/uli526x.c +++ b/drivers/net/ethernet/dec/tulip/uli526x.c @@ -272,6 +272,7 @@ static int uli526x_init_one(struct pci_dev *pdev, struct uli526x_board_info *db; /* board information structure */ struct net_device *dev; void __iomem *ioaddr; + u8 addr[ETH_ALEN]; int i, err; ULI526X_DBUG(0, "uli526x_init_one()", 0); @@ -379,7 +380,7 @@ static int uli526x_init_one(struct pci_dev *pdev, uw32(DCR13, 0x1b0); //Select ID Table access port //Read MAC address from CR14 for (i = 0; i < 6; i++) - dev->dev_addr[i] = ur32(DCR14); + addr[i] = ur32(DCR14); //Read end uw32(DCR13, 0); //Clear CR13 uw32(DCR0, 0); //Clear CR0 @@ -388,8 +389,10 @@ static int uli526x_init_one(struct pci_dev *pdev, else /*Exist SROM*/ { for (i = 0; i < 6; i++) - dev->dev_addr[i] = db->srom[20 + i]; + addr[i] = db->srom[20 + i]; } + eth_hw_addr_set(dev, addr); + err = register_netdev (dev); if (err) goto err_out_unmap; @@ -1343,7 +1346,7 @@ static void send_filter_frame(struct net_device *dev, int mc_cnt) void __iomem *ioaddr = db->ioaddr; struct netdev_hw_addr *ha; struct tx_desc *txptr; - u16 * addrptr; + const u16 * addrptr; u32 * suptr; int i; @@ -1353,7 +1356,7 @@ static void send_filter_frame(struct net_device *dev, int mc_cnt) suptr = (u32 *) txptr->tx_buf_ptr; /* Node address */ - addrptr = (u16 *) dev->dev_addr; + addrptr = (const u16 *) dev->dev_addr; *suptr++ = addrptr[0] << FLT_SHIFT; *suptr++ = addrptr[1] << FLT_SHIFT; *suptr++ = addrptr[2] << FLT_SHIFT; |