diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-10-27 18:59:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-27 20:06:18 -0400 |
commit | e174961ca1a0b28f7abf0be47973ad57cb74e5f0 (patch) | |
tree | e8f74ecd420a0e380a71670e5aec5c2a0c15640a /drivers/net/tokenring/lanstreamer.c | |
parent | 0c68ae2605dbcf67414d8d1f19af93be44b355fb (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/lanstreamer.c')
-rw-r--r-- | drivers/net/tokenring/lanstreamer.c | 35 |
1 files changed, 13 insertions, 22 deletions
diff --git a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c index 59d1673f9387..bd70e818212a 100644 --- a/drivers/net/tokenring/lanstreamer.c +++ b/drivers/net/tokenring/lanstreamer.c | |||
@@ -446,9 +446,6 @@ static int streamer_reset(struct net_device *dev) | |||
446 | unsigned int uaa_addr; | 446 | unsigned int uaa_addr; |
447 | struct sk_buff *skb = NULL; | 447 | struct sk_buff *skb = NULL; |
448 | __u16 misr; | 448 | __u16 misr; |
449 | #if STREAMER_DEBUG | ||
450 | DECLARE_MAC_BUF(mac); | ||
451 | #endif | ||
452 | 449 | ||
453 | streamer_priv = netdev_priv(dev); | 450 | streamer_priv = netdev_priv(dev); |
454 | streamer_mmio = streamer_priv->streamer_mmio; | 451 | streamer_mmio = streamer_priv->streamer_mmio; |
@@ -577,8 +574,7 @@ static int streamer_reset(struct net_device *dev) | |||
577 | dev->dev_addr[i+1]= addr & 0xff; | 574 | dev->dev_addr[i+1]= addr & 0xff; |
578 | } | 575 | } |
579 | #if STREAMER_DEBUG | 576 | #if STREAMER_DEBUG |
580 | printk("Adapter address: %s\n", | 577 | printk("Adapter address: %pM\n", dev->dev_addr); |
581 | print_mac(mac, dev->dev_addr)); | ||
582 | #endif | 578 | #endif |
583 | } | 579 | } |
584 | return 0; | 580 | return 0; |
@@ -1538,7 +1534,6 @@ static void streamer_arb_cmd(struct net_device *dev) | |||
1538 | 1534 | ||
1539 | #if STREAMER_NETWORK_MONITOR | 1535 | #if STREAMER_NETWORK_MONITOR |
1540 | struct trh_hdr *mac_hdr; | 1536 | struct trh_hdr *mac_hdr; |
1541 | DECLARE_MAC_BUF(mac); | ||
1542 | #endif | 1537 | #endif |
1543 | 1538 | ||
1544 | writew(streamer_priv->arb, streamer_mmio + LAPA); | 1539 | writew(streamer_priv->arb, streamer_mmio + LAPA); |
@@ -1611,11 +1606,11 @@ static void streamer_arb_cmd(struct net_device *dev) | |||
1611 | dev->name); | 1606 | dev->name); |
1612 | mac_hdr = tr_hdr(mac_frame); | 1607 | mac_hdr = tr_hdr(mac_frame); |
1613 | printk(KERN_WARNING | 1608 | printk(KERN_WARNING |
1614 | "%s: MAC Frame Dest. Addr: %s\n", | 1609 | "%s: MAC Frame Dest. Addr: %pM\n", |
1615 | dev->name, print_mac(mac, mac_hdr->daddr)); | 1610 | dev->name, mac_hdr->daddr); |
1616 | printk(KERN_WARNING | 1611 | printk(KERN_WARNING |
1617 | "%s: MAC Frame Srce. Addr: %s\n", | 1612 | "%s: MAC Frame Srce. Addr: %pM\n", |
1618 | dev->name, DEV->ADDR6(mac_hdr->saddr)); | 1613 | dev->name, mac_hdr->saddr); |
1619 | #endif | 1614 | #endif |
1620 | netif_rx(mac_frame); | 1615 | netif_rx(mac_frame); |
1621 | 1616 | ||
@@ -1850,8 +1845,6 @@ static int sprintf_info(char *buffer, struct net_device *dev) | |||
1850 | struct streamer_parameters_table spt; | 1845 | struct streamer_parameters_table spt; |
1851 | int size = 0; | 1846 | int size = 0; |
1852 | int i; | 1847 | int i; |
1853 | DECLARE_MAC_BUF(mac); | ||
1854 | DECLARE_MAC_BUF(mac2); | ||
1855 | 1848 | ||
1856 | writew(streamer_priv->streamer_addr_table_addr, streamer_mmio + LAPA); | 1849 | writew(streamer_priv->streamer_addr_table_addr, streamer_mmio + LAPA); |
1857 | for (i = 0; i < 14; i += 2) { | 1850 | for (i = 0; i < 14; i += 2) { |
@@ -1873,9 +1866,8 @@ static int sprintf_info(char *buffer, struct net_device *dev) | |||
1873 | size = sprintf(buffer, "\n%6s: Adapter Address : Node Address : Functional Addr\n", dev->name); | 1866 | size = sprintf(buffer, "\n%6s: Adapter Address : Node Address : Functional Addr\n", dev->name); |
1874 | 1867 | ||
1875 | size += sprintf(buffer + size, | 1868 | size += sprintf(buffer + size, |
1876 | "%6s: %s : %s : %02x:%02x:%02x:%02x\n", | 1869 | "%6s: %pM : %pM : %02x:%02x:%02x:%02x\n", |
1877 | dev->name, print_mac(mac, dev->dev_addr), | 1870 | dev->name, dev->dev_addr, sat.node_addr, |
1878 | print_mac(mac2, sat.node_addr), | ||
1879 | sat.func_addr[0], sat.func_addr[1], | 1871 | sat.func_addr[0], sat.func_addr[1], |
1880 | sat.func_addr[2], sat.func_addr[3]); | 1872 | sat.func_addr[2], sat.func_addr[3]); |
1881 | 1873 | ||
@@ -1884,19 +1876,18 @@ static int sprintf_info(char *buffer, struct net_device *dev) | |||
1884 | size += sprintf(buffer + size, "%6s: Physical Addr : Up Node Address : Poll Address : AccPri : Auth Src : Att Code :\n", dev->name); | 1876 | size += sprintf(buffer + size, "%6s: Physical Addr : Up Node Address : Poll Address : AccPri : Auth Src : Att Code :\n", dev->name); |
1885 | 1877 | ||
1886 | size += sprintf(buffer + size, | 1878 | size += sprintf(buffer + size, |
1887 | "%6s: %02x:%02x:%02x:%02x : %s : %s : %04x : %04x : %04x :\n", | 1879 | "%6s: %02x:%02x:%02x:%02x : %pM : %pM : %04x : %04x : %04x :\n", |
1888 | dev->name, spt.phys_addr[0], spt.phys_addr[1], | 1880 | dev->name, spt.phys_addr[0], spt.phys_addr[1], |
1889 | spt.phys_addr[2], spt.phys_addr[3], | 1881 | spt.phys_addr[2], spt.phys_addr[3], |
1890 | print_mac(mac, spt.up_node_addr), | 1882 | spt.up_node_addr, spt.poll_addr, |
1891 | print_mac(mac2, spt.poll_addr), | ||
1892 | ntohs(spt.acc_priority), ntohs(spt.auth_source_class), | 1883 | ntohs(spt.acc_priority), ntohs(spt.auth_source_class), |
1893 | ntohs(spt.att_code)); | 1884 | ntohs(spt.att_code)); |
1894 | 1885 | ||
1895 | size += sprintf(buffer + size, "%6s: Source Address : Bcn T : Maj. V : Lan St : Lcl Rg : Mon Err : Frame Correl : \n", dev->name); | 1886 | size += sprintf(buffer + size, "%6s: Source Address : Bcn T : Maj. V : Lan St : Lcl Rg : Mon Err : Frame Correl : \n", dev->name); |
1896 | 1887 | ||
1897 | size += sprintf(buffer + size, | 1888 | size += sprintf(buffer + size, |
1898 | "%6s: %s : %04x : %04x : %04x : %04x : %04x : %04x : \n", | 1889 | "%6s: %pM : %04x : %04x : %04x : %04x : %04x : %04x : \n", |
1899 | dev->name, print_mac(mac, spt.source_addr), | 1890 | dev->name, spt.source_addr, |
1900 | ntohs(spt.beacon_type), ntohs(spt.major_vector), | 1891 | ntohs(spt.beacon_type), ntohs(spt.major_vector), |
1901 | ntohs(spt.lan_status), ntohs(spt.local_ring), | 1892 | ntohs(spt.lan_status), ntohs(spt.local_ring), |
1902 | ntohs(spt.mon_error), ntohs(spt.frame_correl)); | 1893 | ntohs(spt.mon_error), ntohs(spt.frame_correl)); |
@@ -1905,10 +1896,10 @@ static int sprintf_info(char *buffer, struct net_device *dev) | |||
1905 | dev->name); | 1896 | dev->name); |
1906 | 1897 | ||
1907 | size += sprintf(buffer + size, | 1898 | size += sprintf(buffer + size, |
1908 | "%6s: : %02x : %02x : %s : %02x:%02x:%02x:%02x : \n", | 1899 | "%6s: : %02x : %02x : %pM : %02x:%02x:%02x:%02x : \n", |
1909 | dev->name, ntohs(spt.beacon_transmit), | 1900 | dev->name, ntohs(spt.beacon_transmit), |
1910 | ntohs(spt.beacon_receive), | 1901 | ntohs(spt.beacon_receive), |
1911 | print_mac(mac, spt.beacon_naun), | 1902 | spt.beacon_naun, |
1912 | spt.beacon_phys[0], spt.beacon_phys[1], | 1903 | spt.beacon_phys[0], spt.beacon_phys[1], |
1913 | spt.beacon_phys[2], spt.beacon_phys[3]); | 1904 | spt.beacon_phys[2], spt.beacon_phys[3]); |
1914 | return size; | 1905 | return size; |