diff options
author | Joe Perches <joe@perches.com> | 2007-10-03 20:59:30 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:51:42 -0400 |
commit | 0795af5729b18218767fab27c44b1384f72dc9ad (patch) | |
tree | 67c16df84aa6ec219340b8ea1b5cfb0e8150a216 /drivers/net/tokenring | |
parent | 95ea36275f3c9a1d3d04c217b4b576c657c4e70e (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/tokenring')
-rw-r--r-- | drivers/net/tokenring/abyss.c | 12 | ||||
-rw-r--r-- | drivers/net/tokenring/ibmtr.c | 26 | ||||
-rw-r--r-- | drivers/net/tokenring/lanstreamer.c | 64 | ||||
-rw-r--r-- | drivers/net/tokenring/madgemc.c | 19 | ||||
-rw-r--r-- | drivers/net/tokenring/olympic.c | 138 | ||||
-rw-r--r-- | drivers/net/tokenring/proteon.c | 8 | ||||
-rw-r--r-- | drivers/net/tokenring/skisa.c | 8 | ||||
-rw-r--r-- | drivers/net/tokenring/tmspci.c | 10 |
8 files changed, 123 insertions, 162 deletions
diff --git a/drivers/net/tokenring/abyss.c b/drivers/net/tokenring/abyss.c index 22fad5112406..124cfd4fbcf4 100644 --- a/drivers/net/tokenring/abyss.c +++ b/drivers/net/tokenring/abyss.c | |||
@@ -97,8 +97,9 @@ static int __devinit abyss_attach(struct pci_dev *pdev, const struct pci_device_ | |||
97 | static int versionprinted; | 97 | static int versionprinted; |
98 | struct net_device *dev; | 98 | struct net_device *dev; |
99 | struct net_local *tp; | 99 | struct net_local *tp; |
100 | int i, ret, pci_irq_line; | 100 | int ret, pci_irq_line; |
101 | unsigned long pci_ioaddr; | 101 | unsigned long pci_ioaddr; |
102 | DECLARE_MAC_BUF(mac); | ||
102 | 103 | ||
103 | if (versionprinted++ == 0) | 104 | if (versionprinted++ == 0) |
104 | printk("%s", version); | 105 | printk("%s", version); |
@@ -145,12 +146,9 @@ static int __devinit abyss_attach(struct pci_dev *pdev, const struct pci_device_ | |||
145 | } | 146 | } |
146 | 147 | ||
147 | abyss_read_eeprom(dev); | 148 | abyss_read_eeprom(dev); |
148 | 149 | ||
149 | printk("%s: Ring Station Address: ", dev->name); | 150 | printk("%s: Ring Station Address: %s\n", |
150 | printk("%2.2x", dev->dev_addr[0]); | 151 | dev->name, print_mac(mac, dev->dev_addr)); |
151 | for (i = 1; i < 6; i++) | ||
152 | printk(":%2.2x", dev->dev_addr[i]); | ||
153 | printk("\n"); | ||
154 | 152 | ||
155 | tp = netdev_priv(dev); | 153 | tp = netdev_priv(dev); |
156 | tp->setnselout = abyss_setnselout_pins; | 154 | tp->setnselout = abyss_setnselout_pins; |
diff --git a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c index 65e21eb7e685..e494c63bfbd9 100644 --- a/drivers/net/tokenring/ibmtr.c +++ b/drivers/net/tokenring/ibmtr.c | |||
@@ -389,6 +389,7 @@ static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr) | |||
389 | unsigned long timeout; | 389 | unsigned long timeout; |
390 | static int version_printed; | 390 | static int version_printed; |
391 | #endif | 391 | #endif |
392 | DECLARE_MAC_BUF(mac); | ||
392 | 393 | ||
393 | /* Query the adapter PIO base port which will return | 394 | /* Query the adapter PIO base port which will return |
394 | * indication of where MMIO was placed. We also have a | 395 | * indication of where MMIO was placed. We also have a |
@@ -702,9 +703,8 @@ static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr) | |||
702 | channel_def[cardpresent - 1], adapter_def(ti->adapter_type)); | 703 | channel_def[cardpresent - 1], adapter_def(ti->adapter_type)); |
703 | DPRINTK("using irq %d, PIOaddr %hx, %dK shared RAM.\n", | 704 | DPRINTK("using irq %d, PIOaddr %hx, %dK shared RAM.\n", |
704 | irq, PIOaddr, ti->mapped_ram_size / 2); | 705 | irq, PIOaddr, ti->mapped_ram_size / 2); |
705 | DPRINTK("Hardware address : %02X:%02X:%02X:%02X:%02X:%02X\n", | 706 | DPRINTK("Hardware address : %s\n", |
706 | dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], | 707 | print_mac(mac, dev->dev_addr)); |
707 | dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]); | ||
708 | if (ti->page_mask) | 708 | if (ti->page_mask) |
709 | DPRINTK("Shared RAM paging enabled. " | 709 | DPRINTK("Shared RAM paging enabled. " |
710 | "Page size: %uK Shared Ram size %dK\n", | 710 | "Page size: %uK Shared Ram size %dK\n", |
@@ -1739,18 +1739,20 @@ static void tr_rx(struct net_device *dev) | |||
1739 | if (!IPv4_p) { | 1739 | if (!IPv4_p) { |
1740 | 1740 | ||
1741 | void __iomem *trhhdr = rbuf + offsetof(struct rec_buf, data); | 1741 | void __iomem *trhhdr = rbuf + offsetof(struct rec_buf, data); |
1742 | 1742 | u8 saddr[6]; | |
1743 | u8 daddr[6]; | ||
1744 | DECLARE_MAC_BUF(mac); | ||
1745 | DECLARE_MAC_BUF(mac2); | ||
1746 | int i; | ||
1747 | for (i = 0 ; i < 6 ; i++) | ||
1748 | saddr[i] = readb(trhhdr + SADDR_OFST + i); | ||
1749 | for (i = 0 ; i < 6 ; i++) | ||
1750 | daddr[i] = readb(trhhdr + DADDR_OFST + i); | ||
1743 | DPRINTK("Probably non-IP frame received.\n"); | 1751 | DPRINTK("Probably non-IP frame received.\n"); |
1744 | DPRINTK("ssap: %02X dsap: %02X " | 1752 | DPRINTK("ssap: %02X dsap: %02X " |
1745 | "saddr: %02X:%02X:%02X:%02X:%02X:%02X " | 1753 | "saddr: %s daddr: %$s\n", |
1746 | "daddr: %02X:%02X:%02X:%02X:%02X:%02X\n", | ||
1747 | readb(llc + SSAP_OFST), readb(llc + DSAP_OFST), | 1754 | readb(llc + SSAP_OFST), readb(llc + DSAP_OFST), |
1748 | readb(trhhdr+SADDR_OFST), readb(trhhdr+ SADDR_OFST+1), | 1755 | print_mac(mac, saddr), print_mac(mac2, daddr)); |
1749 | readb(trhhdr+SADDR_OFST+2), readb(trhhdr+SADDR_OFST+3), | ||
1750 | readb(trhhdr+SADDR_OFST+4), readb(trhhdr+SADDR_OFST+5), | ||
1751 | readb(trhhdr+DADDR_OFST), readb(trhhdr+DADDR_OFST + 1), | ||
1752 | readb(trhhdr+DADDR_OFST+2), readb(trhhdr+DADDR_OFST+3), | ||
1753 | readb(trhhdr+DADDR_OFST+4), readb(trhhdr+DADDR_OFST+5)); | ||
1754 | } | 1756 | } |
1755 | #endif | 1757 | #endif |
1756 | 1758 | ||
diff --git a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c index f114fb729f54..47d84cd28097 100644 --- a/drivers/net/tokenring/lanstreamer.c +++ b/drivers/net/tokenring/lanstreamer.c | |||
@@ -447,6 +447,9 @@ static int streamer_reset(struct net_device *dev) | |||
447 | unsigned int uaa_addr; | 447 | unsigned int uaa_addr; |
448 | struct sk_buff *skb = NULL; | 448 | struct sk_buff *skb = NULL; |
449 | __u16 misr; | 449 | __u16 misr; |
450 | #if STREAMER_DEBUG | ||
451 | DECLARE_MAC_BUF(mac); | ||
452 | #endif | ||
450 | 453 | ||
451 | streamer_priv = netdev_priv(dev); | 454 | streamer_priv = netdev_priv(dev); |
452 | streamer_mmio = streamer_priv->streamer_mmio; | 455 | streamer_mmio = streamer_priv->streamer_mmio; |
@@ -575,11 +578,8 @@ static int streamer_reset(struct net_device *dev) | |||
575 | dev->dev_addr[i+1]= addr & 0xff; | 578 | dev->dev_addr[i+1]= addr & 0xff; |
576 | } | 579 | } |
577 | #if STREAMER_DEBUG | 580 | #if STREAMER_DEBUG |
578 | printk("Adapter address: "); | 581 | printk("Adapter address: %s\n", |
579 | for (i = 0; i < 6; i++) { | 582 | print_mac(mac, dev->dev_addr)); |
580 | printk("%02x:", dev->dev_addr[i]); | ||
581 | } | ||
582 | printk("\n"); | ||
583 | #endif | 583 | #endif |
584 | } | 584 | } |
585 | return 0; | 585 | return 0; |
@@ -1539,6 +1539,7 @@ static void streamer_arb_cmd(struct net_device *dev) | |||
1539 | 1539 | ||
1540 | #if STREAMER_NETWORK_MONITOR | 1540 | #if STREAMER_NETWORK_MONITOR |
1541 | struct trh_hdr *mac_hdr; | 1541 | struct trh_hdr *mac_hdr; |
1542 | DECLARE_MAC_BUF(mac); | ||
1542 | #endif | 1543 | #endif |
1543 | 1544 | ||
1544 | writew(streamer_priv->arb, streamer_mmio + LAPA); | 1545 | writew(streamer_priv->arb, streamer_mmio + LAPA); |
@@ -1611,15 +1612,11 @@ static void streamer_arb_cmd(struct net_device *dev) | |||
1611 | dev->name); | 1612 | dev->name); |
1612 | mac_hdr = tr_hdr(mac_frame); | 1613 | mac_hdr = tr_hdr(mac_frame); |
1613 | printk(KERN_WARNING | 1614 | printk(KERN_WARNING |
1614 | "%s: MAC Frame Dest. Addr: %02x:%02x:%02x:%02x:%02x:%02x \n", | 1615 | "%s: MAC Frame Dest. Addr: %s\n", |
1615 | dev->name, mac_hdr->daddr[0], mac_hdr->daddr[1], | 1616 | dev->name, print_mac(mac, mac_hdr->daddr)); |
1616 | mac_hdr->daddr[2], mac_hdr->daddr[3], | ||
1617 | mac_hdr->daddr[4], mac_hdr->daddr[5]); | ||
1618 | printk(KERN_WARNING | 1617 | printk(KERN_WARNING |
1619 | "%s: MAC Frame Srce. Addr: %02x:%02x:%02x:%02x:%02x:%02x \n", | 1618 | "%s: MAC Frame Srce. Addr: %s\n", |
1620 | dev->name, mac_hdr->saddr[0], mac_hdr->saddr[1], | 1619 | dev->name, DEV->ADDR6(mac_hdr->saddr)); |
1621 | mac_hdr->saddr[2], mac_hdr->saddr[3], | ||
1622 | mac_hdr->saddr[4], mac_hdr->saddr[5]); | ||
1623 | #endif | 1620 | #endif |
1624 | netif_rx(mac_frame); | 1621 | netif_rx(mac_frame); |
1625 | 1622 | ||
@@ -1854,6 +1851,8 @@ static int sprintf_info(char *buffer, struct net_device *dev) | |||
1854 | struct streamer_parameters_table spt; | 1851 | struct streamer_parameters_table spt; |
1855 | int size = 0; | 1852 | int size = 0; |
1856 | int i; | 1853 | int i; |
1854 | DECLARE_MAC_BUF(mac); | ||
1855 | DECLARE_MAC_BUF(mac2); | ||
1857 | 1856 | ||
1858 | writew(streamer_priv->streamer_addr_table_addr, streamer_mmio + LAPA); | 1857 | writew(streamer_priv->streamer_addr_table_addr, streamer_mmio + LAPA); |
1859 | for (i = 0; i < 14; i += 2) { | 1858 | for (i = 0; i < 14; i += 2) { |
@@ -1875,37 +1874,30 @@ static int sprintf_info(char *buffer, struct net_device *dev) | |||
1875 | size = sprintf(buffer, "\n%6s: Adapter Address : Node Address : Functional Addr\n", dev->name); | 1874 | size = sprintf(buffer, "\n%6s: Adapter Address : Node Address : Functional Addr\n", dev->name); |
1876 | 1875 | ||
1877 | size += sprintf(buffer + size, | 1876 | size += sprintf(buffer + size, |
1878 | "%6s: %02x:%02x:%02x:%02x:%02x:%02x : %02x:%02x:%02x:%02x:%02x:%02x : %02x:%02x:%02x:%02x\n", | 1877 | "%6s: %s : %s : %02x:%02x:%02x:%02x\n", |
1879 | dev->name, dev->dev_addr[0], dev->dev_addr[1], | 1878 | dev->name, print_mac(mac, dev->dev_addr), |
1880 | dev->dev_addr[2], dev->dev_addr[3], dev->dev_addr[4], | 1879 | print_mac(mac2, sat.node_addr), |
1881 | dev->dev_addr[5], sat.node_addr[0], sat.node_addr[1], | 1880 | sat.func_addr[0], sat.func_addr[1], |
1882 | sat.node_addr[2], sat.node_addr[3], sat.node_addr[4], | 1881 | sat.func_addr[2], sat.func_addr[3]); |
1883 | sat.node_addr[5], sat.func_addr[0], sat.func_addr[1], | ||
1884 | sat.func_addr[2], sat.func_addr[3]); | ||
1885 | 1882 | ||
1886 | size += sprintf(buffer + size, "\n%6s: Token Ring Parameters Table:\n", dev->name); | 1883 | size += sprintf(buffer + size, "\n%6s: Token Ring Parameters Table:\n", dev->name); |
1887 | 1884 | ||
1888 | size += sprintf(buffer + size, "%6s: Physical Addr : Up Node Address : Poll Address : AccPri : Auth Src : Att Code :\n", dev->name); | 1885 | size += sprintf(buffer + size, "%6s: Physical Addr : Up Node Address : Poll Address : AccPri : Auth Src : Att Code :\n", dev->name); |
1889 | 1886 | ||
1890 | size += sprintf(buffer + size, | 1887 | size += sprintf(buffer + size, |
1891 | "%6s: %02x:%02x:%02x:%02x : %02x:%02x:%02x:%02x:%02x:%02x : %02x:%02x:%02x:%02x:%02x:%02x : %04x : %04x : %04x :\n", | 1888 | "%6s: %02x:%02x:%02x:%02x : %s : %s : %04x : %04x : %04x :\n", |
1892 | dev->name, spt.phys_addr[0], spt.phys_addr[1], | 1889 | dev->name, spt.phys_addr[0], spt.phys_addr[1], |
1893 | spt.phys_addr[2], spt.phys_addr[3], | 1890 | spt.phys_addr[2], spt.phys_addr[3], |
1894 | spt.up_node_addr[0], spt.up_node_addr[1], | 1891 | print_mac(mac, spt.up_node_addr), |
1895 | spt.up_node_addr[2], spt.up_node_addr[3], | 1892 | print_mac(mac2, spt.poll_addr), |
1896 | spt.up_node_addr[4], spt.up_node_addr[4], | ||
1897 | spt.poll_addr[0], spt.poll_addr[1], spt.poll_addr[2], | ||
1898 | spt.poll_addr[3], spt.poll_addr[4], spt.poll_addr[5], | ||
1899 | ntohs(spt.acc_priority), ntohs(spt.auth_source_class), | 1893 | ntohs(spt.acc_priority), ntohs(spt.auth_source_class), |
1900 | ntohs(spt.att_code)); | 1894 | ntohs(spt.att_code)); |
1901 | 1895 | ||
1902 | size += sprintf(buffer + size, "%6s: Source Address : Bcn T : Maj. V : Lan St : Lcl Rg : Mon Err : Frame Correl : \n", dev->name); | 1896 | size += sprintf(buffer + size, "%6s: Source Address : Bcn T : Maj. V : Lan St : Lcl Rg : Mon Err : Frame Correl : \n", dev->name); |
1903 | 1897 | ||
1904 | size += sprintf(buffer + size, | 1898 | size += sprintf(buffer + size, |
1905 | "%6s: %02x:%02x:%02x:%02x:%02x:%02x : %04x : %04x : %04x : %04x : %04x : %04x : \n", | 1899 | "%6s: %s : %04x : %04x : %04x : %04x : %04x : %04x : \n", |
1906 | dev->name, spt.source_addr[0], spt.source_addr[1], | 1900 | dev->name, print_mac(mac, spt.source_addr), |
1907 | spt.source_addr[2], spt.source_addr[3], | ||
1908 | spt.source_addr[4], spt.source_addr[5], | ||
1909 | ntohs(spt.beacon_type), ntohs(spt.major_vector), | 1901 | ntohs(spt.beacon_type), ntohs(spt.major_vector), |
1910 | ntohs(spt.lan_status), ntohs(spt.local_ring), | 1902 | ntohs(spt.lan_status), ntohs(spt.local_ring), |
1911 | ntohs(spt.mon_error), ntohs(spt.frame_correl)); | 1903 | ntohs(spt.mon_error), ntohs(spt.frame_correl)); |
@@ -1914,14 +1906,12 @@ static int sprintf_info(char *buffer, struct net_device *dev) | |||
1914 | dev->name); | 1906 | dev->name); |
1915 | 1907 | ||
1916 | size += sprintf(buffer + size, | 1908 | size += sprintf(buffer + size, |
1917 | "%6s: : %02x : %02x : %02x:%02x:%02x:%02x:%02x:%02x : %02x:%02x:%02x:%02x : \n", | 1909 | "%6s: : %02x : %02x : %s : %02x:%02x:%02x:%02x : \n", |
1918 | dev->name, ntohs(spt.beacon_transmit), | 1910 | dev->name, ntohs(spt.beacon_transmit), |
1919 | ntohs(spt.beacon_receive), spt.beacon_naun[0], | 1911 | ntohs(spt.beacon_receive), |
1920 | spt.beacon_naun[1], spt.beacon_naun[2], | 1912 | print_mac(mac, spt.beacon_naun), |
1921 | spt.beacon_naun[3], spt.beacon_naun[4], | 1913 | spt.beacon_phys[0], spt.beacon_phys[1], |
1922 | spt.beacon_naun[5], spt.beacon_phys[0], | 1914 | spt.beacon_phys[2], spt.beacon_phys[3]); |
1923 | spt.beacon_phys[1], spt.beacon_phys[2], | ||
1924 | spt.beacon_phys[3]); | ||
1925 | return size; | 1915 | return size; |
1926 | } | 1916 | } |
1927 | #endif | 1917 | #endif |
diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c index d0ce2ce675d5..5a4151362fc0 100644 --- a/drivers/net/tokenring/madgemc.c +++ b/drivers/net/tokenring/madgemc.c | |||
@@ -151,7 +151,8 @@ static int __devinit madgemc_probe(struct device *device) | |||
151 | struct net_local *tp; | 151 | struct net_local *tp; |
152 | struct card_info *card; | 152 | struct card_info *card; |
153 | struct mca_device *mdev = to_mca_device(device); | 153 | struct mca_device *mdev = to_mca_device(device); |
154 | int ret = 0, i = 0; | 154 | int ret = 0; |
155 | DECLARE_MAC_BUF(mac); | ||
155 | 156 | ||
156 | if (versionprinted++ == 0) | 157 | if (versionprinted++ == 0) |
157 | printk("%s", version); | 158 | printk("%s", version); |
@@ -322,11 +323,8 @@ static int __devinit madgemc_probe(struct device *device) | |||
322 | mca_device_set_name(mdev, (card->cardtype == 0x08)?MADGEMC16_CARDNAME:MADGEMC32_CARDNAME); | 323 | mca_device_set_name(mdev, (card->cardtype == 0x08)?MADGEMC16_CARDNAME:MADGEMC32_CARDNAME); |
323 | mca_set_adapter_procfn(mdev->slot, madgemc_mcaproc, dev); | 324 | mca_set_adapter_procfn(mdev->slot, madgemc_mcaproc, dev); |
324 | 325 | ||
325 | printk("%s: Ring Station Address: ", dev->name); | 326 | printk("%s: Ring Station Address: %s\n", |
326 | printk("%2.2x", dev->dev_addr[0]); | 327 | dev->name, print_mac(mac, dev->dev_addr)); |
327 | for (i = 1; i < 6; i++) | ||
328 | printk(":%2.2x", dev->dev_addr[i]); | ||
329 | printk("\n"); | ||
330 | 328 | ||
331 | if (tmsdev_init(dev, device)) { | 329 | if (tmsdev_init(dev, device)) { |
332 | printk("%s: unable to get memory for dev->priv.\n", | 330 | printk("%s: unable to get memory for dev->priv.\n", |
@@ -692,11 +690,11 @@ static int madgemc_mcaproc(char *buf, int slot, void *d) | |||
692 | struct net_local *tp = netdev_priv(dev); | 690 | struct net_local *tp = netdev_priv(dev); |
693 | struct card_info *curcard = tp->tmspriv; | 691 | struct card_info *curcard = tp->tmspriv; |
694 | int len = 0; | 692 | int len = 0; |
693 | DECLARE_MAC_BUF(mac); | ||
695 | 694 | ||
696 | len += sprintf(buf+len, "-------\n"); | 695 | len += sprintf(buf+len, "-------\n"); |
697 | if (curcard) { | 696 | if (curcard) { |
698 | struct net_local *tp = netdev_priv(dev); | 697 | struct net_local *tp = netdev_priv(dev); |
699 | int i; | ||
700 | 698 | ||
701 | len += sprintf(buf+len, "Card Revision: %d\n", curcard->cardrev); | 699 | len += sprintf(buf+len, "Card Revision: %d\n", curcard->cardrev); |
702 | len += sprintf(buf+len, "RAM Size: %dkb\n", curcard->ramsize); | 700 | len += sprintf(buf+len, "RAM Size: %dkb\n", curcard->ramsize); |
@@ -716,11 +714,8 @@ static int madgemc_mcaproc(char *buf, int slot, void *d) | |||
716 | } | 714 | } |
717 | len += sprintf(buf+len, " (%s)\n", (curcard->fairness)?"Unfair":"Fair"); | 715 | len += sprintf(buf+len, " (%s)\n", (curcard->fairness)?"Unfair":"Fair"); |
718 | 716 | ||
719 | len += sprintf(buf+len, "Ring Station Address: "); | 717 | len += sprintf(buf+len, "Ring Station Address: %s\n", |
720 | len += sprintf(buf+len, "%2.2x", dev->dev_addr[0]); | 718 | print_mac(mac, dev->dev_addr)); |
721 | for (i = 1; i < 6; i++) | ||
722 | len += sprintf(buf+len, " %2.2x", dev->dev_addr[i]); | ||
723 | len += sprintf(buf+len, "\n"); | ||
724 | } else | 719 | } else |
725 | len += sprintf(buf+len, "Card not configured\n"); | 720 | len += sprintf(buf+len, "Card not configured\n"); |
726 | 721 | ||
diff --git a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c index a149d5e2965c..74c1f0f189f5 100644 --- a/drivers/net/tokenring/olympic.c +++ b/drivers/net/tokenring/olympic.c | |||
@@ -418,14 +418,15 @@ static int __devinit olympic_init(struct net_device *dev) | |||
418 | writel(uaa_addr,olympic_mmio+LAPA); | 418 | writel(uaa_addr,olympic_mmio+LAPA); |
419 | adapter_addr=olympic_priv->olympic_lap + (uaa_addr & (~0xf800)); | 419 | adapter_addr=olympic_priv->olympic_lap + (uaa_addr & (~0xf800)); |
420 | 420 | ||
421 | memcpy_fromio(&dev->dev_addr[0], adapter_addr,6); | ||
422 | |||
421 | #if OLYMPIC_DEBUG | 423 | #if OLYMPIC_DEBUG |
422 | printk("adapter address: %02x:%02x:%02x:%02x:%02x:%02x\n", | 424 | { |
423 | readb(adapter_addr), readb(adapter_addr+1),readb(adapter_addr+2), | 425 | DECLARE_MAC_BUF(mac); |
424 | readb(adapter_addr+3),readb(adapter_addr+4),readb(adapter_addr+5)); | 426 | printk("adapter address: %s\n", print_mac(mac, dev->dev_addr)); |
427 | } | ||
425 | #endif | 428 | #endif |
426 | 429 | ||
427 | memcpy_fromio(&dev->dev_addr[0], adapter_addr,6); | ||
428 | |||
429 | olympic_priv->olympic_addr_table_addr = swab16(readw(init_srb + 12)); | 430 | olympic_priv->olympic_addr_table_addr = swab16(readw(init_srb + 12)); |
430 | olympic_priv->olympic_parms_addr = swab16(readw(init_srb + 14)); | 431 | olympic_priv->olympic_parms_addr = swab16(readw(init_srb + 14)); |
431 | 432 | ||
@@ -440,6 +441,7 @@ static int olympic_open(struct net_device *dev) | |||
440 | unsigned long flags, t; | 441 | unsigned long flags, t; |
441 | int i, open_finished = 1 ; | 442 | int i, open_finished = 1 ; |
442 | u8 resp, err; | 443 | u8 resp, err; |
444 | DECLARE_MAC_BUF(mac); | ||
443 | 445 | ||
444 | DECLARE_WAITQUEUE(wait,current) ; | 446 | DECLARE_WAITQUEUE(wait,current) ; |
445 | 447 | ||
@@ -567,14 +569,8 @@ static int olympic_open(struct net_device *dev) | |||
567 | goto out; | 569 | goto out; |
568 | 570 | ||
569 | case 0x32: | 571 | case 0x32: |
570 | printk(KERN_WARNING "%s: Invalid LAA: %02x:%02x:%02x:%02x:%02x:%02x\n", | 572 | printk(KERN_WARNING "%s: Invalid LAA: %s\n", |
571 | dev->name, | 573 | dev->name, print_mac(mac, olympic_priv->olympic_laa)); |
572 | olympic_priv->olympic_laa[0], | ||
573 | olympic_priv->olympic_laa[1], | ||
574 | olympic_priv->olympic_laa[2], | ||
575 | olympic_priv->olympic_laa[3], | ||
576 | olympic_priv->olympic_laa[4], | ||
577 | olympic_priv->olympic_laa[5]) ; | ||
578 | goto out; | 574 | goto out; |
579 | 575 | ||
580 | default: | 576 | default: |
@@ -704,30 +700,26 @@ static int olympic_open(struct net_device *dev) | |||
704 | #endif | 700 | #endif |
705 | 701 | ||
706 | if (olympic_priv->olympic_network_monitor) { | 702 | if (olympic_priv->olympic_network_monitor) { |
707 | u8 __iomem *oat ; | 703 | u8 __iomem *oat; |
708 | u8 __iomem *opt ; | 704 | u8 __iomem *opt; |
709 | oat = (olympic_priv->olympic_lap + olympic_priv->olympic_addr_table_addr) ; | 705 | int i; |
710 | opt = (olympic_priv->olympic_lap + olympic_priv->olympic_parms_addr) ; | 706 | u8 addr[6]; |
711 | 707 | DECLARE_MAC_BUF(mac); | |
712 | printk("%s: Node Address: %02x:%02x:%02x:%02x:%02x:%02x\n",dev->name, | 708 | oat = (olympic_priv->olympic_lap + olympic_priv->olympic_addr_table_addr); |
713 | readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)), | 709 | opt = (olympic_priv->olympic_lap + olympic_priv->olympic_parms_addr); |
714 | readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+1), | 710 | |
715 | readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+2), | 711 | for (i = 0; i < 6; i++) |
716 | readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+3), | 712 | addr[i] = readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+i); |
717 | readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+4), | 713 | printk("%s: Node Address: %s\n",dev->name, print_mac(mac, addr)); |
718 | readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+5)); | ||
719 | printk("%s: Functional Address: %02x:%02x:%02x:%02x\n",dev->name, | 714 | printk("%s: Functional Address: %02x:%02x:%02x:%02x\n",dev->name, |
720 | readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)), | 715 | readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)), |
721 | readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+1), | 716 | readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+1), |
722 | readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+2), | 717 | readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+2), |
723 | readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+3)); | 718 | readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+3)); |
724 | printk("%s: NAUN Address: %02x:%02x:%02x:%02x:%02x:%02x\n",dev->name, | 719 | |
725 | readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)), | 720 | for (i = 0; i < 6; i++) |
726 | readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+1), | 721 | addr[i] = readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+i); |
727 | readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+2), | 722 | printk("%s: NAUN Address: %s\n",dev->name, print_mac(mac, addr)); |
728 | readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+3), | ||
729 | readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+4), | ||
730 | readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+5)); | ||
731 | } | 723 | } |
732 | 724 | ||
733 | netif_start_queue(dev); | 725 | netif_start_queue(dev); |
@@ -1445,11 +1437,14 @@ static void olympic_arb_cmd(struct net_device *dev) | |||
1445 | mac_frame->protocol = tr_type_trans(mac_frame, dev); | 1437 | mac_frame->protocol = tr_type_trans(mac_frame, dev); |
1446 | 1438 | ||
1447 | if (olympic_priv->olympic_network_monitor) { | 1439 | if (olympic_priv->olympic_network_monitor) { |
1448 | struct trh_hdr *mac_hdr ; | 1440 | struct trh_hdr *mac_hdr; |
1449 | printk(KERN_WARNING "%s: Received MAC Frame, details: \n",dev->name) ; | 1441 | DECLARE_MAC_BUF(mac); |
1442 | printk(KERN_WARNING "%s: Received MAC Frame, details: \n",dev->name); | ||
1450 | mac_hdr = tr_hdr(mac_frame); | 1443 | mac_hdr = tr_hdr(mac_frame); |
1451 | printk(KERN_WARNING "%s: MAC Frame Dest. Addr: %02x:%02x:%02x:%02x:%02x:%02x \n", dev->name , mac_hdr->daddr[0], mac_hdr->daddr[1], mac_hdr->daddr[2], mac_hdr->daddr[3], mac_hdr->daddr[4], mac_hdr->daddr[5]) ; | 1444 | printk(KERN_WARNING "%s: MAC Frame Dest. Addr: %s\n", |
1452 | printk(KERN_WARNING "%s: MAC Frame Srce. Addr: %02x:%02x:%02x:%02x:%02x:%02x \n", dev->name , mac_hdr->saddr[0], mac_hdr->saddr[1], mac_hdr->saddr[2], mac_hdr->saddr[3], mac_hdr->saddr[4], mac_hdr->saddr[5]) ; | 1445 | dev->name, print_mac(mac, mac_hdr->daddr)); |
1446 | printk(KERN_WARNING "%s: MAC Frame Srce. Addr: %s\n", | ||
1447 | dev->name, print_mac(mac, mac_hdr->saddr)); | ||
1453 | } | 1448 | } |
1454 | netif_rx(mac_frame); | 1449 | netif_rx(mac_frame); |
1455 | dev->last_rx = jiffies; | 1450 | dev->last_rx = jiffies; |
@@ -1644,26 +1639,24 @@ static int olympic_proc_info(char *buffer, char **start, off_t offset, int lengt | |||
1644 | int len=0; | 1639 | int len=0; |
1645 | off_t begin=0; | 1640 | off_t begin=0; |
1646 | off_t pos=0; | 1641 | off_t pos=0; |
1647 | 1642 | u8 addr[6]; | |
1643 | u8 addr2[6]; | ||
1644 | int i; | ||
1645 | DECLARE_MAC_BUF(mac); | ||
1646 | DECLARE_MAC_BUF(mac2); | ||
1647 | |||
1648 | size = sprintf(buffer, | 1648 | size = sprintf(buffer, |
1649 | "IBM Pit/Pit-Phy/Olympic Chipset Token Ring Adapter %s\n",dev->name); | 1649 | "IBM Pit/Pit-Phy/Olympic Chipset Token Ring Adapter %s\n",dev->name); |
1650 | size += sprintf(buffer+size, "\n%6s: Adapter Address : Node Address : Functional Addr\n", | 1650 | size += sprintf(buffer+size, "\n%6s: Adapter Address : Node Address : Functional Addr\n", |
1651 | dev->name); | 1651 | dev->name); |
1652 | 1652 | ||
1653 | size += sprintf(buffer+size, "%6s: %02x:%02x:%02x:%02x:%02x:%02x : %02x:%02x:%02x:%02x:%02x:%02x : %02x:%02x:%02x:%02x\n", | 1653 | for (i = 0 ; i < 6 ; i++) |
1654 | addr[i] = readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr) + i); | ||
1655 | |||
1656 | size += sprintf(buffer+size, "%6s: %s : %s : %02x:%02x:%02x:%02x\n", | ||
1654 | dev->name, | 1657 | dev->name, |
1655 | dev->dev_addr[0], | 1658 | print_mac(mac, dev->dev_addr), |
1656 | dev->dev_addr[1], | 1659 | print_mac(mac2, addr), |
1657 | dev->dev_addr[2], | ||
1658 | dev->dev_addr[3], | ||
1659 | dev->dev_addr[4], | ||
1660 | dev->dev_addr[5], | ||
1661 | readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)), | ||
1662 | readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+1), | ||
1663 | readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+2), | ||
1664 | readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+3), | ||
1665 | readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+4), | ||
1666 | readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+5), | ||
1667 | readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)), | 1660 | readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)), |
1668 | readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+1), | 1661 | readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+1), |
1669 | readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+2), | 1662 | readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+2), |
@@ -1673,25 +1666,20 @@ static int olympic_proc_info(char *buffer, char **start, off_t offset, int lengt | |||
1673 | 1666 | ||
1674 | size += sprintf(buffer+size, "%6s: Physical Addr : Up Node Address : Poll Address : AccPri : Auth Src : Att Code :\n", | 1667 | size += sprintf(buffer+size, "%6s: Physical Addr : Up Node Address : Poll Address : AccPri : Auth Src : Att Code :\n", |
1675 | dev->name) ; | 1668 | dev->name) ; |
1676 | 1669 | ||
1677 | size += sprintf(buffer+size, "%6s: %02x:%02x:%02x:%02x : %02x:%02x:%02x:%02x:%02x:%02x : %02x:%02x:%02x:%02x:%02x:%02x : %04x : %04x : %04x :\n", | 1670 | for (i = 0 ; i < 6 ; i++) |
1671 | addr[i] = readb(opt+offsetof(struct olympic_parameters_table, up_node_addr) + i); | ||
1672 | for (i = 0 ; i < 6 ; i++) | ||
1673 | addr2[i] = readb(opt+offsetof(struct olympic_parameters_table, poll_addr) + i); | ||
1674 | |||
1675 | size += sprintf(buffer+size, "%6s: %02x:%02x:%02x:%02x : %s : %s : %04x : %04x : %04x :\n", | ||
1678 | dev->name, | 1676 | dev->name, |
1679 | readb(opt+offsetof(struct olympic_parameters_table, phys_addr)), | 1677 | readb(opt+offsetof(struct olympic_parameters_table, phys_addr)), |
1680 | readb(opt+offsetof(struct olympic_parameters_table, phys_addr)+1), | 1678 | readb(opt+offsetof(struct olympic_parameters_table, phys_addr)+1), |
1681 | readb(opt+offsetof(struct olympic_parameters_table, phys_addr)+2), | 1679 | readb(opt+offsetof(struct olympic_parameters_table, phys_addr)+2), |
1682 | readb(opt+offsetof(struct olympic_parameters_table, phys_addr)+3), | 1680 | readb(opt+offsetof(struct olympic_parameters_table, phys_addr)+3), |
1683 | readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)), | 1681 | print_mac(mac, addr), |
1684 | readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+1), | 1682 | print_mac(mac2, addr2), |
1685 | readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+2), | ||
1686 | readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+3), | ||
1687 | readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+4), | ||
1688 | readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+5), | ||
1689 | readb(opt+offsetof(struct olympic_parameters_table, poll_addr)), | ||
1690 | readb(opt+offsetof(struct olympic_parameters_table, poll_addr)+1), | ||
1691 | readb(opt+offsetof(struct olympic_parameters_table, poll_addr)+2), | ||
1692 | readb(opt+offsetof(struct olympic_parameters_table, poll_addr)+3), | ||
1693 | readb(opt+offsetof(struct olympic_parameters_table, poll_addr)+4), | ||
1694 | readb(opt+offsetof(struct olympic_parameters_table, poll_addr)+5), | ||
1695 | swab16(readw(opt+offsetof(struct olympic_parameters_table, acc_priority))), | 1683 | swab16(readw(opt+offsetof(struct olympic_parameters_table, acc_priority))), |
1696 | swab16(readw(opt+offsetof(struct olympic_parameters_table, auth_source_class))), | 1684 | swab16(readw(opt+offsetof(struct olympic_parameters_table, auth_source_class))), |
1697 | swab16(readw(opt+offsetof(struct olympic_parameters_table, att_code)))); | 1685 | swab16(readw(opt+offsetof(struct olympic_parameters_table, att_code)))); |
@@ -1699,14 +1687,11 @@ static int olympic_proc_info(char *buffer, char **start, off_t offset, int lengt | |||
1699 | size += sprintf(buffer+size, "%6s: Source Address : Bcn T : Maj. V : Lan St : Lcl Rg : Mon Err : Frame Correl : \n", | 1687 | size += sprintf(buffer+size, "%6s: Source Address : Bcn T : Maj. V : Lan St : Lcl Rg : Mon Err : Frame Correl : \n", |
1700 | dev->name) ; | 1688 | dev->name) ; |
1701 | 1689 | ||
1702 | size += sprintf(buffer+size, "%6s: %02x:%02x:%02x:%02x:%02x:%02x : %04x : %04x : %04x : %04x : %04x : %04x : \n", | 1690 | for (i = 0 ; i < 6 ; i++) |
1691 | addr[i] = readb(opt+offsetof(struct olympic_parameters_table, source_addr) + i); | ||
1692 | size += sprintf(buffer+size, "%6s: %s : %04x : %04x : %04x : %04x : %04x : %04x : \n", | ||
1703 | dev->name, | 1693 | dev->name, |
1704 | readb(opt+offsetof(struct olympic_parameters_table, source_addr)), | 1694 | print_mac(mac, addr), |
1705 | readb(opt+offsetof(struct olympic_parameters_table, source_addr)+1), | ||
1706 | readb(opt+offsetof(struct olympic_parameters_table, source_addr)+2), | ||
1707 | readb(opt+offsetof(struct olympic_parameters_table, source_addr)+3), | ||
1708 | readb(opt+offsetof(struct olympic_parameters_table, source_addr)+4), | ||
1709 | readb(opt+offsetof(struct olympic_parameters_table, source_addr)+5), | ||
1710 | swab16(readw(opt+offsetof(struct olympic_parameters_table, beacon_type))), | 1695 | swab16(readw(opt+offsetof(struct olympic_parameters_table, beacon_type))), |
1711 | swab16(readw(opt+offsetof(struct olympic_parameters_table, major_vector))), | 1696 | swab16(readw(opt+offsetof(struct olympic_parameters_table, major_vector))), |
1712 | swab16(readw(opt+offsetof(struct olympic_parameters_table, lan_status))), | 1697 | swab16(readw(opt+offsetof(struct olympic_parameters_table, lan_status))), |
@@ -1717,16 +1702,13 @@ static int olympic_proc_info(char *buffer, char **start, off_t offset, int lengt | |||
1717 | size += sprintf(buffer+size, "%6s: Beacon Details : Tx : Rx : NAUN Node Address : NAUN Node Phys : \n", | 1702 | size += sprintf(buffer+size, "%6s: Beacon Details : Tx : Rx : NAUN Node Address : NAUN Node Phys : \n", |
1718 | dev->name) ; | 1703 | dev->name) ; |
1719 | 1704 | ||
1720 | size += sprintf(buffer+size, "%6s: : %02x : %02x : %02x:%02x:%02x:%02x:%02x:%02x : %02x:%02x:%02x:%02x : \n", | 1705 | for (i = 0 ; i < 6 ; i++) |
1706 | addr[i] = readb(opt+offsetof(struct olympic_parameters_table, beacon_naun) + i); | ||
1707 | size += sprintf(buffer+size, "%6s: : %02x : %02x : %s : %02x:%02x:%02x:%02x : \n", | ||
1721 | dev->name, | 1708 | dev->name, |
1722 | swab16(readw(opt+offsetof(struct olympic_parameters_table, beacon_transmit))), | 1709 | swab16(readw(opt+offsetof(struct olympic_parameters_table, beacon_transmit))), |
1723 | swab16(readw(opt+offsetof(struct olympic_parameters_table, beacon_receive))), | 1710 | swab16(readw(opt+offsetof(struct olympic_parameters_table, beacon_receive))), |
1724 | readb(opt+offsetof(struct olympic_parameters_table, beacon_naun)), | 1711 | print_mac(mac, addr), |
1725 | readb(opt+offsetof(struct olympic_parameters_table, beacon_naun)+1), | ||
1726 | readb(opt+offsetof(struct olympic_parameters_table, beacon_naun)+2), | ||
1727 | readb(opt+offsetof(struct olympic_parameters_table, beacon_naun)+3), | ||
1728 | readb(opt+offsetof(struct olympic_parameters_table, beacon_naun)+4), | ||
1729 | readb(opt+offsetof(struct olympic_parameters_table, beacon_naun)+5), | ||
1730 | readb(opt+offsetof(struct olympic_parameters_table, beacon_phys)), | 1712 | readb(opt+offsetof(struct olympic_parameters_table, beacon_phys)), |
1731 | readb(opt+offsetof(struct olympic_parameters_table, beacon_phys)+1), | 1713 | readb(opt+offsetof(struct olympic_parameters_table, beacon_phys)+1), |
1732 | readb(opt+offsetof(struct olympic_parameters_table, beacon_phys)+2), | 1714 | readb(opt+offsetof(struct olympic_parameters_table, beacon_phys)+2), |
diff --git a/drivers/net/tokenring/proteon.c b/drivers/net/tokenring/proteon.c index 85d156dea033..ca6b65919b3d 100644 --- a/drivers/net/tokenring/proteon.c +++ b/drivers/net/tokenring/proteon.c | |||
@@ -122,6 +122,7 @@ static int __init setup_card(struct net_device *dev, struct device *pdev) | |||
122 | static int versionprinted; | 122 | static int versionprinted; |
123 | const unsigned *port; | 123 | const unsigned *port; |
124 | int j,err = 0; | 124 | int j,err = 0; |
125 | DECLARE_MAC_BUF(mac); | ||
125 | 126 | ||
126 | if (!dev) | 127 | if (!dev) |
127 | return -ENOMEM; | 128 | return -ENOMEM; |
@@ -152,11 +153,8 @@ static int __init setup_card(struct net_device *dev, struct device *pdev) | |||
152 | 153 | ||
153 | proteon_read_eeprom(dev); | 154 | proteon_read_eeprom(dev); |
154 | 155 | ||
155 | printk(KERN_DEBUG "proteon.c: Ring Station Address: "); | 156 | printk(KERN_DEBUG "proteon.c: Ring Station Address: %s\n", |
156 | printk("%2.2x", dev->dev_addr[0]); | 157 | print_mac(mac, dev->dev_addr)); |
157 | for (j = 1; j < 6; j++) | ||
158 | printk(":%2.2x", dev->dev_addr[j]); | ||
159 | printk("\n"); | ||
160 | 158 | ||
161 | tp = netdev_priv(dev); | 159 | tp = netdev_priv(dev); |
162 | tp->setnselout = proteon_setnselout_pins; | 160 | tp->setnselout = proteon_setnselout_pins; |
diff --git a/drivers/net/tokenring/skisa.c b/drivers/net/tokenring/skisa.c index ecbddc80a2a5..32e8d5a9f958 100644 --- a/drivers/net/tokenring/skisa.c +++ b/drivers/net/tokenring/skisa.c | |||
@@ -139,6 +139,7 @@ static int __init setup_card(struct net_device *dev, struct device *pdev) | |||
139 | static int versionprinted; | 139 | static int versionprinted; |
140 | const unsigned *port; | 140 | const unsigned *port; |
141 | int j, err = 0; | 141 | int j, err = 0; |
142 | DECLARE_MAC_BUF(mac); | ||
142 | 143 | ||
143 | if (!dev) | 144 | if (!dev) |
144 | return -ENOMEM; | 145 | return -ENOMEM; |
@@ -169,11 +170,8 @@ static int __init setup_card(struct net_device *dev, struct device *pdev) | |||
169 | 170 | ||
170 | sk_isa_read_eeprom(dev); | 171 | sk_isa_read_eeprom(dev); |
171 | 172 | ||
172 | printk(KERN_DEBUG "skisa.c: Ring Station Address: "); | 173 | printk(KERN_DEBUG "skisa.c: Ring Station Address: %s\n", |
173 | printk("%2.2x", dev->dev_addr[0]); | 174 | print_mac(mac, dev->dev_addr)); |
174 | for (j = 1; j < 6; j++) | ||
175 | printk(":%2.2x", dev->dev_addr[j]); | ||
176 | printk("\n"); | ||
177 | 175 | ||
178 | tp = netdev_priv(dev); | 176 | tp = netdev_priv(dev); |
179 | tp->setnselout = sk_isa_setnselout_pins; | 177 | tp->setnselout = sk_isa_setnselout_pins; |
diff --git a/drivers/net/tokenring/tmspci.c b/drivers/net/tokenring/tmspci.c index ecdd8511a67b..1c18f782f522 100644 --- a/drivers/net/tokenring/tmspci.c +++ b/drivers/net/tokenring/tmspci.c | |||
@@ -96,10 +96,11 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic | |||
96 | static int versionprinted; | 96 | static int versionprinted; |
97 | struct net_device *dev; | 97 | struct net_device *dev; |
98 | struct net_local *tp; | 98 | struct net_local *tp; |
99 | int i, ret; | 99 | int ret; |
100 | unsigned int pci_irq_line; | 100 | unsigned int pci_irq_line; |
101 | unsigned long pci_ioaddr; | 101 | unsigned long pci_ioaddr; |
102 | struct card_info *cardinfo = &card_info_table[ent->driver_data]; | 102 | struct card_info *cardinfo = &card_info_table[ent->driver_data]; |
103 | DECLARE_MAC_BUF(mac); | ||
103 | 104 | ||
104 | if (versionprinted++ == 0) | 105 | if (versionprinted++ == 0) |
105 | printk("%s", version); | 106 | printk("%s", version); |
@@ -136,11 +137,8 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic | |||
136 | 137 | ||
137 | tms_pci_read_eeprom(dev); | 138 | tms_pci_read_eeprom(dev); |
138 | 139 | ||
139 | printk("%s: Ring Station Address: ", dev->name); | 140 | printk("%s: Ring Station Address: %s\n", |
140 | printk("%2.2x", dev->dev_addr[0]); | 141 | dev->name, print_mac(mac, dev->dev_addr)); |
141 | for (i = 1; i < 6; i++) | ||
142 | printk(":%2.2x", dev->dev_addr[i]); | ||
143 | printk("\n"); | ||
144 | 142 | ||
145 | ret = tmsdev_init(dev, &pdev->dev); | 143 | ret = tmsdev_init(dev, &pdev->dev); |
146 | if (ret) { | 144 | if (ret) { |