aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tokenring/olympic.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-10-27 18:59:26 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-27 20:06:18 -0400
commite174961ca1a0b28f7abf0be47973ad57cb74e5f0 (patch)
treee8f74ecd420a0e380a71670e5aec5c2a0c15640a /drivers/net/tokenring/olympic.c
parent0c68ae2605dbcf67414d8d1f19af93be44b355fb (diff)
net: convert print_mac to %pM
This converts pretty much everything to print_mac. There were a few things that had conflicts which I have just dropped for now, no harm done. I've built an allyesconfig with this and looked at the files that weren't built very carefully, but it's a huge patch. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tokenring/olympic.c')
-rw-r--r--drivers/net/tokenring/olympic.c50
1 files changed, 17 insertions, 33 deletions
diff --git a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c
index 0ab51a0f35fc..f78bc5d40708 100644
--- a/drivers/net/tokenring/olympic.c
+++ b/drivers/net/tokenring/olympic.c
@@ -421,10 +421,7 @@ static int olympic_init(struct net_device *dev)
421 memcpy_fromio(&dev->dev_addr[0], adapter_addr,6); 421 memcpy_fromio(&dev->dev_addr[0], adapter_addr,6);
422 422
423#if OLYMPIC_DEBUG 423#if OLYMPIC_DEBUG
424 { 424 printk("adapter address: %pM\n", dev->dev_addr);
425 DECLARE_MAC_BUF(mac);
426 printk("adapter address: %s\n", print_mac(mac, dev->dev_addr));
427 }
428#endif 425#endif
429 426
430 olympic_priv->olympic_addr_table_addr = swab16(readw(init_srb + 12)); 427 olympic_priv->olympic_addr_table_addr = swab16(readw(init_srb + 12));
@@ -441,7 +438,6 @@ static int olympic_open(struct net_device *dev)
441 unsigned long flags, t; 438 unsigned long flags, t;
442 int i, open_finished = 1 ; 439 int i, open_finished = 1 ;
443 u8 resp, err; 440 u8 resp, err;
444 DECLARE_MAC_BUF(mac);
445 441
446 DECLARE_WAITQUEUE(wait,current) ; 442 DECLARE_WAITQUEUE(wait,current) ;
447 443
@@ -569,8 +565,8 @@ static int olympic_open(struct net_device *dev)
569 goto out; 565 goto out;
570 566
571 case 0x32: 567 case 0x32:
572 printk(KERN_WARNING "%s: Invalid LAA: %s\n", 568 printk(KERN_WARNING "%s: Invalid LAA: %pM\n",
573 dev->name, print_mac(mac, olympic_priv->olympic_laa)); 569 dev->name, olympic_priv->olympic_laa);
574 goto out; 570 goto out;
575 571
576 default: 572 default:
@@ -704,13 +700,12 @@ static int olympic_open(struct net_device *dev)
704 u8 __iomem *opt; 700 u8 __iomem *opt;
705 int i; 701 int i;
706 u8 addr[6]; 702 u8 addr[6];
707 DECLARE_MAC_BUF(mac);
708 oat = (olympic_priv->olympic_lap + olympic_priv->olympic_addr_table_addr); 703 oat = (olympic_priv->olympic_lap + olympic_priv->olympic_addr_table_addr);
709 opt = (olympic_priv->olympic_lap + olympic_priv->olympic_parms_addr); 704 opt = (olympic_priv->olympic_lap + olympic_priv->olympic_parms_addr);
710 705
711 for (i = 0; i < 6; i++) 706 for (i = 0; i < 6; i++)
712 addr[i] = readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+i); 707 addr[i] = readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+i);
713 printk("%s: Node Address: %s\n",dev->name, print_mac(mac, addr)); 708 printk("%s: Node Address: %pM\n", dev->name, addr);
714 printk("%s: Functional Address: %02x:%02x:%02x:%02x\n",dev->name, 709 printk("%s: Functional Address: %02x:%02x:%02x:%02x\n",dev->name,
715 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)), 710 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)),
716 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+1), 711 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+1),
@@ -719,7 +714,7 @@ static int olympic_open(struct net_device *dev)
719 714
720 for (i = 0; i < 6; i++) 715 for (i = 0; i < 6; i++)
721 addr[i] = readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+i); 716 addr[i] = readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+i);
722 printk("%s: NAUN Address: %s\n",dev->name, print_mac(mac, addr)); 717 printk("%s: NAUN Address: %pM\n", dev->name, addr);
723 } 718 }
724 719
725 netif_start_queue(dev); 720 netif_start_queue(dev);
@@ -1440,16 +1435,10 @@ static void olympic_arb_cmd(struct net_device *dev)
1440 struct trh_hdr *mac_hdr; 1435 struct trh_hdr *mac_hdr;
1441 printk(KERN_WARNING "%s: Received MAC Frame, details: \n",dev->name); 1436 printk(KERN_WARNING "%s: Received MAC Frame, details: \n",dev->name);
1442 mac_hdr = tr_hdr(mac_frame); 1437 mac_hdr = tr_hdr(mac_frame);
1443 printk(KERN_WARNING "%s: MAC Frame Dest. Addr: " 1438 printk(KERN_WARNING "%s: MAC Frame Dest. Addr: %pM\n",
1444 MAC_FMT " \n", dev->name, 1439 dev->name, mac_hdr->daddr);
1445 mac_hdr->daddr[0], mac_hdr->daddr[1], 1440 printk(KERN_WARNING "%s: MAC Frame Srce. Addr: %pM\n",
1446 mac_hdr->daddr[2], mac_hdr->daddr[3], 1441 dev->name, mac_hdr->saddr);
1447 mac_hdr->daddr[4], mac_hdr->daddr[5]);
1448 printk(KERN_WARNING "%s: MAC Frame Srce. Addr: "
1449 MAC_FMT " \n", dev->name,
1450 mac_hdr->saddr[0], mac_hdr->saddr[1],
1451 mac_hdr->saddr[2], mac_hdr->saddr[3],
1452 mac_hdr->saddr[4], mac_hdr->saddr[5]);
1453 } 1442 }
1454 netif_rx(mac_frame); 1443 netif_rx(mac_frame);
1455 dev->last_rx = jiffies; 1444 dev->last_rx = jiffies;
@@ -1647,8 +1636,6 @@ static int olympic_proc_info(char *buffer, char **start, off_t offset, int lengt
1647 u8 addr[6]; 1636 u8 addr[6];
1648 u8 addr2[6]; 1637 u8 addr2[6];
1649 int i; 1638 int i;
1650 DECLARE_MAC_BUF(mac);
1651 DECLARE_MAC_BUF(mac2);
1652 1639
1653 size = sprintf(buffer, 1640 size = sprintf(buffer,
1654 "IBM Pit/Pit-Phy/Olympic Chipset Token Ring Adapter %s\n",dev->name); 1641 "IBM Pit/Pit-Phy/Olympic Chipset Token Ring Adapter %s\n",dev->name);
@@ -1658,10 +1645,9 @@ static int olympic_proc_info(char *buffer, char **start, off_t offset, int lengt
1658 for (i = 0 ; i < 6 ; i++) 1645 for (i = 0 ; i < 6 ; i++)
1659 addr[i] = readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr) + i); 1646 addr[i] = readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr) + i);
1660 1647
1661 size += sprintf(buffer+size, "%6s: %s : %s : %02x:%02x:%02x:%02x\n", 1648 size += sprintf(buffer+size, "%6s: %pM : %pM : %02x:%02x:%02x:%02x\n",
1662 dev->name, 1649 dev->name,
1663 print_mac(mac, dev->dev_addr), 1650 dev->dev_addr, addr,
1664 print_mac(mac2, addr),
1665 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)), 1651 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)),
1666 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+1), 1652 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+1),
1667 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+2), 1653 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+2),
@@ -1677,14 +1663,13 @@ static int olympic_proc_info(char *buffer, char **start, off_t offset, int lengt
1677 for (i = 0 ; i < 6 ; i++) 1663 for (i = 0 ; i < 6 ; i++)
1678 addr2[i] = readb(opt+offsetof(struct olympic_parameters_table, poll_addr) + i); 1664 addr2[i] = readb(opt+offsetof(struct olympic_parameters_table, poll_addr) + i);
1679 1665
1680 size += sprintf(buffer+size, "%6s: %02x:%02x:%02x:%02x : %s : %s : %04x : %04x : %04x :\n", 1666 size += sprintf(buffer+size, "%6s: %02x:%02x:%02x:%02x : %pM : %pM : %04x : %04x : %04x :\n",
1681 dev->name, 1667 dev->name,
1682 readb(opt+offsetof(struct olympic_parameters_table, phys_addr)), 1668 readb(opt+offsetof(struct olympic_parameters_table, phys_addr)),
1683 readb(opt+offsetof(struct olympic_parameters_table, phys_addr)+1), 1669 readb(opt+offsetof(struct olympic_parameters_table, phys_addr)+1),
1684 readb(opt+offsetof(struct olympic_parameters_table, phys_addr)+2), 1670 readb(opt+offsetof(struct olympic_parameters_table, phys_addr)+2),
1685 readb(opt+offsetof(struct olympic_parameters_table, phys_addr)+3), 1671 readb(opt+offsetof(struct olympic_parameters_table, phys_addr)+3),
1686 print_mac(mac, addr), 1672 addr, addr2,
1687 print_mac(mac2, addr2),
1688 swab16(readw(opt+offsetof(struct olympic_parameters_table, acc_priority))), 1673 swab16(readw(opt+offsetof(struct olympic_parameters_table, acc_priority))),
1689 swab16(readw(opt+offsetof(struct olympic_parameters_table, auth_source_class))), 1674 swab16(readw(opt+offsetof(struct olympic_parameters_table, auth_source_class))),
1690 swab16(readw(opt+offsetof(struct olympic_parameters_table, att_code)))); 1675 swab16(readw(opt+offsetof(struct olympic_parameters_table, att_code))));
@@ -1694,9 +1679,8 @@ static int olympic_proc_info(char *buffer, char **start, off_t offset, int lengt
1694 1679
1695 for (i = 0 ; i < 6 ; i++) 1680 for (i = 0 ; i < 6 ; i++)
1696 addr[i] = readb(opt+offsetof(struct olympic_parameters_table, source_addr) + i); 1681 addr[i] = readb(opt+offsetof(struct olympic_parameters_table, source_addr) + i);
1697 size += sprintf(buffer+size, "%6s: %s : %04x : %04x : %04x : %04x : %04x : %04x : \n", 1682 size += sprintf(buffer+size, "%6s: %pM : %04x : %04x : %04x : %04x : %04x : %04x : \n",
1698 dev->name, 1683 dev->name, addr,
1699 print_mac(mac, addr),
1700 swab16(readw(opt+offsetof(struct olympic_parameters_table, beacon_type))), 1684 swab16(readw(opt+offsetof(struct olympic_parameters_table, beacon_type))),
1701 swab16(readw(opt+offsetof(struct olympic_parameters_table, major_vector))), 1685 swab16(readw(opt+offsetof(struct olympic_parameters_table, major_vector))),
1702 swab16(readw(opt+offsetof(struct olympic_parameters_table, lan_status))), 1686 swab16(readw(opt+offsetof(struct olympic_parameters_table, lan_status))),
@@ -1709,11 +1693,11 @@ static int olympic_proc_info(char *buffer, char **start, off_t offset, int lengt
1709 1693
1710 for (i = 0 ; i < 6 ; i++) 1694 for (i = 0 ; i < 6 ; i++)
1711 addr[i] = readb(opt+offsetof(struct olympic_parameters_table, beacon_naun) + i); 1695 addr[i] = readb(opt+offsetof(struct olympic_parameters_table, beacon_naun) + i);
1712 size += sprintf(buffer+size, "%6s: : %02x : %02x : %s : %02x:%02x:%02x:%02x : \n", 1696 size += sprintf(buffer+size, "%6s: : %02x : %02x : %pM : %02x:%02x:%02x:%02x : \n",
1713 dev->name, 1697 dev->name,
1714 swab16(readw(opt+offsetof(struct olympic_parameters_table, beacon_transmit))), 1698 swab16(readw(opt+offsetof(struct olympic_parameters_table, beacon_transmit))),
1715 swab16(readw(opt+offsetof(struct olympic_parameters_table, beacon_receive))), 1699 swab16(readw(opt+offsetof(struct olympic_parameters_table, beacon_receive))),
1716 print_mac(mac, addr), 1700 addr,
1717 readb(opt+offsetof(struct olympic_parameters_table, beacon_phys)), 1701 readb(opt+offsetof(struct olympic_parameters_table, beacon_phys)),
1718 readb(opt+offsetof(struct olympic_parameters_table, beacon_phys)+1), 1702 readb(opt+offsetof(struct olympic_parameters_table, beacon_phys)+1),
1719 readb(opt+offsetof(struct olympic_parameters_table, beacon_phys)+2), 1703 readb(opt+offsetof(struct olympic_parameters_table, beacon_phys)+2),