Commit 5b6d5aff authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

lasi_82594: use eth_hw_addr_set()

dev_addr is set from IO reads, passed to an arch-specific helper.
Note that the helper never reads it so uninitialized temp is fine.

Fixes build on parisc.
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 80db345e
...@@ -147,6 +147,7 @@ lan_init_chip(struct parisc_device *dev) ...@@ -147,6 +147,7 @@ lan_init_chip(struct parisc_device *dev)
struct net_device *netdevice; struct net_device *netdevice;
struct i596_private *lp; struct i596_private *lp;
int retval = -ENOMEM; int retval = -ENOMEM;
u8 addr[ETH_ALEN];
int i; int i;
if (!dev->irq) { if (!dev->irq) {
...@@ -167,13 +168,14 @@ lan_init_chip(struct parisc_device *dev) ...@@ -167,13 +168,14 @@ lan_init_chip(struct parisc_device *dev)
netdevice->base_addr = dev->hpa.start; netdevice->base_addr = dev->hpa.start;
netdevice->irq = dev->irq; netdevice->irq = dev->irq;
if (pdc_lan_station_id(netdevice->dev_addr, netdevice->base_addr)) { if (pdc_lan_station_id(addr, netdevice->base_addr)) {
for (i = 0; i < 6; i++) { for (i = 0; i < 6; i++) {
netdevice->dev_addr[i] = gsc_readb(LAN_PROM_ADDR + i); addr[i] = gsc_readb(LAN_PROM_ADDR + i);
} }
printk(KERN_INFO printk(KERN_INFO
"%s: MAC of HP700 LAN read from EEPROM\n", __FILE__); "%s: MAC of HP700 LAN read from EEPROM\n", __FILE__);
} }
eth_hw_addr_set(netdevice, addr);
lp = netdev_priv(netdevice); lp = netdev_priv(netdevice);
lp->options = dev->id.sversion == 0x72 ? OPT_SWAP_PORT : 0; lp->options = dev->id.sversion == 0x72 ? OPT_SWAP_PORT : 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment