[NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()
This is nicer than the MAC_FMT stuff. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
95ea36275f
commit
0795af5729
@@ -265,6 +265,7 @@ static int __init at1700_probe1(struct net_device *dev, int ioaddr)
|
||||
unsigned int i, irq, is_fmv18x = 0, is_at1700 = 0;
|
||||
int slot, ret = -ENODEV;
|
||||
struct net_local *lp = netdev_priv(dev);
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
if (!request_region(ioaddr, AT1700_IO_EXTENT, DRV_NAME))
|
||||
return -EBUSY;
|
||||
@@ -388,16 +389,15 @@ found:
|
||||
if (is_at1700) {
|
||||
for(i = 0; i < 3; i++) {
|
||||
unsigned short eeprom_val = read_eeprom(ioaddr, 4+i);
|
||||
printk("%04x", eeprom_val);
|
||||
((unsigned short *)dev->dev_addr)[i] = ntohs(eeprom_val);
|
||||
}
|
||||
} else {
|
||||
for(i = 0; i < 6; i++) {
|
||||
unsigned char val = inb(ioaddr + SAPROM + i);
|
||||
printk("%02x", val);
|
||||
dev->dev_addr[i] = val;
|
||||
}
|
||||
}
|
||||
printk("%s", print_mac(mac, dev->dev_addr));
|
||||
|
||||
/* The EEPROM word 12 bit 0x0400 means use regular 100 ohm 10baseT signals,
|
||||
rather than 150 ohm shielded twisted pair compensation.
|
||||
|
Reference in New Issue
Block a user