aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/forcedeth.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2007-10-03 20:59:30 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:51:42 -0400
commit0795af5729b18218767fab27c44b1384f72dc9ad (patch)
tree67c16df84aa6ec219340b8ea1b5cfb0e8150a216 /drivers/net/forcedeth.c
parent95ea36275f3c9a1d3d04c217b4b576c657c4e70e (diff)
[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>
Diffstat (limited to 'drivers/net/forcedeth.c')
-rw-r--r--drivers/net/forcedeth.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index be744573b1c2..f7354bc9b009 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -4991,6 +4991,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
4991 u32 powerstate, txreg; 4991 u32 powerstate, txreg;
4992 u32 phystate_orig = 0, phystate; 4992 u32 phystate_orig = 0, phystate;
4993 int phyinitialized = 0; 4993 int phyinitialized = 0;
4994 DECLARE_MAC_BUF(mac);
4994 4995
4995 dev = alloc_etherdev(sizeof(struct fe_priv)); 4996 dev = alloc_etherdev(sizeof(struct fe_priv));
4996 err = -ENOMEM; 4997 err = -ENOMEM;
@@ -5205,10 +5206,8 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
5205 * Bad mac address. At least one bios sets the mac address 5206 * Bad mac address. At least one bios sets the mac address
5206 * to 01:23:45:67:89:ab 5207 * to 01:23:45:67:89:ab
5207 */ 5208 */
5208 printk(KERN_ERR "%s: Invalid Mac address detected: %02x:%02x:%02x:%02x:%02x:%02x\n", 5209 printk(KERN_ERR "%s: Invalid Mac address detected: %s\n",
5209 pci_name(pci_dev), 5210 pci_name(pci_dev), print_mac(mac, dev->dev_addr));
5210 dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
5211 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
5212 printk(KERN_ERR "Please complain to your hardware vendor. Switching to a random MAC.\n"); 5211 printk(KERN_ERR "Please complain to your hardware vendor. Switching to a random MAC.\n");
5213 dev->dev_addr[0] = 0x00; 5212 dev->dev_addr[0] = 0x00;
5214 dev->dev_addr[1] = 0x00; 5213 dev->dev_addr[1] = 0x00;
@@ -5216,9 +5215,8 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
5216 get_random_bytes(&dev->dev_addr[3], 3); 5215 get_random_bytes(&dev->dev_addr[3], 3);
5217 } 5216 }
5218 5217
5219 dprintk(KERN_DEBUG "%s: MAC Address %02x:%02x:%02x:%02x:%02x:%02x\n", pci_name(pci_dev), 5218 dprintk(KERN_DEBUG "%s: MAC Address %s\n",
5220 dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], 5219 pci_name(pci_dev), print_mac(mac, dev->dev_addr));
5221 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
5222 5220
5223 /* set mac address */ 5221 /* set mac address */
5224 nv_copy_mac_to_hw(dev); 5222 nv_copy_mac_to_hw(dev);