aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wavelan.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/wireless/wavelan.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/wireless/wavelan.c')
-rw-r--r--drivers/net/wireless/wavelan.c53
1 files changed, 23 insertions, 30 deletions
diff --git a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c
index 33ed9fe95f3d..a1f8a1687842 100644
--- a/drivers/net/wireless/wavelan.c
+++ b/drivers/net/wireless/wavelan.c
@@ -880,6 +880,8 @@ static void wv_82586_reconfig(struct net_device * dev)
880 */ 880 */
881static void wv_psa_show(psa_t * p) 881static void wv_psa_show(psa_t * p)
882{ 882{
883 DECLARE_MAC_BUF(mac);
884
883 printk(KERN_DEBUG "##### WaveLAN PSA contents: #####\n"); 885 printk(KERN_DEBUG "##### WaveLAN PSA contents: #####\n");
884 printk(KERN_DEBUG "psa_io_base_addr_1: 0x%02X %02X %02X %02X\n", 886 printk(KERN_DEBUG "psa_io_base_addr_1: 0x%02X %02X %02X %02X\n",
885 p->psa_io_base_addr_1, 887 p->psa_io_base_addr_1,
@@ -891,22 +893,13 @@ static void wv_psa_show(psa_t * p)
891 printk(KERN_DEBUG "psa_holi_params: 0x%02x, ", p->psa_holi_params); 893 printk(KERN_DEBUG "psa_holi_params: 0x%02x, ", p->psa_holi_params);
892 printk("psa_int_req_no: %d\n", p->psa_int_req_no); 894 printk("psa_int_req_no: %d\n", p->psa_int_req_no);
893#ifdef DEBUG_SHOW_UNUSED 895#ifdef DEBUG_SHOW_UNUSED
894 printk(KERN_DEBUG 896 printk(KERN_DEBUG "psa_unused0[]: %s\n",
895 "psa_unused0[]: %02X:%02X:%02X:%02X:%02X:%02X:%02X\n", 897 print_mac(mac, p->psa_unused0));
896 p->psa_unused0[0], p->psa_unused0[1], p->psa_unused0[2],
897 p->psa_unused0[3], p->psa_unused0[4], p->psa_unused0[5],
898 p->psa_unused0[6]);
899#endif /* DEBUG_SHOW_UNUSED */ 898#endif /* DEBUG_SHOW_UNUSED */
900 printk(KERN_DEBUG 899 printk(KERN_DEBUG "psa_univ_mac_addr[]: %s\n",
901 "psa_univ_mac_addr[]: %02x:%02x:%02x:%02x:%02x:%02x\n", 900 print_mac(mac, p->psa_univ_mac_addr));
902 p->psa_univ_mac_addr[0], p->psa_univ_mac_addr[1], 901 printk(KERN_DEBUG "psa_local_mac_addr[]: %s\n",
903 p->psa_univ_mac_addr[2], p->psa_univ_mac_addr[3], 902 print_mac(mac, p->psa_local_mac_addr));
904 p->psa_univ_mac_addr[4], p->psa_univ_mac_addr[5]);
905 printk(KERN_DEBUG
906 "psa_local_mac_addr[]: %02x:%02x:%02x:%02x:%02x:%02x\n",
907 p->psa_local_mac_addr[0], p->psa_local_mac_addr[1],
908 p->psa_local_mac_addr[2], p->psa_local_mac_addr[3],
909 p->psa_local_mac_addr[4], p->psa_local_mac_addr[5]);
910 printk(KERN_DEBUG "psa_univ_local_sel: %d, ", 903 printk(KERN_DEBUG "psa_univ_local_sel: %d, ",
911 p->psa_univ_local_sel); 904 p->psa_univ_local_sel);
912 printk("psa_comp_number: %d, ", p->psa_comp_number); 905 printk("psa_comp_number: %d, ", p->psa_comp_number);
@@ -1248,14 +1241,14 @@ static inline void wv_packet_info(u8 * p, /* Packet to dump */
1248{ /* Name of the function */ 1241{ /* Name of the function */
1249 int i; 1242 int i;
1250 int maxi; 1243 int maxi;
1244 DECLARE_MAC_BUF(mac);
1251 1245
1252 printk(KERN_DEBUG 1246 printk(KERN_DEBUG
1253 "%s: %s(): dest %02X:%02X:%02X:%02X:%02X:%02X, length %d\n", 1247 "%s: %s(): dest %s, length %d\n",
1254 msg1, msg2, p[0], p[1], p[2], p[3], p[4], p[5], length); 1248 msg1, msg2, print_mac(mac, p), length);
1255 printk(KERN_DEBUG 1249 printk(KERN_DEBUG
1256 "%s: %s(): src %02X:%02X:%02X:%02X:%02X:%02X, type 0x%02X%02X\n", 1250 "%s: %s(): src %s, type 0x%02X%02X\n",
1257 msg1, msg2, p[6], p[7], p[8], p[9], p[10], p[11], p[12], 1251 msg1, msg2, print_mac(mac, &p[6]), p[12], p[13]);
1258 p[13]);
1259 1252
1260#ifdef DEBUG_PACKET_DUMP 1253#ifdef DEBUG_PACKET_DUMP
1261 1254
@@ -1286,7 +1279,9 @@ static void wv_init_info(struct net_device * dev)
1286 short ioaddr = dev->base_addr; 1279 short ioaddr = dev->base_addr;
1287 net_local *lp = (net_local *) dev->priv; 1280 net_local *lp = (net_local *) dev->priv;
1288 psa_t psa; 1281 psa_t psa;
1289 int i; 1282#ifdef DEBUG_BASIC_SHOW
1283 DECLARE_MAC_BUF(mac);
1284#endif
1290 1285
1291 /* Read the parameter storage area */ 1286 /* Read the parameter storage area */
1292 psa_read(ioaddr, lp->hacr, 0, (unsigned char *) &psa, sizeof(psa)); 1287 psa_read(ioaddr, lp->hacr, 0, (unsigned char *) &psa, sizeof(psa));
@@ -1303,10 +1298,8 @@ static void wv_init_info(struct net_device * dev)
1303 1298
1304#ifdef DEBUG_BASIC_SHOW 1299#ifdef DEBUG_BASIC_SHOW
1305 /* Now, let's go for the basic stuff. */ 1300 /* Now, let's go for the basic stuff. */
1306 printk(KERN_NOTICE "%s: WaveLAN at %#x,", dev->name, ioaddr); 1301 printk(KERN_NOTICE "%s: WaveLAN at %#x, %s, IRQ %d",
1307 for (i = 0; i < WAVELAN_ADDR_SIZE; i++) 1302 dev->name, ioaddr, print_mac(mac, dev->dev_addr), dev->irq);
1308 printk("%s%02X", (i == 0) ? " " : ":", dev->dev_addr[i]);
1309 printk(", IRQ %d", dev->irq);
1310 1303
1311 /* Print current network ID. */ 1304 /* Print current network ID. */
1312 if (psa.psa_nwid_select) 1305 if (psa.psa_nwid_select)
@@ -3596,15 +3589,15 @@ static void wv_82586_config(struct net_device * dev)
3596 WAVELAN_ADDR_SIZE >> 1); 3589 WAVELAN_ADDR_SIZE >> 1);
3597 3590
3598#ifdef DEBUG_CONFIG_INFO 3591#ifdef DEBUG_CONFIG_INFO
3592 {
3593 DECLARE_MAC_BUF(mac);
3599 printk(KERN_DEBUG 3594 printk(KERN_DEBUG
3600 "%s: wv_82586_config(): set %d multicast addresses:\n", 3595 "%s: wv_82586_config(): set %d multicast addresses:\n",
3601 dev->name, lp->mc_count); 3596 dev->name, lp->mc_count);
3602 for (dmi = dev->mc_list; dmi; dmi = dmi->next) 3597 for (dmi = dev->mc_list; dmi; dmi = dmi->next)
3603 printk(KERN_DEBUG 3598 printk(KERN_DEBUG " %s\n",
3604 " %02x:%02x:%02x:%02x:%02x:%02x\n", 3599 print_mac(mac, dmi->dmi_addr));
3605 dmi->dmi_addr[0], dmi->dmi_addr[1], 3600 }
3606 dmi->dmi_addr[2], dmi->dmi_addr[3],
3607 dmi->dmi_addr[4], dmi->dmi_addr[5]);
3608#endif 3601#endif
3609 } 3602 }
3610 3603