aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
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/wireless
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/wireless')
-rw-r--r--drivers/net/wireless/adm8211.c5
-rw-r--r--drivers/net/wireless/airo.c17
-rw-r--r--drivers/net/wireless/arlan-main.c26
-rw-r--r--drivers/net/wireless/ath9k/core.c3
-rw-r--r--drivers/net/wireless/ath9k/hw.c5
-rw-r--r--drivers/net/wireless/ath9k/main.c19
-rw-r--r--drivers/net/wireless/ath9k/rc.c9
-rw-r--r--drivers/net/wireless/ath9k/xmit.c1
-rw-r--r--drivers/net/wireless/atmel.c5
-rw-r--r--drivers/net/wireless/b43/main.c5
-rw-r--r--drivers/net/wireless/hostap/hostap_80211_rx.c59
-rw-r--r--drivers/net/wireless/hostap/hostap_80211_tx.c15
-rw-r--r--drivers/net/wireless/hostap/hostap_ap.c241
-rw-r--r--drivers/net/wireless/hostap/hostap_hw.c10
-rw-r--r--drivers/net/wireless/hostap/hostap_info.c16
-rw-r--r--drivers/net/wireless/hostap/hostap_ioctl.c16
-rw-r--r--drivers/net/wireless/hostap/hostap_main.c26
-rw-r--r--drivers/net/wireless/hostap/hostap_proc.c15
-rw-r--r--drivers/net/wireless/ipw2100.c31
-rw-r--r--drivers/net/wireless/ipw2200.c217
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945-rs.c5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c18
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c47
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-debugfs.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-sta.c38
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-tx.c17
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c54
-rw-r--r--drivers/net/wireless/libertas/assoc.c32
-rw-r--r--drivers/net/wireless/libertas/cmd.c5
-rw-r--r--drivers/net/wireless/libertas/debugfs.c6
-rw-r--r--drivers/net/wireless/libertas/main.c9
-rw-r--r--drivers/net/wireless/libertas/scan.c11
-rw-r--r--drivers/net/wireless/libertas/wext.c3
-rw-r--r--drivers/net/wireless/libertas_tf/cmd.c5
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c15
-rw-r--r--drivers/net/wireless/netwave_cs.c5
-rw-r--r--drivers/net/wireless/orinoco.c10
-rw-r--r--drivers/net/wireless/p54/p54common.c5
-rw-r--r--drivers/net/wireless/p54/p54pci.c1
-rw-r--r--drivers/net/wireless/p54/p54usb.c1
-rw-r--r--drivers/net/wireless/prism54/isl_ioctl.c24
-rw-r--r--drivers/net/wireless/ray_cs.c9
-rw-r--r--drivers/net/wireless/rndis_wlan.c9
-rw-r--r--drivers/net/wireless/rt2x00/rt2400pci.c4
-rw-r--r--drivers/net/wireless/rt2x00/rt2500pci.c5
-rw-r--r--drivers/net/wireless/rt2x00/rt2500usb.c4
-rw-r--r--drivers/net/wireless/rt2x00/rt61pci.c4
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.c4
-rw-r--r--drivers/net/wireless/rtl8180_dev.c5
-rw-r--r--drivers/net/wireless/rtl8187_dev.c5
-rw-r--r--drivers/net/wireless/wavelan.c33
-rw-r--r--drivers/net/wireless/wavelan_cs.c30
-rw-r--r--drivers/net/wireless/wl3501_cs.c10
-rw-r--r--drivers/net/wireless/zd1211rw/zd_chip.c4
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.c6
56 files changed, 437 insertions, 754 deletions
diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
index b2c050b68890..6e18c9d36787 100644
--- a/drivers/net/wireless/adm8211.c
+++ b/drivers/net/wireless/adm8211.c
@@ -1791,7 +1791,6 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
1791 int err; 1791 int err;
1792 u32 reg; 1792 u32 reg;
1793 u8 perm_addr[ETH_ALEN]; 1793 u8 perm_addr[ETH_ALEN];
1794 DECLARE_MAC_BUF(mac);
1795 1794
1796 err = pci_enable_device(pdev); 1795 err = pci_enable_device(pdev);
1797 if (err) { 1796 if (err) {
@@ -1925,8 +1924,8 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
1925 goto err_free_desc; 1924 goto err_free_desc;
1926 } 1925 }
1927 1926
1928 printk(KERN_INFO "%s: hwaddr %s, Rev 0x%02x\n", 1927 printk(KERN_INFO "%s: hwaddr %pM, Rev 0x%02x\n",
1929 wiphy_name(dev->wiphy), print_mac(mac, dev->wiphy->perm_addr), 1928 wiphy_name(dev->wiphy), dev->wiphy->perm_addr,
1930 pdev->revision); 1929 pdev->revision);
1931 1930
1932 return 0; 1931 return 0;
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 370133e492d2..7c99f5a5b332 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -2757,7 +2757,6 @@ static struct net_device *_init_airo_card( unsigned short irq, int port,
2757 struct net_device *dev; 2757 struct net_device *dev;
2758 struct airo_info *ai; 2758 struct airo_info *ai;
2759 int i, rc; 2759 int i, rc;
2760 DECLARE_MAC_BUF(mac);
2761 2760
2762 /* Create the network device object. */ 2761 /* Create the network device object. */
2763 dev = alloc_netdev(sizeof(*ai), "", ether_setup); 2762 dev = alloc_netdev(sizeof(*ai), "", ether_setup);
@@ -2860,8 +2859,7 @@ static struct net_device *_init_airo_card( unsigned short irq, int port,
2860 goto err_out_reg; 2859 goto err_out_reg;
2861 2860
2862 set_bit(FLAG_REGISTERED,&ai->flags); 2861 set_bit(FLAG_REGISTERED,&ai->flags);
2863 airo_print_info(dev->name, "MAC enabled %s", 2862 airo_print_info(dev->name, "MAC enabled %pM", dev->dev_addr);
2864 print_mac(mac, dev->dev_addr));
2865 2863
2866 /* Allocate the transmit buffers */ 2864 /* Allocate the transmit buffers */
2867 if (probe && !test_bit(FLAG_MPI,&ai->flags)) 2865 if (probe && !test_bit(FLAG_MPI,&ai->flags))
@@ -2918,7 +2916,6 @@ int reset_airo_card( struct net_device *dev )
2918{ 2916{
2919 int i; 2917 int i;
2920 struct airo_info *ai = dev->priv; 2918 struct airo_info *ai = dev->priv;
2921 DECLARE_MAC_BUF(mac);
2922 2919
2923 if (reset_card (dev, 1)) 2920 if (reset_card (dev, 1))
2924 return -1; 2921 return -1;
@@ -2927,8 +2924,7 @@ int reset_airo_card( struct net_device *dev )
2927 airo_print_err(dev->name, "MAC could not be enabled"); 2924 airo_print_err(dev->name, "MAC could not be enabled");
2928 return -1; 2925 return -1;
2929 } 2926 }
2930 airo_print_info(dev->name, "MAC enabled %s", 2927 airo_print_info(dev->name, "MAC enabled %pM", dev->dev_addr);
2931 print_mac(mac, dev->dev_addr));
2932 /* Allocate the transmit buffers if needed */ 2928 /* Allocate the transmit buffers if needed */
2933 if (!test_bit(FLAG_MPI,&ai->flags)) 2929 if (!test_bit(FLAG_MPI,&ai->flags))
2934 for( i = 0; i < MAX_FIDS; i++ ) 2930 for( i = 0; i < MAX_FIDS; i++ )
@@ -5330,7 +5326,6 @@ static int proc_APList_open( struct inode *inode, struct file *file ) {
5330 int i; 5326 int i;
5331 char *ptr; 5327 char *ptr;
5332 APListRid APList_rid; 5328 APListRid APList_rid;
5333 DECLARE_MAC_BUF(mac);
5334 5329
5335 if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) 5330 if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL)
5336 return -ENOMEM; 5331 return -ENOMEM;
@@ -5354,8 +5349,7 @@ static int proc_APList_open( struct inode *inode, struct file *file ) {
5354// We end when we find a zero MAC 5349// We end when we find a zero MAC
5355 if ( !*(int*)APList_rid.ap[i] && 5350 if ( !*(int*)APList_rid.ap[i] &&
5356 !*(int*)&APList_rid.ap[i][2]) break; 5351 !*(int*)&APList_rid.ap[i][2]) break;
5357 ptr += sprintf(ptr, "%s\n", 5352 ptr += sprintf(ptr, "%pM\n", APList_rid.ap[i]);
5358 print_mac(mac, APList_rid.ap[i]));
5359 } 5353 }
5360 if (i==0) ptr += sprintf(ptr, "Not using specific APs\n"); 5354 if (i==0) ptr += sprintf(ptr, "Not using specific APs\n");
5361 5355
@@ -5374,7 +5368,6 @@ static int proc_BSSList_open( struct inode *inode, struct file *file ) {
5374 int rc; 5368 int rc;
5375 /* If doLoseSync is not 1, we won't do a Lose Sync */ 5369 /* If doLoseSync is not 1, we won't do a Lose Sync */
5376 int doLoseSync = -1; 5370 int doLoseSync = -1;
5377 DECLARE_MAC_BUF(mac);
5378 5371
5379 if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) 5372 if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL)
5380 return -ENOMEM; 5373 return -ENOMEM;
@@ -5411,8 +5404,8 @@ static int proc_BSSList_open( struct inode *inode, struct file *file ) {
5411 we have to add a spin lock... */ 5404 we have to add a spin lock... */
5412 rc = readBSSListRid(ai, doLoseSync, &BSSList_rid); 5405 rc = readBSSListRid(ai, doLoseSync, &BSSList_rid);
5413 while(rc == 0 && BSSList_rid.index != cpu_to_le16(0xffff)) { 5406 while(rc == 0 && BSSList_rid.index != cpu_to_le16(0xffff)) {
5414 ptr += sprintf(ptr, "%s %*s rssi = %d", 5407 ptr += sprintf(ptr, "%pM %*s rssi = %d",
5415 print_mac(mac, BSSList_rid.bssid), 5408 BSSList_rid.bssid,
5416 (int)BSSList_rid.ssidLen, 5409 (int)BSSList_rid.ssidLen,
5417 BSSList_rid.ssid, 5410 BSSList_rid.ssid,
5418 le16_to_cpu(BSSList_rid.dBm)); 5411 le16_to_cpu(BSSList_rid.dBm));
diff --git a/drivers/net/wireless/arlan-main.c b/drivers/net/wireless/arlan-main.c
index dec5e874a54d..b608643d5fcc 100644
--- a/drivers/net/wireless/arlan-main.c
+++ b/drivers/net/wireless/arlan-main.c
@@ -1467,19 +1467,17 @@ static void arlan_rx_interrupt(struct net_device *dev, u_char rxStatus, u_short
1467 else if (hw_dst_addr[1] == 0x40) 1467 else if (hw_dst_addr[1] == 0x40)
1468 printk(KERN_ERR "%s m/bcast 0x0140 \n", dev->name); 1468 printk(KERN_ERR "%s m/bcast 0x0140 \n", dev->name);
1469 while (dmi) 1469 while (dmi)
1470 { if (dmi->dmi_addrlen == 6) 1470 {
1471 { 1471 if (dmi->dmi_addrlen == 6) {
1472 DECLARE_MAC_BUF(mac);
1473 if (arlan_debug & ARLAN_DEBUG_HEADER_DUMP) 1472 if (arlan_debug & ARLAN_DEBUG_HEADER_DUMP)
1474 printk(KERN_ERR "%s mcl %s\n", 1473 printk(KERN_ERR "%s mcl %pM\n",
1475 dev->name, print_mac(mac, dmi->dmi_addr)); 1474 dev->name, dmi->dmi_addr);
1476 for (i = 0; i < 6; i++) 1475 for (i = 0; i < 6; i++)
1477 if (dmi->dmi_addr[i] != hw_dst_addr[i]) 1476 if (dmi->dmi_addr[i] != hw_dst_addr[i])
1478 break; 1477 break;
1479 if (i == 6) 1478 if (i == 6)
1480 break; 1479 break;
1481 } 1480 } else
1482 else
1483 printk(KERN_ERR "%s: invalid multicast address length given.\n", dev->name); 1481 printk(KERN_ERR "%s: invalid multicast address length given.\n", dev->name);
1484 dmi = dmi->next; 1482 dmi = dmi->next;
1485 } 1483 }
@@ -1512,18 +1510,14 @@ static void arlan_rx_interrupt(struct net_device *dev, u_char rxStatus, u_short
1512 { 1510 {
1513 char immedDestAddress[6]; 1511 char immedDestAddress[6];
1514 char immedSrcAddress[6]; 1512 char immedSrcAddress[6];
1515 DECLARE_MAC_BUF(mac);
1516 DECLARE_MAC_BUF(mac2);
1517 DECLARE_MAC_BUF(mac3);
1518 DECLARE_MAC_BUF(mac4);
1519 memcpy_fromio(immedDestAddress, arlan->immedDestAddress, 6); 1513 memcpy_fromio(immedDestAddress, arlan->immedDestAddress, 6);
1520 memcpy_fromio(immedSrcAddress, arlan->immedSrcAddress, 6); 1514 memcpy_fromio(immedSrcAddress, arlan->immedSrcAddress, 6);
1521 1515
1522 printk(KERN_WARNING "%s t %s f %s imd %s ims %s\n", 1516 printk(KERN_WARNING "%s t %pM f %pM imd %pM ims %pM\n",
1523 dev->name, print_mac(mac, skbtmp), 1517 dev->name, skbtmp,
1524 print_mac(mac2, &skbtmp[6]), 1518 &skbtmp[6],
1525 print_mac(mac3, immedDestAddress), 1519 immedDestAddress,
1526 print_mac(mac4, immedSrcAddress)); 1520 immedSrcAddress);
1527 } 1521 }
1528 skb->protocol = eth_type_trans(skb, dev); 1522 skb->protocol = eth_type_trans(skb, dev);
1529 IFDEBUG(ARLAN_DEBUG_HEADER_DUMP) 1523 IFDEBUG(ARLAN_DEBUG_HEADER_DUMP)
diff --git a/drivers/net/wireless/ath9k/core.c b/drivers/net/wireless/ath9k/core.c
index c5033f6f42ac..0089e023c609 100644
--- a/drivers/net/wireless/ath9k/core.c
+++ b/drivers/net/wireless/ath9k/core.c
@@ -1325,7 +1325,6 @@ struct ath_node *ath_node_attach(struct ath_softc *sc, u8 *addr, int if_id)
1325{ 1325{
1326 struct ath_vap *avp; 1326 struct ath_vap *avp;
1327 struct ath_node *an; 1327 struct ath_node *an;
1328 DECLARE_MAC_BUF(mac);
1329 1328
1330 avp = sc->sc_vaps[if_id]; 1329 avp = sc->sc_vaps[if_id];
1331 ASSERT(avp != NULL); 1330 ASSERT(avp != NULL);
@@ -1355,8 +1354,6 @@ void ath_node_detach(struct ath_softc *sc, struct ath_node *an, bool bh_flag)
1355{ 1354{
1356 unsigned long flags; 1355 unsigned long flags;
1357 1356
1358 DECLARE_MAC_BUF(mac);
1359
1360 ath_chainmask_sel_timerstop(&an->an_chainmask_sel); 1357 ath_chainmask_sel_timerstop(&an->an_chainmask_sel);
1361 an->an_flags |= ATH_NODE_CLEAN; 1358 an->an_flags |= ATH_NODE_CLEAN;
1362 ath_tx_node_cleanup(sc, an, bh_flag); 1359 ath_tx_node_cleanup(sc, an, bh_flag);
diff --git a/drivers/net/wireless/ath9k/hw.c b/drivers/net/wireless/ath9k/hw.c
index 98bc25c9b3cf..d5b513e134ab 100644
--- a/drivers/net/wireless/ath9k/hw.c
+++ b/drivers/net/wireless/ath9k/hw.c
@@ -1291,7 +1291,6 @@ static int ath9k_hw_init_macaddr(struct ath_hal *ah)
1291 int i; 1291 int i;
1292 u16 eeval; 1292 u16 eeval;
1293 struct ath_hal_5416 *ahp = AH5416(ah); 1293 struct ath_hal_5416 *ahp = AH5416(ah);
1294 DECLARE_MAC_BUF(mac);
1295 1294
1296 sum = 0; 1295 sum = 0;
1297 for (i = 0; i < 3; i++) { 1296 for (i = 0; i < 3; i++) {
@@ -1302,8 +1301,8 @@ static int ath9k_hw_init_macaddr(struct ath_hal *ah)
1302 } 1301 }
1303 if (sum == 0 || sum == 0xffff * 3) { 1302 if (sum == 0 || sum == 0xffff * 3) {
1304 DPRINTF(ah->ah_sc, ATH_DBG_EEPROM, 1303 DPRINTF(ah->ah_sc, ATH_DBG_EEPROM,
1305 "%s: mac address read failed: %s\n", __func__, 1304 "%s: mac address read failed: %pM\n", __func__,
1306 print_mac(mac, ahp->ah_macaddr)); 1305 ahp->ah_macaddr);
1307 return -EADDRNOTAVAIL; 1306 return -EADDRNOTAVAIL;
1308 } 1307 }
1309 1308
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index f05f584ab7bc..186d75acb326 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -362,7 +362,6 @@ static void ath9k_bss_assoc_info(struct ath_softc *sc,
362 struct ieee80211_channel *curchan = hw->conf.channel; 362 struct ieee80211_channel *curchan = hw->conf.channel;
363 struct ath_vap *avp; 363 struct ath_vap *avp;
364 int pos; 364 int pos;
365 DECLARE_MAC_BUF(mac);
366 365
367 if (bss_conf->assoc) { 366 if (bss_conf->assoc) {
368 DPRINTF(sc, ATH_DBG_CONFIG, "%s: Bss Info ASSOC %d\n", 367 DPRINTF(sc, ATH_DBG_CONFIG, "%s: Bss Info ASSOC %d\n",
@@ -397,9 +396,9 @@ static void ath9k_bss_assoc_info(struct ath_softc *sc,
397 ath_update_chainmask(sc, bss_conf->assoc_ht); 396 ath_update_chainmask(sc, bss_conf->assoc_ht);
398 397
399 DPRINTF(sc, ATH_DBG_CONFIG, 398 DPRINTF(sc, ATH_DBG_CONFIG,
400 "%s: bssid %s aid 0x%x\n", 399 "%s: bssid %pM aid 0x%x\n",
401 __func__, 400 __func__,
402 print_mac(mac, sc->sc_curbssid), sc->sc_curaid); 401 sc->sc_curbssid, sc->sc_curaid);
403 402
404 DPRINTF(sc, ATH_DBG_CONFIG, "%s: Set channel: %d MHz\n", 403 DPRINTF(sc, ATH_DBG_CONFIG, "%s: Set channel: %d MHz\n",
405 __func__, 404 __func__,
@@ -1278,7 +1277,6 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
1278 struct ath_vap *avp; 1277 struct ath_vap *avp;
1279 u32 rfilt = 0; 1278 u32 rfilt = 0;
1280 int error, i; 1279 int error, i;
1281 DECLARE_MAC_BUF(mac);
1282 1280
1283 avp = sc->sc_vaps[0]; 1281 avp = sc->sc_vaps[0];
1284 if (avp == NULL) { 1282 if (avp == NULL) {
@@ -1333,9 +1331,9 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
1333 sc->sc_imask &= ~(ATH9K_INT_SWBA | ATH9K_INT_BMISS); 1331 sc->sc_imask &= ~(ATH9K_INT_SWBA | ATH9K_INT_BMISS);
1334 1332
1335 DPRINTF(sc, ATH_DBG_CONFIG, 1333 DPRINTF(sc, ATH_DBG_CONFIG,
1336 "%s: RX filter 0x%x bssid %s aid 0x%x\n", 1334 "%s: RX filter 0x%x bssid %pM aid 0x%x\n",
1337 __func__, rfilt, 1335 __func__, rfilt,
1338 print_mac(mac, sc->sc_curbssid), sc->sc_curaid); 1336 sc->sc_curbssid, sc->sc_curaid);
1339 1337
1340 /* need to reconfigure the beacon */ 1338 /* need to reconfigure the beacon */
1341 sc->sc_flags &= ~SC_OP_BEACONS ; 1339 sc->sc_flags &= ~SC_OP_BEACONS ;
@@ -1424,7 +1422,6 @@ static void ath9k_sta_notify(struct ieee80211_hw *hw,
1424 struct ath_softc *sc = hw->priv; 1422 struct ath_softc *sc = hw->priv;
1425 struct ath_node *an; 1423 struct ath_node *an;
1426 unsigned long flags; 1424 unsigned long flags;
1427 DECLARE_MAC_BUF(mac);
1428 1425
1429 spin_lock_irqsave(&sc->node_lock, flags); 1426 spin_lock_irqsave(&sc->node_lock, flags);
1430 an = ath_node_find(sc, sta->addr); 1427 an = ath_node_find(sc, sta->addr);
@@ -1435,8 +1432,8 @@ static void ath9k_sta_notify(struct ieee80211_hw *hw,
1435 spin_lock_irqsave(&sc->node_lock, flags); 1432 spin_lock_irqsave(&sc->node_lock, flags);
1436 if (!an) { 1433 if (!an) {
1437 ath_node_attach(sc, sta->addr, 0); 1434 ath_node_attach(sc, sta->addr, 0);
1438 DPRINTF(sc, ATH_DBG_CONFIG, "%s: Attach a node: %s\n", 1435 DPRINTF(sc, ATH_DBG_CONFIG, "%s: Attach a node: %pM\n",
1439 __func__, print_mac(mac, sta->addr)); 1436 __func__, sta->addr);
1440 } else { 1437 } else {
1441 ath_node_get(sc, sta->addr); 1438 ath_node_get(sc, sta->addr);
1442 } 1439 }
@@ -1449,9 +1446,9 @@ static void ath9k_sta_notify(struct ieee80211_hw *hw,
1449 __func__); 1446 __func__);
1450 else { 1447 else {
1451 ath_node_put(sc, an, ATH9K_BH_STATUS_INTACT); 1448 ath_node_put(sc, an, ATH9K_BH_STATUS_INTACT);
1452 DPRINTF(sc, ATH_DBG_CONFIG, "%s: Put a node: %s\n", 1449 DPRINTF(sc, ATH_DBG_CONFIG, "%s: Put a node: %pM\n",
1453 __func__, 1450 __func__,
1454 print_mac(mac, sta->addr)); 1451 sta->addr);
1455 } 1452 }
1456 break; 1453 break;
1457 default: 1454 default:
diff --git a/drivers/net/wireless/ath9k/rc.c b/drivers/net/wireless/ath9k/rc.c
index cca2fc5b0765..b1e535b8ec48 100644
--- a/drivers/net/wireless/ath9k/rc.c
+++ b/drivers/net/wireless/ath9k/rc.c
@@ -1942,7 +1942,6 @@ static void ath_get_rate(void *priv, struct ieee80211_supported_band *sband,
1942 s8 lowest_idx; 1942 s8 lowest_idx;
1943 __le16 fc = hdr->frame_control; 1943 __le16 fc = hdr->frame_control;
1944 u8 *qc, tid; 1944 u8 *qc, tid;
1945 DECLARE_MAC_BUF(mac);
1946 1945
1947 DPRINTF(sc, ATH_DBG_RATE, "%s\n", __func__); 1946 DPRINTF(sc, ATH_DBG_RATE, "%s\n", __func__);
1948 1947
@@ -2003,14 +2002,14 @@ static void ath_get_rate(void *priv, struct ieee80211_supported_band *sband,
2003 if (ret) 2002 if (ret)
2004 DPRINTF(sc, ATH_DBG_AGGR, 2003 DPRINTF(sc, ATH_DBG_AGGR,
2005 "%s: Unable to start tx " 2004 "%s: Unable to start tx "
2006 "aggr for: %s\n", 2005 "aggr for: %pM\n",
2007 __func__, 2006 __func__,
2008 print_mac(mac, hdr->addr1)); 2007 hdr->addr1);
2009 else 2008 else
2010 DPRINTF(sc, ATH_DBG_AGGR, 2009 DPRINTF(sc, ATH_DBG_AGGR,
2011 "%s: Started tx aggr for: %s\n", 2010 "%s: Started tx aggr for: %pM\n",
2012 __func__, 2011 __func__,
2013 print_mac(mac, hdr->addr1)); 2012 hdr->addr1);
2014 } else if (chk == AGGR_EXCHANGE_PROGRESS) 2013 } else if (chk == AGGR_EXCHANGE_PROGRESS)
2015 ath_tx_aggr_resp(sc, sband, sta, an, tid); 2014 ath_tx_aggr_resp(sc, sband, sta, an, tid);
2016 } 2015 }
diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c
index 3a4757942b3f..13866043dec9 100644
--- a/drivers/net/wireless/ath9k/xmit.c
+++ b/drivers/net/wireless/ath9k/xmit.c
@@ -2416,7 +2416,6 @@ enum ATH_AGGR_CHECK ath_tx_aggr_check(struct ath_softc *sc,
2416 u8 tidno) 2416 u8 tidno)
2417{ 2417{
2418 struct ath_atx_tid *txtid; 2418 struct ath_atx_tid *txtid;
2419 DECLARE_MAC_BUF(mac);
2420 2419
2421 if (!(sc->sc_flags & SC_OP_TXAGGR)) 2420 if (!(sc->sc_flags & SC_OP_TXAGGR))
2422 return AGGR_NOT_REQUIRED; 2421 return AGGR_NOT_REQUIRED;
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c
index ecb02bdaab5b..6e20552c1881 100644
--- a/drivers/net/wireless/atmel.c
+++ b/drivers/net/wireless/atmel.c
@@ -1479,7 +1479,6 @@ struct net_device *init_atmel_card(unsigned short irq, unsigned long port,
1479 struct net_device *dev; 1479 struct net_device *dev;
1480 struct atmel_private *priv; 1480 struct atmel_private *priv;
1481 int rc; 1481 int rc;
1482 DECLARE_MAC_BUF(mac);
1483 1482
1484 /* Create the network device object. */ 1483 /* Create the network device object. */
1485 dev = alloc_etherdev(sizeof(*priv)); 1484 dev = alloc_etherdev(sizeof(*priv));
@@ -1591,8 +1590,8 @@ struct net_device *init_atmel_card(unsigned short irq, unsigned long port,
1591 if (!ent) 1590 if (!ent)
1592 printk(KERN_WARNING "atmel: unable to create /proc entry.\n"); 1591 printk(KERN_WARNING "atmel: unable to create /proc entry.\n");
1593 1592
1594 printk(KERN_INFO "%s: Atmel at76c50x. Version %d.%d. MAC %s\n", 1593 printk(KERN_INFO "%s: Atmel at76c50x. Version %d.%d. MAC %pM\n",
1595 dev->name, DRIVER_MAJOR, DRIVER_MINOR, print_mac(mac, dev->dev_addr)); 1594 dev->name, DRIVER_MAJOR, DRIVER_MINOR, dev->dev_addr);
1596 1595
1597 return dev; 1596 return dev;
1598 1597
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 14c44df584d0..6e773018cba0 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -3445,7 +3445,6 @@ static int b43_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
3445 u8 algorithm; 3445 u8 algorithm;
3446 u8 index; 3446 u8 index;
3447 int err; 3447 int err;
3448 DECLARE_MAC_BUF(mac);
3449 3448
3450 if (modparam_nohwcrypt) 3449 if (modparam_nohwcrypt)
3451 return -ENOSPC; /* User disabled HW-crypto */ 3450 return -ENOSPC; /* User disabled HW-crypto */
@@ -3533,9 +3532,9 @@ out_unlock:
3533 mutex_unlock(&wl->mutex); 3532 mutex_unlock(&wl->mutex);
3534 if (!err) { 3533 if (!err) {
3535 b43dbg(wl, "%s hardware based encryption for keyidx: %d, " 3534 b43dbg(wl, "%s hardware based encryption for keyidx: %d, "
3536 "mac: %s\n", 3535 "mac: %pM\n",
3537 cmd == SET_KEY ? "Using" : "Disabling", key->keyidx, 3536 cmd == SET_KEY ? "Using" : "Disabling", key->keyidx,
3538 print_mac(mac, addr)); 3537 addr);
3539 } 3538 }
3540 return err; 3539 return err;
3541} 3540}
diff --git a/drivers/net/wireless/hostap/hostap_80211_rx.c b/drivers/net/wireless/hostap/hostap_80211_rx.c
index f106bc1585a4..bbb8ec6683d7 100644
--- a/drivers/net/wireless/hostap/hostap_80211_rx.c
+++ b/drivers/net/wireless/hostap/hostap_80211_rx.c
@@ -19,7 +19,6 @@ void hostap_dump_rx_80211(const char *name, struct sk_buff *skb,
19{ 19{
20 struct ieee80211_hdr_4addr *hdr; 20 struct ieee80211_hdr_4addr *hdr;
21 u16 fc; 21 u16 fc;
22 DECLARE_MAC_BUF(mac);
23 22
24 hdr = (struct ieee80211_hdr_4addr *) skb->data; 23 hdr = (struct ieee80211_hdr_4addr *) skb->data;
25 24
@@ -45,11 +44,11 @@ void hostap_dump_rx_80211(const char *name, struct sk_buff *skb,
45 printk(" dur=0x%04x seq=0x%04x\n", le16_to_cpu(hdr->duration_id), 44 printk(" dur=0x%04x seq=0x%04x\n", le16_to_cpu(hdr->duration_id),
46 le16_to_cpu(hdr->seq_ctl)); 45 le16_to_cpu(hdr->seq_ctl));
47 46
48 printk(KERN_DEBUG " A1=%s", print_mac(mac, hdr->addr1)); 47 printk(KERN_DEBUG " A1=%pM", hdr->addr1);
49 printk(" A2=%s", print_mac(mac, hdr->addr2)); 48 printk(" A2=%pM", hdr->addr2);
50 printk(" A3=%s", print_mac(mac, hdr->addr3)); 49 printk(" A3=%pM", hdr->addr3);
51 if (skb->len >= 30) 50 if (skb->len >= 30)
52 printk(" A4=%s", print_mac(mac, hdr->addr4)); 51 printk(" A4=%pM", hdr->addr4);
53 printk("\n"); 52 printk("\n");
54} 53}
55 54
@@ -557,7 +556,6 @@ static int
557hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr_4addr *hdr, 556hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr_4addr *hdr,
558 u16 fc, struct net_device **wds) 557 u16 fc, struct net_device **wds)
559{ 558{
560 DECLARE_MAC_BUF(mac);
561 /* FIX: is this really supposed to accept WDS frames only in Master 559 /* FIX: is this really supposed to accept WDS frames only in Master
562 * mode? What about Repeater or Managed with WDS frames? */ 560 * mode? What about Repeater or Managed with WDS frames? */
563 if ((fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) != 561 if ((fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) !=
@@ -573,10 +571,10 @@ hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr_4addr *hdr,
573 hdr->addr1[4] != 0xff || hdr->addr1[5] != 0xff)) { 571 hdr->addr1[4] != 0xff || hdr->addr1[5] != 0xff)) {
574 /* RA (or BSSID) is not ours - drop */ 572 /* RA (or BSSID) is not ours - drop */
575 PDEBUG(DEBUG_EXTRA2, "%s: received WDS frame with " 573 PDEBUG(DEBUG_EXTRA2, "%s: received WDS frame with "
576 "not own or broadcast %s=%s\n", 574 "not own or broadcast %s=%pM\n",
577 local->dev->name, 575 local->dev->name,
578 fc & IEEE80211_FCTL_FROMDS ? "RA" : "BSSID", 576 fc & IEEE80211_FCTL_FROMDS ? "RA" : "BSSID",
579 print_mac(mac, hdr->addr1)); 577 hdr->addr1);
580 return -1; 578 return -1;
581 } 579 }
582 580
@@ -589,8 +587,8 @@ hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr_4addr *hdr,
589 /* require that WDS link has been registered with TA or the 587 /* require that WDS link has been registered with TA or the
590 * frame is from current AP when using 'AP client mode' */ 588 * frame is from current AP when using 'AP client mode' */
591 PDEBUG(DEBUG_EXTRA, "%s: received WDS[4 addr] frame " 589 PDEBUG(DEBUG_EXTRA, "%s: received WDS[4 addr] frame "
592 "from unknown TA=%s\n", 590 "from unknown TA=%pM\n",
593 local->dev->name, print_mac(mac, hdr->addr2)); 591 local->dev->name, hdr->addr2);
594 if (local->ap && local->ap->autom_ap_wds) 592 if (local->ap && local->ap->autom_ap_wds)
595 hostap_wds_link_oper(local, hdr->addr2, WDS_ADD); 593 hostap_wds_link_oper(local, hdr->addr2, WDS_ADD);
596 return -1; 594 return -1;
@@ -667,10 +665,8 @@ hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb,
667 strcmp(crypt->ops->name, "TKIP") == 0) { 665 strcmp(crypt->ops->name, "TKIP") == 0) {
668 if (net_ratelimit()) { 666 if (net_ratelimit()) {
669 printk(KERN_DEBUG "%s: TKIP countermeasures: dropped " 667 printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
670 "received packet from " MAC_FMT "\n", 668 "received packet from %pM\n",
671 local->dev->name, 669 local->dev->name, hdr->addr2);
672 hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
673 hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
674 } 670 }
675 return -1; 671 return -1;
676 } 672 }
@@ -679,12 +675,8 @@ hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb,
679 res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv); 675 res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv);
680 atomic_dec(&crypt->refcnt); 676 atomic_dec(&crypt->refcnt);
681 if (res < 0) { 677 if (res < 0) {
682 printk(KERN_DEBUG "%s: decryption failed (SA=" MAC_FMT 678 printk(KERN_DEBUG "%s: decryption failed (SA=%pM) res=%d\n",
683 ") res=%d\n", 679 local->dev->name, hdr->addr2, res);
684 local->dev->name,
685 hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
686 hdr->addr2[3], hdr->addr2[4], hdr->addr2[5],
687 res);
688 local->comm_tallies.rx_discards_wep_undecryptable++; 680 local->comm_tallies.rx_discards_wep_undecryptable++;
689 return -1; 681 return -1;
690 } 682 }
@@ -700,7 +692,6 @@ hostap_rx_frame_decrypt_msdu(local_info_t *local, struct sk_buff *skb,
700{ 692{
701 struct ieee80211_hdr_4addr *hdr; 693 struct ieee80211_hdr_4addr *hdr;
702 int res, hdrlen; 694 int res, hdrlen;
703 DECLARE_MAC_BUF(mac);
704 695
705 if (crypt == NULL || crypt->ops->decrypt_msdu == NULL) 696 if (crypt == NULL || crypt->ops->decrypt_msdu == NULL)
706 return 0; 697 return 0;
@@ -713,8 +704,8 @@ hostap_rx_frame_decrypt_msdu(local_info_t *local, struct sk_buff *skb,
713 atomic_dec(&crypt->refcnt); 704 atomic_dec(&crypt->refcnt);
714 if (res < 0) { 705 if (res < 0) {
715 printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed" 706 printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed"
716 " (SA=%s keyidx=%d)\n", 707 " (SA=%pM keyidx=%d)\n",
717 local->dev->name, print_mac(mac, hdr->addr2), keyidx); 708 local->dev->name, hdr->addr2, keyidx);
718 return -1; 709 return -1;
719 } 710 }
720 711
@@ -822,10 +813,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
822 * frames silently instead of filling system log with 813 * frames silently instead of filling system log with
823 * these reports. */ 814 * these reports. */
824 printk(KERN_DEBUG "%s: WEP decryption failed (not set)" 815 printk(KERN_DEBUG "%s: WEP decryption failed (not set)"
825 " (SA=" MAC_FMT ")\n", 816 " (SA=%pM)\n",
826 local->dev->name, 817 local->dev->name, hdr->addr2);
827 hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
828 hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
829#endif 818#endif
830 local->comm_tallies.rx_discards_wep_undecryptable++; 819 local->comm_tallies.rx_discards_wep_undecryptable++;
831 goto rx_dropped; 820 goto rx_dropped;
@@ -839,9 +828,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
839 (keyidx = hostap_rx_frame_decrypt(local, skb, crypt)) < 0) 828 (keyidx = hostap_rx_frame_decrypt(local, skb, crypt)) < 0)
840 { 829 {
841 printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth " 830 printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth "
842 "from " MAC_FMT "\n", dev->name, 831 "from %pM\n", dev->name, hdr->addr2);
843 hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
844 hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
845 /* TODO: could inform hostapd about this so that it 832 /* TODO: could inform hostapd about this so that it
846 * could send auth failure report */ 833 * could send auth failure report */
847 goto rx_dropped; 834 goto rx_dropped;
@@ -1009,10 +996,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
1009 "unencrypted EAPOL frame\n", local->dev->name); 996 "unencrypted EAPOL frame\n", local->dev->name);
1010 } else { 997 } else {
1011 printk(KERN_DEBUG "%s: encryption configured, but RX " 998 printk(KERN_DEBUG "%s: encryption configured, but RX "
1012 "frame not encrypted (SA=" MAC_FMT ")\n", 999 "frame not encrypted (SA=%pM)\n",
1013 local->dev->name, 1000 local->dev->name, hdr->addr2);
1014 hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
1015 hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
1016 goto rx_dropped; 1001 goto rx_dropped;
1017 } 1002 }
1018 } 1003 }
@@ -1021,10 +1006,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
1021 !hostap_is_eapol_frame(local, skb)) { 1006 !hostap_is_eapol_frame(local, skb)) {
1022 if (net_ratelimit()) { 1007 if (net_ratelimit()) {
1023 printk(KERN_DEBUG "%s: dropped unencrypted RX data " 1008 printk(KERN_DEBUG "%s: dropped unencrypted RX data "
1024 "frame from " MAC_FMT " (drop_unencrypted=1)\n", 1009 "frame from %pM (drop_unencrypted=1)\n",
1025 dev->name, 1010 dev->name, hdr->addr2);
1026 hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
1027 hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
1028 } 1011 }
1029 goto rx_dropped; 1012 goto rx_dropped;
1030 } 1013 }
diff --git a/drivers/net/wireless/hostap/hostap_80211_tx.c b/drivers/net/wireless/hostap/hostap_80211_tx.c
index 921c984416f8..075247188e64 100644
--- a/drivers/net/wireless/hostap/hostap_80211_tx.c
+++ b/drivers/net/wireless/hostap/hostap_80211_tx.c
@@ -17,7 +17,6 @@ void hostap_dump_tx_80211(const char *name, struct sk_buff *skb)
17{ 17{
18 struct ieee80211_hdr_4addr *hdr; 18 struct ieee80211_hdr_4addr *hdr;
19 u16 fc; 19 u16 fc;
20 DECLARE_MAC_BUF(mac);
21 20
22 hdr = (struct ieee80211_hdr_4addr *) skb->data; 21 hdr = (struct ieee80211_hdr_4addr *) skb->data;
23 22
@@ -41,11 +40,11 @@ void hostap_dump_tx_80211(const char *name, struct sk_buff *skb)
41 printk(" dur=0x%04x seq=0x%04x\n", le16_to_cpu(hdr->duration_id), 40 printk(" dur=0x%04x seq=0x%04x\n", le16_to_cpu(hdr->duration_id),
42 le16_to_cpu(hdr->seq_ctl)); 41 le16_to_cpu(hdr->seq_ctl));
43 42
44 printk(KERN_DEBUG " A1=%s", print_mac(mac, hdr->addr1)); 43 printk(KERN_DEBUG " A1=%pM", hdr->addr1);
45 printk(" A2=%s", print_mac(mac, hdr->addr2)); 44 printk(" A2=%pM", hdr->addr2);
46 printk(" A3=%s", print_mac(mac, hdr->addr3)); 45 printk(" A3=%pM", hdr->addr3);
47 if (skb->len >= 30) 46 if (skb->len >= 30)
48 printk(" A4=%s", print_mac(mac, hdr->addr4)); 47 printk(" A4=%pM", hdr->addr4);
49 printk("\n"); 48 printk("\n");
50} 49}
51 50
@@ -328,10 +327,8 @@ static struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb,
328 hdr = (struct ieee80211_hdr_4addr *) skb->data; 327 hdr = (struct ieee80211_hdr_4addr *) skb->data;
329 if (net_ratelimit()) { 328 if (net_ratelimit()) {
330 printk(KERN_DEBUG "%s: TKIP countermeasures: dropped " 329 printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
331 "TX packet to " MAC_FMT "\n", 330 "TX packet to %pM\n",
332 local->dev->name, 331 local->dev->name, hdr->addr1);
333 hdr->addr1[0], hdr->addr1[1], hdr->addr1[2],
334 hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]);
335 } 332 }
336 kfree_skb(skb); 333 kfree_skb(skb);
337 return NULL; 334 return NULL;
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c
index af3d4ef2a80b..dec3dbe1bf8f 100644
--- a/drivers/net/wireless/hostap/hostap_ap.c
+++ b/drivers/net/wireless/hostap/hostap_ap.c
@@ -94,7 +94,6 @@ static void ap_sta_hash_add(struct ap_data *ap, struct sta_info *sta)
94static void ap_sta_hash_del(struct ap_data *ap, struct sta_info *sta) 94static void ap_sta_hash_del(struct ap_data *ap, struct sta_info *sta)
95{ 95{
96 struct sta_info *s; 96 struct sta_info *s;
97 DECLARE_MAC_BUF(mac);
98 97
99 s = ap->sta_hash[STA_HASH(sta->addr)]; 98 s = ap->sta_hash[STA_HASH(sta->addr)];
100 if (s == NULL) return; 99 if (s == NULL) return;
@@ -109,20 +108,18 @@ static void ap_sta_hash_del(struct ap_data *ap, struct sta_info *sta)
109 if (s->hnext != NULL) 108 if (s->hnext != NULL)
110 s->hnext = s->hnext->hnext; 109 s->hnext = s->hnext->hnext;
111 else 110 else
112 printk("AP: could not remove STA %s" 111 printk("AP: could not remove STA %pM from hash table\n",
113 " from hash table\n", 112 sta->addr);
114 print_mac(mac, sta->addr));
115} 113}
116 114
117static void ap_free_sta(struct ap_data *ap, struct sta_info *sta) 115static void ap_free_sta(struct ap_data *ap, struct sta_info *sta)
118{ 116{
119 DECLARE_MAC_BUF(mac);
120 if (sta->ap && sta->local) 117 if (sta->ap && sta->local)
121 hostap_event_expired_sta(sta->local->dev, sta); 118 hostap_event_expired_sta(sta->local->dev, sta);
122 119
123 if (ap->proc != NULL) { 120 if (ap->proc != NULL) {
124 char name[20]; 121 char name[20];
125 sprintf(name, "%s", print_mac(mac, sta->addr)); 122 sprintf(name, "%pM", sta->addr);
126 remove_proc_entry(name, ap->proc); 123 remove_proc_entry(name, ap->proc);
127 } 124 }
128 125
@@ -185,7 +182,6 @@ static void ap_handle_timer(unsigned long data)
185 struct ap_data *ap; 182 struct ap_data *ap;
186 unsigned long next_time = 0; 183 unsigned long next_time = 0;
187 int was_assoc; 184 int was_assoc;
188 DECLARE_MAC_BUF(mac);
189 185
190 if (sta == NULL || sta->local == NULL || sta->local->ap == NULL) { 186 if (sta == NULL || sta->local == NULL || sta->local->ap == NULL) {
191 PDEBUG(DEBUG_AP, "ap_handle_timer() called with NULL data\n"); 187 PDEBUG(DEBUG_AP, "ap_handle_timer() called with NULL data\n");
@@ -242,8 +238,8 @@ static void ap_handle_timer(unsigned long data)
242 if (sta->ap) { 238 if (sta->ap) {
243 if (ap->autom_ap_wds) { 239 if (ap->autom_ap_wds) {
244 PDEBUG(DEBUG_AP, "%s: removing automatic WDS " 240 PDEBUG(DEBUG_AP, "%s: removing automatic WDS "
245 "connection to AP %s\n", 241 "connection to AP %pM\n",
246 local->dev->name, print_mac(mac, sta->addr)); 242 local->dev->name, sta->addr);
247 hostap_wds_link_oper(local, sta->addr, WDS_DEL); 243 hostap_wds_link_oper(local, sta->addr, WDS_DEL);
248 } 244 }
249 } else if (sta->timeout_next == STA_NULLFUNC) { 245 } else if (sta->timeout_next == STA_NULLFUNC) {
@@ -259,11 +255,11 @@ static void ap_handle_timer(unsigned long data)
259 } else { 255 } else {
260 int deauth = sta->timeout_next == STA_DEAUTH; 256 int deauth = sta->timeout_next == STA_DEAUTH;
261 __le16 resp; 257 __le16 resp;
262 PDEBUG(DEBUG_AP, "%s: sending %s info to STA %s" 258 PDEBUG(DEBUG_AP, "%s: sending %s info to STA %pM"
263 "(last=%lu, jiffies=%lu)\n", 259 "(last=%lu, jiffies=%lu)\n",
264 local->dev->name, 260 local->dev->name,
265 deauth ? "deauthentication" : "disassociation", 261 deauth ? "deauthentication" : "disassociation",
266 print_mac(mac, sta->addr), sta->last_rx, jiffies); 262 sta->addr, sta->last_rx, jiffies);
267 263
268 resp = cpu_to_le16(deauth ? WLAN_REASON_PREV_AUTH_NOT_VALID : 264 resp = cpu_to_le16(deauth ? WLAN_REASON_PREV_AUTH_NOT_VALID :
269 WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY); 265 WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY);
@@ -275,10 +271,10 @@ static void ap_handle_timer(unsigned long data)
275 271
276 if (sta->timeout_next == STA_DEAUTH) { 272 if (sta->timeout_next == STA_DEAUTH) {
277 if (sta->flags & WLAN_STA_PERM) { 273 if (sta->flags & WLAN_STA_PERM) {
278 PDEBUG(DEBUG_AP, "%s: STA %s" 274 PDEBUG(DEBUG_AP, "%s: STA %pM"
279 " would have been removed, " 275 " would have been removed, "
280 "but it has 'perm' flag\n", 276 "but it has 'perm' flag\n",
281 local->dev->name, print_mac(mac, sta->addr)); 277 local->dev->name, sta->addr);
282 } else 278 } else
283 ap_free_sta(ap, sta); 279 ap_free_sta(ap, sta);
284 return; 280 return;
@@ -332,7 +328,6 @@ static int ap_control_proc_read(char *page, char **start, off_t off,
332 struct ap_data *ap = (struct ap_data *) data; 328 struct ap_data *ap = (struct ap_data *) data;
333 char *policy_txt; 329 char *policy_txt;
334 struct mac_entry *entry; 330 struct mac_entry *entry;
335 DECLARE_MAC_BUF(mac);
336 331
337 if (off != 0) { 332 if (off != 0) {
338 *eof = 1; 333 *eof = 1;
@@ -363,7 +358,7 @@ static int ap_control_proc_read(char *page, char **start, off_t off,
363 break; 358 break;
364 } 359 }
365 360
366 p += sprintf(p, "%s\n", print_mac(mac, entry->addr)); 361 p += sprintf(p, "%pM\n", entry->addr);
367 } 362 }
368 spin_unlock_bh(&ap->mac_restrictions.lock); 363 spin_unlock_bh(&ap->mac_restrictions.lock);
369 364
@@ -520,7 +515,6 @@ static int prism2_ap_proc_read(char *page, char **start, off_t off,
520 struct ap_data *ap = (struct ap_data *) data; 515 struct ap_data *ap = (struct ap_data *) data;
521 struct sta_info *sta; 516 struct sta_info *sta;
522 int i; 517 int i;
523 DECLARE_MAC_BUF(mac);
524 518
525 if (off > PROC_LIMIT) { 519 if (off > PROC_LIMIT) {
526 *eof = 1; 520 *eof = 1;
@@ -533,8 +527,8 @@ static int prism2_ap_proc_read(char *page, char **start, off_t off,
533 if (!sta->ap) 527 if (!sta->ap)
534 continue; 528 continue;
535 529
536 p += sprintf(p, "%s %d %d %d %d '", 530 p += sprintf(p, "%pM %d %d %d %d '",
537 print_mac(mac, sta->addr), 531 sta->addr,
538 sta->u.ap.channel, sta->last_rx_signal, 532 sta->u.ap.channel, sta->last_rx_signal,
539 sta->last_rx_silence, sta->last_rx_rate); 533 sta->last_rx_silence, sta->last_rx_rate);
540 for (i = 0; i < sta->u.ap.ssid_len; i++) 534 for (i = 0; i < sta->u.ap.ssid_len; i++)
@@ -683,11 +677,9 @@ static void hostap_ap_tx_cb_auth(struct sk_buff *skb, int ok, void *data)
683 if (sta) 677 if (sta)
684 atomic_dec(&sta->users); 678 atomic_dec(&sta->users);
685 if (txt) { 679 if (txt) {
686 PDEBUG(DEBUG_AP, "%s: " MAC_FMT " auth_cb - alg=%d " 680 PDEBUG(DEBUG_AP, "%s: %pM auth_cb - alg=%d "
687 "trans#=%d status=%d - %s\n", 681 "trans#=%d status=%d - %s\n",
688 dev->name, 682 dev->name, hdr->addr1,
689 hdr->addr1[0], hdr->addr1[1], hdr->addr1[2],
690 hdr->addr1[3], hdr->addr1[4], hdr->addr1[5],
691 auth_alg, auth_transaction, status, txt); 683 auth_alg, auth_transaction, status, txt);
692 } 684 }
693 dev_kfree_skb(skb); 685 dev_kfree_skb(skb);
@@ -754,11 +746,8 @@ static void hostap_ap_tx_cb_assoc(struct sk_buff *skb, int ok, void *data)
754 if (sta) 746 if (sta)
755 atomic_dec(&sta->users); 747 atomic_dec(&sta->users);
756 if (txt) { 748 if (txt) {
757 PDEBUG(DEBUG_AP, "%s: " MAC_FMT " assoc_cb - %s\n", 749 PDEBUG(DEBUG_AP, "%s: %pM assoc_cb - %s\n",
758 dev->name, 750 dev->name, hdr->addr1, txt);
759 hdr->addr1[0], hdr->addr1[1], hdr->addr1[2],
760 hdr->addr1[3], hdr->addr1[4], hdr->addr1[5],
761 txt);
762 } 751 }
763 dev_kfree_skb(skb); 752 dev_kfree_skb(skb);
764} 753}
@@ -781,11 +770,9 @@ static void hostap_ap_tx_cb_poll(struct sk_buff *skb, int ok, void *data)
781 sta->flags &= ~WLAN_STA_PENDING_POLL; 770 sta->flags &= ~WLAN_STA_PENDING_POLL;
782 spin_unlock(&ap->sta_table_lock); 771 spin_unlock(&ap->sta_table_lock);
783 } else { 772 } else {
784 PDEBUG(DEBUG_AP, "%s: STA " MAC_FMT 773 PDEBUG(DEBUG_AP,
785 " did not ACK activity poll frame\n", 774 "%s: STA %pM did not ACK activity poll frame\n",
786 ap->local->dev->name, 775 ap->local->dev->name, hdr->addr1);
787 hdr->addr1[0], hdr->addr1[1], hdr->addr1[2],
788 hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]);
789 } 776 }
790 777
791 fail: 778 fail:
@@ -1002,7 +989,6 @@ static int prism2_sta_proc_read(char *page, char **start, off_t off,
1002 char *p = page; 989 char *p = page;
1003 struct sta_info *sta = (struct sta_info *) data; 990 struct sta_info *sta = (struct sta_info *) data;
1004 int i; 991 int i;
1005 DECLARE_MAC_BUF(mac);
1006 992
1007 /* FIX: possible race condition.. the STA data could have just expired, 993 /* FIX: possible race condition.. the STA data could have just expired,
1008 * but proc entry was still here so that the read could have started; 994 * but proc entry was still here so that the read could have started;
@@ -1013,11 +999,11 @@ static int prism2_sta_proc_read(char *page, char **start, off_t off,
1013 return 0; 999 return 0;
1014 } 1000 }
1015 1001
1016 p += sprintf(p, "%s=%s\nusers=%d\naid=%d\n" 1002 p += sprintf(p, "%s=%pM\nusers=%d\naid=%d\n"
1017 "flags=0x%04x%s%s%s%s%s%s%s\n" 1003 "flags=0x%04x%s%s%s%s%s%s%s\n"
1018 "capability=0x%02x\nlisten_interval=%d\nsupported_rates=", 1004 "capability=0x%02x\nlisten_interval=%d\nsupported_rates=",
1019 sta->ap ? "AP" : "STA", 1005 sta->ap ? "AP" : "STA",
1020 print_mac(mac, sta->addr), atomic_read(&sta->users), sta->aid, 1006 sta->addr, atomic_read(&sta->users), sta->aid,
1021 sta->flags, 1007 sta->flags,
1022 sta->flags & WLAN_STA_AUTH ? " AUTH" : "", 1008 sta->flags & WLAN_STA_AUTH ? " AUTH" : "",
1023 sta->flags & WLAN_STA_ASSOC ? " ASSOC" : "", 1009 sta->flags & WLAN_STA_ASSOC ? " ASSOC" : "",
@@ -1078,7 +1064,6 @@ static void handle_add_proc_queue(struct work_struct *work)
1078 struct sta_info *sta; 1064 struct sta_info *sta;
1079 char name[20]; 1065 char name[20];
1080 struct add_sta_proc_data *entry, *prev; 1066 struct add_sta_proc_data *entry, *prev;
1081 DECLARE_MAC_BUF(mac);
1082 1067
1083 entry = ap->add_sta_proc_entries; 1068 entry = ap->add_sta_proc_entries;
1084 ap->add_sta_proc_entries = NULL; 1069 ap->add_sta_proc_entries = NULL;
@@ -1091,7 +1076,7 @@ static void handle_add_proc_queue(struct work_struct *work)
1091 spin_unlock_bh(&ap->sta_table_lock); 1076 spin_unlock_bh(&ap->sta_table_lock);
1092 1077
1093 if (sta) { 1078 if (sta) {
1094 sprintf(name, "%s", print_mac(mac, sta->addr)); 1079 sprintf(name, "%pM", sta->addr);
1095 sta->proc = create_proc_read_entry( 1080 sta->proc = create_proc_read_entry(
1096 name, 0, ap->proc, 1081 name, 0, ap->proc,
1097 prism2_sta_proc_read, sta); 1082 prism2_sta_proc_read, sta);
@@ -1318,9 +1303,7 @@ static void handle_authen(local_info_t *local, struct sk_buff *skb,
1318 1303
1319 if (len < 6) { 1304 if (len < 6) {
1320 PDEBUG(DEBUG_AP, "%s: handle_authen - too short payload " 1305 PDEBUG(DEBUG_AP, "%s: handle_authen - too short payload "
1321 "(len=%d) from " MAC_FMT "\n", dev->name, len, 1306 "(len=%d) from %pM\n", dev->name, len, hdr->addr2);
1322 hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
1323 hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
1324 return; 1307 return;
1325 } 1308 }
1326 1309
@@ -1385,10 +1368,8 @@ static void handle_authen(local_info_t *local, struct sk_buff *skb,
1385 if (time_after(jiffies, sta->u.ap.last_beacon + 1368 if (time_after(jiffies, sta->u.ap.last_beacon +
1386 (10 * sta->listen_interval * HZ) / 1024)) { 1369 (10 * sta->listen_interval * HZ) / 1024)) {
1387 PDEBUG(DEBUG_AP, "%s: no beacons received for a while," 1370 PDEBUG(DEBUG_AP, "%s: no beacons received for a while,"
1388 " assuming AP " MAC_FMT " is now STA\n", 1371 " assuming AP %pM is now STA\n",
1389 dev->name, 1372 dev->name, sta->addr);
1390 sta->addr[0], sta->addr[1], sta->addr[2],
1391 sta->addr[3], sta->addr[4], sta->addr[5]);
1392 sta->ap = 0; 1373 sta->ap = 0;
1393 sta->flags = 0; 1374 sta->flags = 0;
1394 sta->u.sta.challenge = NULL; 1375 sta->u.sta.challenge = NULL;
@@ -1503,11 +1484,9 @@ static void handle_authen(local_info_t *local, struct sk_buff *skb,
1503 } 1484 }
1504 1485
1505 if (resp) { 1486 if (resp) {
1506 PDEBUG(DEBUG_AP, "%s: " MAC_FMT " auth (alg=%d " 1487 PDEBUG(DEBUG_AP, "%s: %pM auth (alg=%d "
1507 "trans#=%d stat=%d len=%d fc=%04x) ==> %d (%s)\n", 1488 "trans#=%d stat=%d len=%d fc=%04x) ==> %d (%s)\n",
1508 dev->name, 1489 dev->name, hdr->addr2,
1509 hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
1510 hdr->addr2[3], hdr->addr2[4], hdr->addr2[5],
1511 auth_alg, auth_transaction, status_code, len, 1490 auth_alg, auth_transaction, status_code, len,
1512 fc, resp, txt); 1491 fc, resp, txt);
1513 } 1492 }
@@ -1533,10 +1512,8 @@ static void handle_assoc(local_info_t *local, struct sk_buff *skb,
1533 1512
1534 if (len < (reassoc ? 10 : 4)) { 1513 if (len < (reassoc ? 10 : 4)) {
1535 PDEBUG(DEBUG_AP, "%s: handle_assoc - too short payload " 1514 PDEBUG(DEBUG_AP, "%s: handle_assoc - too short payload "
1536 "(len=%d, reassoc=%d) from " MAC_FMT "\n", 1515 "(len=%d, reassoc=%d) from %pM\n",
1537 dev->name, len, reassoc, 1516 dev->name, len, reassoc, hdr->addr2);
1538 hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
1539 hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
1540 return; 1517 return;
1541 } 1518 }
1542 1519
@@ -1613,12 +1590,9 @@ static void handle_assoc(local_info_t *local, struct sk_buff *skb,
1613 } 1590 }
1614 1591
1615 if (left > 0) { 1592 if (left > 0) {
1616 PDEBUG(DEBUG_AP, "%s: assoc from " MAC_FMT 1593 PDEBUG(DEBUG_AP, "%s: assoc from %pM"
1617 " with extra data (%d bytes) [", 1594 " with extra data (%d bytes) [",
1618 dev->name, 1595 dev->name, hdr->addr2, left);
1619 hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
1620 hdr->addr2[3], hdr->addr2[4], hdr->addr2[5],
1621 left);
1622 while (left > 0) { 1596 while (left > 0) {
1623 PDEBUG2(DEBUG_AP, "<%02x>", *u); 1597 PDEBUG2(DEBUG_AP, "<%02x>", *u);
1624 u++; left--; 1598 u++; left--;
@@ -1717,14 +1691,12 @@ static void handle_assoc(local_info_t *local, struct sk_buff *skb,
1717 } 1691 }
1718 1692
1719#if 0 1693#if 0
1720 PDEBUG(DEBUG_AP, "%s: " MAC_FMT" %sassoc (len=%d " 1694 PDEBUG(DEBUG_AP, "%s: %pM %sassoc (len=%d "
1721 "prev_ap=" MAC_FMT") => %d(%d) (%s)\n", 1695 "prev_ap=%pM) => %d(%d) (%s)\n",
1722 dev->name, 1696 dev->name,
1723 hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], 1697 hdr->addr2,
1724 hdr->addr2[3], hdr->addr2[4], hdr->addr2[5],
1725 reassoc ? "re" : "", len, 1698 reassoc ? "re" : "", len,
1726 prev_ap[0], prev_ap[1], prev_ap[2], 1699 prev_ap,
1727 prev_ap[3], prev_ap[4], prev_ap[5],
1728 resp, send_deauth, txt); 1700 resp, send_deauth, txt);
1729#endif 1701#endif
1730} 1702}
@@ -1741,7 +1713,6 @@ static void handle_deauth(local_info_t *local, struct sk_buff *skb,
1741 u16 reason_code; 1713 u16 reason_code;
1742 __le16 *pos; 1714 __le16 *pos;
1743 struct sta_info *sta = NULL; 1715 struct sta_info *sta = NULL;
1744 DECLARE_MAC_BUF(mac);
1745 1716
1746 len = skb->len - IEEE80211_MGMT_HDR_LEN; 1717 len = skb->len - IEEE80211_MGMT_HDR_LEN;
1747 1718
@@ -1753,10 +1724,8 @@ static void handle_deauth(local_info_t *local, struct sk_buff *skb,
1753 pos = (__le16 *) body; 1724 pos = (__le16 *) body;
1754 reason_code = le16_to_cpu(*pos); 1725 reason_code = le16_to_cpu(*pos);
1755 1726
1756 PDEBUG(DEBUG_AP, "%s: deauthentication: " MAC_FMT " len=%d, " 1727 PDEBUG(DEBUG_AP, "%s: deauthentication: %pM len=%d, "
1757 "reason_code=%d\n", dev->name, 1728 "reason_code=%d\n", dev->name, hdr->addr2,
1758 hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
1759 hdr->addr2[3], hdr->addr2[4], hdr->addr2[5],
1760 len, reason_code); 1729 len, reason_code);
1761 1730
1762 spin_lock_bh(&local->ap->sta_table_lock); 1731 spin_lock_bh(&local->ap->sta_table_lock);
@@ -1768,11 +1737,9 @@ static void handle_deauth(local_info_t *local, struct sk_buff *skb,
1768 } 1737 }
1769 spin_unlock_bh(&local->ap->sta_table_lock); 1738 spin_unlock_bh(&local->ap->sta_table_lock);
1770 if (sta == NULL) { 1739 if (sta == NULL) {
1771 printk("%s: deauthentication from " MAC_FMT ", " 1740 printk("%s: deauthentication from %pM, "
1772 "reason_code=%d, but STA not authenticated\n", dev->name, 1741 "reason_code=%d, but STA not authenticated\n", dev->name,
1773 hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], 1742 hdr->addr2, reason_code);
1774 hdr->addr2[3], hdr->addr2[4], hdr->addr2[5],
1775 reason_code);
1776 } 1743 }
1777} 1744}
1778 1745
@@ -1799,10 +1766,8 @@ static void handle_disassoc(local_info_t *local, struct sk_buff *skb,
1799 pos = (__le16 *) body; 1766 pos = (__le16 *) body;
1800 reason_code = le16_to_cpu(*pos); 1767 reason_code = le16_to_cpu(*pos);
1801 1768
1802 PDEBUG(DEBUG_AP, "%s: disassociation: " MAC_FMT " len=%d, " 1769 PDEBUG(DEBUG_AP, "%s: disassociation: %pM len=%d, "
1803 "reason_code=%d\n", dev->name, 1770 "reason_code=%d\n", dev->name, hdr->addr2,
1804 hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
1805 hdr->addr2[3], hdr->addr2[4], hdr->addr2[5],
1806 len, reason_code); 1771 len, reason_code);
1807 1772
1808 spin_lock_bh(&local->ap->sta_table_lock); 1773 spin_lock_bh(&local->ap->sta_table_lock);
@@ -1814,12 +1779,9 @@ static void handle_disassoc(local_info_t *local, struct sk_buff *skb,
1814 } 1779 }
1815 spin_unlock_bh(&local->ap->sta_table_lock); 1780 spin_unlock_bh(&local->ap->sta_table_lock);
1816 if (sta == NULL) { 1781 if (sta == NULL) {
1817 printk("%s: disassociation from " MAC_FMT ", " 1782 printk("%s: disassociation from %pM, "
1818 "reason_code=%d, but STA not authenticated\n", 1783 "reason_code=%d, but STA not authenticated\n",
1819 dev->name, 1784 dev->name, hdr->addr2, reason_code);
1820 hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
1821 hdr->addr2[3], hdr->addr2[4], hdr->addr2[5],
1822 reason_code);
1823 } 1785 }
1824} 1786}
1825 1787
@@ -1909,19 +1871,14 @@ static void handle_pspoll(local_info_t *local,
1909 u16 aid; 1871 u16 aid;
1910 struct sk_buff *skb; 1872 struct sk_buff *skb;
1911 1873
1912 PDEBUG(DEBUG_PS2, "handle_pspoll: BSSID=" MAC_FMT 1874 PDEBUG(DEBUG_PS2, "handle_pspoll: BSSID=%pM, TA=%pM PWRMGT=%d\n",
1913 ", TA=" MAC_FMT " PWRMGT=%d\n", 1875 hdr->addr1, hdr->addr2,
1914 hdr->addr1[0], hdr->addr1[1], hdr->addr1[2],
1915 hdr->addr1[3], hdr->addr1[4], hdr->addr1[5],
1916 hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
1917 hdr->addr2[3], hdr->addr2[4], hdr->addr2[5],
1918 !!(le16_to_cpu(hdr->frame_ctl) & IEEE80211_FCTL_PM)); 1876 !!(le16_to_cpu(hdr->frame_ctl) & IEEE80211_FCTL_PM));
1919 1877
1920 if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) { 1878 if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) {
1921 PDEBUG(DEBUG_AP, "handle_pspoll - addr1(BSSID)=" MAC_FMT 1879 PDEBUG(DEBUG_AP,
1922 " not own MAC\n", 1880 "handle_pspoll - addr1(BSSID)=%pM not own MAC\n",
1923 hdr->addr1[0], hdr->addr1[1], hdr->addr1[2], 1881 hdr->addr1);
1924 hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]);
1925 return; 1882 return;
1926 } 1883 }
1927 1884
@@ -2007,11 +1964,10 @@ static void handle_wds_oper_queue(struct work_struct *work)
2007 1964
2008 while (entry) { 1965 while (entry) {
2009 PDEBUG(DEBUG_AP, "%s: %s automatic WDS connection " 1966 PDEBUG(DEBUG_AP, "%s: %s automatic WDS connection "
2010 "to AP " MAC_FMT "\n", 1967 "to AP %pM\n",
2011 local->dev->name, 1968 local->dev->name,
2012 entry->type == WDS_ADD ? "adding" : "removing", 1969 entry->type == WDS_ADD ? "adding" : "removing",
2013 entry->addr[0], entry->addr[1], entry->addr[2], 1970 entry->addr);
2014 entry->addr[3], entry->addr[4], entry->addr[5]);
2015 if (entry->type == WDS_ADD) 1971 if (entry->type == WDS_ADD)
2016 prism2_wds_add(local, entry->addr, 0); 1972 prism2_wds_add(local, entry->addr, 0);
2017 else if (entry->type == WDS_DEL) 1973 else if (entry->type == WDS_DEL)
@@ -2215,10 +2171,8 @@ static void handle_ap_item(local_info_t *local, struct sk_buff *skb,
2215 } 2171 }
2216 2172
2217 if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) { 2173 if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) {
2218 PDEBUG(DEBUG_AP, "handle_ap_item - addr1(BSSID)=" 2174 PDEBUG(DEBUG_AP, "handle_ap_item - addr1(BSSID)=%pM"
2219 MAC_FMT " not own MAC\n", 2175 " not own MAC\n", hdr->addr1);
2220 hdr->addr1[0], hdr->addr1[1], hdr->addr1[2],
2221 hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]);
2222 goto done; 2176 goto done;
2223 } 2177 }
2224 2178
@@ -2254,18 +2208,14 @@ static void handle_ap_item(local_info_t *local, struct sk_buff *skb,
2254 } 2208 }
2255 2209
2256 if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) { 2210 if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) {
2257 PDEBUG(DEBUG_AP, "handle_ap_item - addr1(DA)=" MAC_FMT 2211 PDEBUG(DEBUG_AP, "handle_ap_item - addr1(DA)=%pM"
2258 " not own MAC\n", 2212 " not own MAC\n", hdr->addr1);
2259 hdr->addr1[0], hdr->addr1[1], hdr->addr1[2],
2260 hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]);
2261 goto done; 2213 goto done;
2262 } 2214 }
2263 2215
2264 if (memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN)) { 2216 if (memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN)) {
2265 PDEBUG(DEBUG_AP, "handle_ap_item - addr3(BSSID)=" MAC_FMT 2217 PDEBUG(DEBUG_AP, "handle_ap_item - addr3(BSSID)=%pM"
2266 " not own MAC\n", 2218 " not own MAC\n", hdr->addr3);
2267 hdr->addr3[0], hdr->addr3[1], hdr->addr3[2],
2268 hdr->addr3[3], hdr->addr3[4], hdr->addr3[5]);
2269 goto done; 2219 goto done;
2270 } 2220 }
2271 2221
@@ -2366,10 +2316,9 @@ static void schedule_packet_send(local_info_t *local, struct sta_info *sta)
2366 memcpy(hdr->addr2, sta->addr, ETH_ALEN); 2316 memcpy(hdr->addr2, sta->addr, ETH_ALEN);
2367 hdr->duration_id = cpu_to_le16(sta->aid | BIT(15) | BIT(14)); 2317 hdr->duration_id = cpu_to_le16(sta->aid | BIT(15) | BIT(14));
2368 2318
2369 PDEBUG(DEBUG_PS2, "%s: Scheduling buffered packet delivery for STA " 2319 PDEBUG(DEBUG_PS2,
2370 MAC_FMT "\n", local->dev->name, 2320 "%s: Scheduling buffered packet delivery for STA %pM\n",
2371 sta->addr[0], sta->addr[1], sta->addr[2], 2321 local->dev->name, sta->addr);
2372 sta->addr[3], sta->addr[4], sta->addr[5]);
2373 2322
2374 skb->dev = local->dev; 2323 skb->dev = local->dev;
2375 2324
@@ -2723,12 +2672,8 @@ static int ap_update_sta_tx_rate(struct sta_info *sta, struct net_device *dev)
2723 case 3: sta->tx_rate = 110; break; 2672 case 3: sta->tx_rate = 110; break;
2724 default: sta->tx_rate = 0; break; 2673 default: sta->tx_rate = 0; break;
2725 } 2674 }
2726 PDEBUG(DEBUG_AP, "%s: STA " MAC_FMT 2675 PDEBUG(DEBUG_AP, "%s: STA %pM TX rate raised to %d\n",
2727 " TX rate raised to %d\n", 2676 dev->name, sta->addr, sta->tx_rate);
2728 dev->name,
2729 sta->addr[0], sta->addr[1], sta->addr[2],
2730 sta->addr[3], sta->addr[4], sta->addr[5],
2731 sta->tx_rate);
2732 } 2677 }
2733 sta->tx_since_last_failure = 0; 2678 sta->tx_since_last_failure = 0;
2734 } 2679 }
@@ -2781,9 +2726,7 @@ ap_tx_ret hostap_handle_sta_tx(local_info_t *local, struct hostap_tx_data *tx)
2781 * print out any errors here. */ 2726 * print out any errors here. */
2782 if (net_ratelimit()) { 2727 if (net_ratelimit()) {
2783 printk(KERN_DEBUG "AP: drop packet to non-associated " 2728 printk(KERN_DEBUG "AP: drop packet to non-associated "
2784 "STA " MAC_FMT "\n", 2729 "STA %pM\n", hdr->addr1);
2785 hdr->addr1[0], hdr->addr1[1], hdr->addr1[2],
2786 hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]);
2787 } 2730 }
2788#endif 2731#endif
2789 local->ap->tx_drop_nonassoc++; 2732 local->ap->tx_drop_nonassoc++;
@@ -2821,11 +2764,9 @@ ap_tx_ret hostap_handle_sta_tx(local_info_t *local, struct hostap_tx_data *tx)
2821 } 2764 }
2822 2765
2823 if (skb_queue_len(&sta->tx_buf) >= STA_MAX_TX_BUFFER) { 2766 if (skb_queue_len(&sta->tx_buf) >= STA_MAX_TX_BUFFER) {
2824 PDEBUG(DEBUG_PS, "%s: No more space in STA (" MAC_FMT 2767 PDEBUG(DEBUG_PS, "%s: No more space in STA (%pM)'s"
2825 ")'s PS mode buffer\n", 2768 "PS mode buffer\n",
2826 local->dev->name, 2769 local->dev->name, sta->addr);
2827 sta->addr[0], sta->addr[1], sta->addr[2],
2828 sta->addr[3], sta->addr[4], sta->addr[5]);
2829 /* Make sure that TIM is set for the station (it might not be 2770 /* Make sure that TIM is set for the station (it might not be
2830 * after AP wlan hw reset). */ 2771 * after AP wlan hw reset). */
2831 /* FIX: should fix hw reset to restore bits based on STA 2772 /* FIX: should fix hw reset to restore bits based on STA
@@ -2897,12 +2838,9 @@ void hostap_handle_sta_tx_exc(local_info_t *local, struct sk_buff *skb)
2897 sta = ap_get_sta(local->ap, hdr->addr1); 2838 sta = ap_get_sta(local->ap, hdr->addr1);
2898 if (!sta) { 2839 if (!sta) {
2899 spin_unlock(&local->ap->sta_table_lock); 2840 spin_unlock(&local->ap->sta_table_lock);
2900 PDEBUG(DEBUG_AP, "%s: Could not find STA " MAC_FMT 2841 PDEBUG(DEBUG_AP, "%s: Could not find STA %pM"
2901 " for this TX error (@%lu)\n", 2842 " for this TX error (@%lu)\n",
2902 local->dev->name, 2843 local->dev->name, hdr->addr1, jiffies);
2903 hdr->addr1[0], hdr->addr1[1], hdr->addr1[2],
2904 hdr->addr1[3], hdr->addr1[4], hdr->addr1[5],
2905 jiffies);
2906 return; 2844 return;
2907 } 2845 }
2908 2846
@@ -2929,12 +2867,9 @@ void hostap_handle_sta_tx_exc(local_info_t *local, struct sk_buff *skb)
2929 case 3: sta->tx_rate = 110; break; 2867 case 3: sta->tx_rate = 110; break;
2930 default: sta->tx_rate = 0; break; 2868 default: sta->tx_rate = 0; break;
2931 } 2869 }
2932 PDEBUG(DEBUG_AP, "%s: STA " MAC_FMT 2870 PDEBUG(DEBUG_AP,
2933 " TX rate lowered to %d\n", 2871 "%s: STA %pM TX rate lowered to %d\n",
2934 local->dev->name, 2872 local->dev->name, sta->addr, sta->tx_rate);
2935 sta->addr[0], sta->addr[1], sta->addr[2],
2936 sta->addr[3], sta->addr[4], sta->addr[5],
2937 sta->tx_rate);
2938 } 2873 }
2939 sta->tx_consecutive_exc = 0; 2874 sta->tx_consecutive_exc = 0;
2940 } 2875 }
@@ -2945,17 +2880,16 @@ void hostap_handle_sta_tx_exc(local_info_t *local, struct sk_buff *skb)
2945static void hostap_update_sta_ps2(local_info_t *local, struct sta_info *sta, 2880static void hostap_update_sta_ps2(local_info_t *local, struct sta_info *sta,
2946 int pwrmgt, int type, int stype) 2881 int pwrmgt, int type, int stype)
2947{ 2882{
2948 DECLARE_MAC_BUF(mac);
2949 if (pwrmgt && !(sta->flags & WLAN_STA_PS)) { 2883 if (pwrmgt && !(sta->flags & WLAN_STA_PS)) {
2950 sta->flags |= WLAN_STA_PS; 2884 sta->flags |= WLAN_STA_PS;
2951 PDEBUG(DEBUG_PS2, "STA %s changed to use PS " 2885 PDEBUG(DEBUG_PS2, "STA %pM changed to use PS "
2952 "mode (type=0x%02X, stype=0x%02X)\n", 2886 "mode (type=0x%02X, stype=0x%02X)\n",
2953 print_mac(mac, sta->addr), type >> 2, stype >> 4); 2887 sta->addr, type >> 2, stype >> 4);
2954 } else if (!pwrmgt && (sta->flags & WLAN_STA_PS)) { 2888 } else if (!pwrmgt && (sta->flags & WLAN_STA_PS)) {
2955 sta->flags &= ~WLAN_STA_PS; 2889 sta->flags &= ~WLAN_STA_PS;
2956 PDEBUG(DEBUG_PS2, "STA %s changed to not use " 2890 PDEBUG(DEBUG_PS2, "STA %pM changed to not use "
2957 "PS mode (type=0x%02X, stype=0x%02X)\n", 2891 "PS mode (type=0x%02X, stype=0x%02X)\n",
2958 print_mac(mac, sta->addr), type >> 2, stype >> 4); 2892 sta->addr, type >> 2, stype >> 4);
2959 if (type != IEEE80211_FTYPE_CTL || 2893 if (type != IEEE80211_FTYPE_CTL ||
2960 stype != IEEE80211_STYPE_PSPOLL) 2894 stype != IEEE80211_STYPE_PSPOLL)
2961 schedule_packet_send(local, sta); 2895 schedule_packet_send(local, sta);
@@ -3029,13 +2963,9 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev,
3029#ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT 2963#ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT
3030 } else { 2964 } else {
3031 printk(KERN_DEBUG "%s: dropped received packet" 2965 printk(KERN_DEBUG "%s: dropped received packet"
3032 " from non-associated STA " 2966 " from non-associated STA %pM"
3033 MAC_FMT
3034 " (type=0x%02x, subtype=0x%02x)\n", 2967 " (type=0x%02x, subtype=0x%02x)\n",
3035 dev->name, 2968 dev->name, hdr->addr2,
3036 hdr->addr2[0], hdr->addr2[1],
3037 hdr->addr2[2], hdr->addr2[3],
3038 hdr->addr2[4], hdr->addr2[5],
3039 type >> 2, stype >> 4); 2969 type >> 2, stype >> 4);
3040 hostap_rx(dev, skb, rx_stats); 2970 hostap_rx(dev, skb, rx_stats);
3041#endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ 2971#endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */
@@ -3068,13 +2998,9 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev,
3068 * after being unavailable for some time. Speed up 2998 * after being unavailable for some time. Speed up
3069 * re-association by informing the station about it not 2999 * re-association by informing the station about it not
3070 * being associated. */ 3000 * being associated. */
3071 printk(KERN_DEBUG "%s: rejected received nullfunc " 3001 printk(KERN_DEBUG "%s: rejected received nullfunc frame"
3072 "frame without ToDS from not associated STA " 3002 " without ToDS from not associated STA %pM\n",
3073 MAC_FMT "\n", 3003 dev->name, hdr->addr2);
3074 dev->name,
3075 hdr->addr2[0], hdr->addr2[1],
3076 hdr->addr2[2], hdr->addr2[3],
3077 hdr->addr2[4], hdr->addr2[5]);
3078 hostap_rx(dev, skb, rx_stats); 3004 hostap_rx(dev, skb, rx_stats);
3079#endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ 3005#endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */
3080 } 3006 }
@@ -3090,13 +3016,10 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev,
3090 * broadcast frame from an IBSS network. Drop it silently. 3016 * broadcast frame from an IBSS network. Drop it silently.
3091 * If BSSID is own, report the dropping of this frame. */ 3017 * If BSSID is own, report the dropping of this frame. */
3092 if (memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN) == 0) { 3018 if (memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN) == 0) {
3093 printk(KERN_DEBUG "%s: dropped received packet from " 3019 printk(KERN_DEBUG "%s: dropped received packet from %pM"
3094 MAC_FMT " with no ToDS flag " 3020 " with no ToDS flag "
3095 "(type=0x%02x, subtype=0x%02x)\n", dev->name, 3021 "(type=0x%02x, subtype=0x%02x)\n", dev->name,
3096 hdr->addr2[0], hdr->addr2[1], 3022 hdr->addr2, type >> 2, stype >> 4);
3097 hdr->addr2[2], hdr->addr2[3],
3098 hdr->addr2[4], hdr->addr2[5],
3099 type >> 2, stype >> 4);
3100 hostap_dump_rx_80211(dev->name, skb, rx_stats); 3023 hostap_dump_rx_80211(dev->name, skb, rx_stats);
3101 } 3024 }
3102 ret = AP_RX_DROP; 3025 ret = AP_RX_DROP;
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c
index 3153fe9d7ce0..fd7f7ceeac46 100644
--- a/drivers/net/wireless/hostap/hostap_hw.c
+++ b/drivers/net/wireless/hostap/hostap_hw.c
@@ -2335,10 +2335,6 @@ static void prism2_txexc(local_info_t *local)
2335 int show_dump, res; 2335 int show_dump, res;
2336 char *payload = NULL; 2336 char *payload = NULL;
2337 struct hfa384x_tx_frame txdesc; 2337 struct hfa384x_tx_frame txdesc;
2338 DECLARE_MAC_BUF(mac);
2339 DECLARE_MAC_BUF(mac2);
2340 DECLARE_MAC_BUF(mac3);
2341 DECLARE_MAC_BUF(mac4);
2342 2338
2343 show_dump = local->frame_dump & PRISM2_DUMP_TXEXC_HDR; 2339 show_dump = local->frame_dump & PRISM2_DUMP_TXEXC_HDR;
2344 local->stats.tx_errors++; 2340 local->stats.tx_errors++;
@@ -2404,9 +2400,9 @@ static void prism2_txexc(local_info_t *local)
2404 WLAN_FC_GET_STYPE(fc) >> 4, 2400 WLAN_FC_GET_STYPE(fc) >> 4,
2405 fc & IEEE80211_FCTL_TODS ? " ToDS" : "", 2401 fc & IEEE80211_FCTL_TODS ? " ToDS" : "",
2406 fc & IEEE80211_FCTL_FROMDS ? " FromDS" : ""); 2402 fc & IEEE80211_FCTL_FROMDS ? " FromDS" : "");
2407 PDEBUG(DEBUG_EXTRA, " A1=%s A2=%s A3=%s A4=%s\n", 2403 PDEBUG(DEBUG_EXTRA, " A1=%pM A2=%pM A3=%pM A4=%pM\n",
2408 print_mac(mac, txdesc.addr1), print_mac(mac2, txdesc.addr2), 2404 txdesc.addr1, txdesc.addr2,
2409 print_mac(mac3, txdesc.addr3), print_mac(mac4, txdesc.addr4)); 2405 txdesc.addr3, txdesc.addr4);
2410} 2406}
2411 2407
2412 2408
diff --git a/drivers/net/wireless/hostap/hostap_info.c b/drivers/net/wireless/hostap/hostap_info.c
index 7cd3fb79230e..99b4cf41edf2 100644
--- a/drivers/net/wireless/hostap/hostap_info.c
+++ b/drivers/net/wireless/hostap/hostap_info.c
@@ -166,7 +166,6 @@ static void prism2_host_roaming(local_info_t *local)
166 struct hfa384x_hostscan_result *selected, *entry; 166 struct hfa384x_hostscan_result *selected, *entry;
167 int i; 167 int i;
168 unsigned long flags; 168 unsigned long flags;
169 DECLARE_MAC_BUF(mac);
170 169
171 if (local->last_join_time && 170 if (local->last_join_time &&
172 time_before(jiffies, local->last_join_time + 10 * HZ)) { 171 time_before(jiffies, local->last_join_time + 10 * HZ)) {
@@ -199,9 +198,8 @@ static void prism2_host_roaming(local_info_t *local)
199 local->preferred_ap[2] || local->preferred_ap[3] || 198 local->preferred_ap[2] || local->preferred_ap[3] ||
200 local->preferred_ap[4] || local->preferred_ap[5]) { 199 local->preferred_ap[4] || local->preferred_ap[5]) {
201 /* Try to find preferred AP */ 200 /* Try to find preferred AP */
202 PDEBUG(DEBUG_EXTRA, "%s: Preferred AP BSSID " 201 PDEBUG(DEBUG_EXTRA, "%s: Preferred AP BSSID %pM\n",
203 "%s\n", 202 dev->name, local->preferred_ap);
204 dev->name, print_mac(mac, local->preferred_ap));
205 for (i = 0; i < local->last_scan_results_count; i++) { 203 for (i = 0; i < local->last_scan_results_count; i++) {
206 entry = &local->last_scan_results[i]; 204 entry = &local->last_scan_results[i];
207 if (memcmp(local->preferred_ap, entry->bssid, 6) == 0) 205 if (memcmp(local->preferred_ap, entry->bssid, 6) == 0)
@@ -218,9 +216,9 @@ static void prism2_host_roaming(local_info_t *local)
218 req.channel = selected->chid; 216 req.channel = selected->chid;
219 spin_unlock_irqrestore(&local->lock, flags); 217 spin_unlock_irqrestore(&local->lock, flags);
220 218
221 PDEBUG(DEBUG_EXTRA, "%s: JoinRequest: BSSID=%s" 219 PDEBUG(DEBUG_EXTRA, "%s: JoinRequest: BSSID=%pM"
222 " channel=%d\n", 220 " channel=%d\n",
223 dev->name, print_mac(mac, req.bssid), le16_to_cpu(req.channel)); 221 dev->name, req.bssid, le16_to_cpu(req.channel));
224 if (local->func->set_rid(dev, HFA384X_RID_JOINREQUEST, &req, 222 if (local->func->set_rid(dev, HFA384X_RID_JOINREQUEST, &req,
225 sizeof(req))) { 223 sizeof(req))) {
226 printk(KERN_DEBUG "%s: JoinRequest failed\n", dev->name); 224 printk(KERN_DEBUG "%s: JoinRequest failed\n", dev->name);
@@ -413,7 +411,6 @@ static void handle_info_queue_linkstatus(local_info_t *local)
413 int val = local->prev_link_status; 411 int val = local->prev_link_status;
414 int connected; 412 int connected;
415 union iwreq_data wrqu; 413 union iwreq_data wrqu;
416 DECLARE_MAC_BUF(mac);
417 414
418 connected = 415 connected =
419 val == HFA384X_LINKSTATUS_CONNECTED || 416 val == HFA384X_LINKSTATUS_CONNECTED ||
@@ -425,10 +422,9 @@ static void handle_info_queue_linkstatus(local_info_t *local)
425 printk(KERN_DEBUG "%s: could not read CURRENTBSSID after " 422 printk(KERN_DEBUG "%s: could not read CURRENTBSSID after "
426 "LinkStatus event\n", local->dev->name); 423 "LinkStatus event\n", local->dev->name);
427 } else { 424 } else {
428 PDEBUG(DEBUG_EXTRA, "%s: LinkStatus: BSSID=" 425 PDEBUG(DEBUG_EXTRA, "%s: LinkStatus: BSSID=%pM\n",
429 "%s\n",
430 local->dev->name, 426 local->dev->name,
431 print_mac(mac, (unsigned char *) local->bssid)); 427 (unsigned char *) local->bssid);
432 if (local->wds_type & HOSTAP_WDS_AP_CLIENT) 428 if (local->wds_type & HOSTAP_WDS_AP_CLIENT)
433 hostap_add_sta(local->ap, local->bssid); 429 hostap_add_sta(local->ap, local->bssid);
434 } 430 }
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
index 3f8b1d7036e5..2318c5df7a08 100644
--- a/drivers/net/wireless/hostap/hostap_ioctl.c
+++ b/drivers/net/wireless/hostap/hostap_ioctl.c
@@ -664,7 +664,6 @@ static int hostap_join_ap(struct net_device *dev)
664 unsigned long flags; 664 unsigned long flags;
665 int i; 665 int i;
666 struct hfa384x_hostscan_result *entry; 666 struct hfa384x_hostscan_result *entry;
667 DECLARE_MAC_BUF(mac);
668 667
669 iface = netdev_priv(dev); 668 iface = netdev_priv(dev);
670 local = iface->local; 669 local = iface->local;
@@ -686,14 +685,13 @@ static int hostap_join_ap(struct net_device *dev)
686 685
687 if (local->func->set_rid(dev, HFA384X_RID_JOINREQUEST, &req, 686 if (local->func->set_rid(dev, HFA384X_RID_JOINREQUEST, &req,
688 sizeof(req))) { 687 sizeof(req))) {
689 printk(KERN_DEBUG "%s: JoinRequest %s" 688 printk(KERN_DEBUG "%s: JoinRequest %pM failed\n",
690 " failed\n", 689 dev->name, local->preferred_ap);
691 dev->name, print_mac(mac, local->preferred_ap));
692 return -1; 690 return -1;
693 } 691 }
694 692
695 printk(KERN_DEBUG "%s: Trying to join BSSID %s\n", 693 printk(KERN_DEBUG "%s: Trying to join BSSID %pM\n",
696 dev->name, print_mac(mac, local->preferred_ap)); 694 dev->name, local->preferred_ap);
697 695
698 return 0; 696 return 0;
699} 697}
@@ -3701,10 +3699,8 @@ static int prism2_ioctl_set_assoc_ap_addr(local_info_t *local,
3701 struct prism2_hostapd_param *param, 3699 struct prism2_hostapd_param *param,
3702 int param_len) 3700 int param_len)
3703{ 3701{
3704 DECLARE_MAC_BUF(mac); 3702 printk(KERN_DEBUG "%ssta: associated as client with AP %pM\n",
3705 printk(KERN_DEBUG "%ssta: associated as client with AP " 3703 local->dev->name, param->sta_addr);
3706 "%s\n",
3707 local->dev->name, print_mac(mac, param->sta_addr));
3708 memcpy(local->assoc_ap_addr, param->sta_addr, ETH_ALEN); 3704 memcpy(local->assoc_ap_addr, param->sta_addr, ETH_ALEN);
3709 return 0; 3705 return 0;
3710} 3706}
diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c
index 756ab56c1f40..4c36eb2fafd1 100644
--- a/drivers/net/wireless/hostap/hostap_main.c
+++ b/drivers/net/wireless/hostap/hostap_main.c
@@ -530,10 +530,6 @@ int hostap_set_auth_algs(local_info_t *local)
530void hostap_dump_rx_header(const char *name, const struct hfa384x_rx_frame *rx) 530void hostap_dump_rx_header(const char *name, const struct hfa384x_rx_frame *rx)
531{ 531{
532 u16 status, fc; 532 u16 status, fc;
533 DECLARE_MAC_BUF(mac);
534 DECLARE_MAC_BUF(mac2);
535 DECLARE_MAC_BUF(mac3);
536 DECLARE_MAC_BUF(mac4);
537 533
538 status = __le16_to_cpu(rx->status); 534 status = __le16_to_cpu(rx->status);
539 535
@@ -552,12 +548,11 @@ void hostap_dump_rx_header(const char *name, const struct hfa384x_rx_frame *rx)
552 fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "", 548 fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "",
553 fc & IEEE80211_FCTL_FROMDS ? " [FromDS]" : ""); 549 fc & IEEE80211_FCTL_FROMDS ? " [FromDS]" : "");
554 550
555 printk(KERN_DEBUG " A1=%s A2=%s A3=%s A4=%s\n", 551 printk(KERN_DEBUG " A1=%pM A2=%pM A3=%pM A4=%pM\n",
556 print_mac(mac, rx->addr1), print_mac(mac2, rx->addr2), 552 rx->addr1, rx->addr2, rx->addr3, rx->addr4);
557 print_mac(mac3, rx->addr3), print_mac(mac4, rx->addr4));
558 553
559 printk(KERN_DEBUG " dst=%s src=%s len=%d\n", 554 printk(KERN_DEBUG " dst=%pM src=%pM len=%d\n",
560 print_mac(mac, rx->dst_addr), print_mac(mac2, rx->src_addr), 555 rx->dst_addr, rx->src_addr,
561 __be16_to_cpu(rx->len)); 556 __be16_to_cpu(rx->len));
562} 557}
563 558
@@ -565,10 +560,6 @@ void hostap_dump_rx_header(const char *name, const struct hfa384x_rx_frame *rx)
565void hostap_dump_tx_header(const char *name, const struct hfa384x_tx_frame *tx) 560void hostap_dump_tx_header(const char *name, const struct hfa384x_tx_frame *tx)
566{ 561{
567 u16 fc; 562 u16 fc;
568 DECLARE_MAC_BUF(mac);
569 DECLARE_MAC_BUF(mac2);
570 DECLARE_MAC_BUF(mac3);
571 DECLARE_MAC_BUF(mac4);
572 563
573 printk(KERN_DEBUG "%s: TX status=0x%04x retry_count=%d tx_rate=%d " 564 printk(KERN_DEBUG "%s: TX status=0x%04x retry_count=%d tx_rate=%d "
574 "tx_control=0x%04x; jiffies=%ld\n", 565 "tx_control=0x%04x; jiffies=%ld\n",
@@ -584,12 +575,11 @@ void hostap_dump_tx_header(const char *name, const struct hfa384x_tx_frame *tx)
584 fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "", 575 fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "",
585 fc & IEEE80211_FCTL_FROMDS ? " [FromDS]" : ""); 576 fc & IEEE80211_FCTL_FROMDS ? " [FromDS]" : "");
586 577
587 printk(KERN_DEBUG " A1=%s A2=%s A3=%s A4=%s\n", 578 printk(KERN_DEBUG " A1=%pM A2=%pM A3=%pM A4=%pM\n",
588 print_mac(mac, tx->addr1), print_mac(mac2, tx->addr2), 579 tx->addr1, tx->addr2, tx->addr3, tx->addr4);
589 print_mac(mac3, tx->addr3), print_mac(mac4, tx->addr4));
590 580
591 printk(KERN_DEBUG " dst=%s src=%s len=%d\n", 581 printk(KERN_DEBUG " dst=%pM src=%pM len=%d\n",
592 print_mac(mac, tx->dst_addr), print_mac(mac2, tx->src_addr), 582 tx->dst_addr, tx->src_addr,
593 __be16_to_cpu(tx->len)); 583 __be16_to_cpu(tx->len));
594} 584}
595 585
diff --git a/drivers/net/wireless/hostap/hostap_proc.c b/drivers/net/wireless/hostap/hostap_proc.c
index b03536008ad9..ae7d3caf3dae 100644
--- a/drivers/net/wireless/hostap/hostap_proc.c
+++ b/drivers/net/wireless/hostap/hostap_proc.c
@@ -106,7 +106,6 @@ static int prism2_wds_proc_read(char *page, char **start, off_t off,
106 local_info_t *local = (local_info_t *) data; 106 local_info_t *local = (local_info_t *) data;
107 struct list_head *ptr; 107 struct list_head *ptr;
108 struct hostap_interface *iface; 108 struct hostap_interface *iface;
109 DECLARE_MAC_BUF(mac);
110 109
111 if (off > PROC_LIMIT) { 110 if (off > PROC_LIMIT) {
112 *eof = 1; 111 *eof = 1;
@@ -118,9 +117,9 @@ static int prism2_wds_proc_read(char *page, char **start, off_t off,
118 iface = list_entry(ptr, struct hostap_interface, list); 117 iface = list_entry(ptr, struct hostap_interface, list);
119 if (iface->type != HOSTAP_INTERFACE_WDS) 118 if (iface->type != HOSTAP_INTERFACE_WDS)
120 continue; 119 continue;
121 p += sprintf(p, "%s\t%s\n", 120 p += sprintf(p, "%s\t%pM\n",
122 iface->dev->name, 121 iface->dev->name,
123 print_mac(mac, iface->u.wds.remote_addr)); 122 iface->u.wds.remote_addr);
124 if ((p - page) > PROC_LIMIT) { 123 if ((p - page) > PROC_LIMIT) {
125 printk(KERN_DEBUG "%s: wds proc did not fit\n", 124 printk(KERN_DEBUG "%s: wds proc did not fit\n",
126 local->dev->name); 125 local->dev->name);
@@ -148,7 +147,6 @@ static int prism2_bss_list_proc_read(char *page, char **start, off_t off,
148 struct list_head *ptr; 147 struct list_head *ptr;
149 struct hostap_bss_info *bss; 148 struct hostap_bss_info *bss;
150 int i; 149 int i;
151 DECLARE_MAC_BUF(mac);
152 150
153 if (off > PROC_LIMIT) { 151 if (off > PROC_LIMIT) {
154 *eof = 1; 152 *eof = 1;
@@ -160,8 +158,8 @@ static int prism2_bss_list_proc_read(char *page, char **start, off_t off,
160 spin_lock_bh(&local->lock); 158 spin_lock_bh(&local->lock);
161 list_for_each(ptr, &local->bss_list) { 159 list_for_each(ptr, &local->bss_list) {
162 bss = list_entry(ptr, struct hostap_bss_info, list); 160 bss = list_entry(ptr, struct hostap_bss_info, list);
163 p += sprintf(p, "%s\t%lu\t%u\t0x%x\t", 161 p += sprintf(p, "%pM\t%lu\t%u\t0x%x\t",
164 print_mac(mac, bss->bssid), bss->last_update, 162 bss->bssid, bss->last_update,
165 bss->count, bss->capab_info); 163 bss->count, bss->capab_info);
166 for (i = 0; i < bss->ssid_len; i++) { 164 for (i = 0; i < bss->ssid_len; i++) {
167 p += sprintf(p, "%c", 165 p += sprintf(p, "%c",
@@ -314,7 +312,6 @@ static int prism2_scan_results_proc_read(char *page, char **start, off_t off,
314 int entry, i, len, total = 0; 312 int entry, i, len, total = 0;
315 struct hfa384x_hostscan_result *scanres; 313 struct hfa384x_hostscan_result *scanres;
316 u8 *pos; 314 u8 *pos;
317 DECLARE_MAC_BUF(mac);
318 315
319 p += sprintf(p, "CHID ANL SL BcnInt Capab Rate BSSID ATIM SupRates " 316 p += sprintf(p, "CHID ANL SL BcnInt Capab Rate BSSID ATIM SupRates "
320 "SSID\n"); 317 "SSID\n");
@@ -332,14 +329,14 @@ static int prism2_scan_results_proc_read(char *page, char **start, off_t off,
332 if ((p - page) > (PAGE_SIZE - 200)) 329 if ((p - page) > (PAGE_SIZE - 200))
333 break; 330 break;
334 331
335 p += sprintf(p, "%d %d %d %d 0x%02x %d %s %d ", 332 p += sprintf(p, "%d %d %d %d 0x%02x %d %pM %d ",
336 le16_to_cpu(scanres->chid), 333 le16_to_cpu(scanres->chid),
337 (s16) le16_to_cpu(scanres->anl), 334 (s16) le16_to_cpu(scanres->anl),
338 (s16) le16_to_cpu(scanres->sl), 335 (s16) le16_to_cpu(scanres->sl),
339 le16_to_cpu(scanres->beacon_interval), 336 le16_to_cpu(scanres->beacon_interval),
340 le16_to_cpu(scanres->capability), 337 le16_to_cpu(scanres->capability),
341 le16_to_cpu(scanres->rate), 338 le16_to_cpu(scanres->rate),
342 print_mac(mac, scanres->bssid), 339 scanres->bssid,
343 le16_to_cpu(scanres->atim)); 340 le16_to_cpu(scanres->atim));
344 341
345 pos = scanres->sup_rates; 342 pos = scanres->sup_rates;
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c
index bca74811bc7f..6e988d2486a7 100644
--- a/drivers/net/wireless/ipw2100.c
+++ b/drivers/net/wireless/ipw2100.c
@@ -1914,7 +1914,6 @@ static void isr_indicate_associated(struct ipw2100_priv *priv, u32 status)
1914 u32 chan; 1914 u32 chan;
1915 char *txratename; 1915 char *txratename;
1916 u8 bssid[ETH_ALEN]; 1916 u8 bssid[ETH_ALEN];
1917 DECLARE_MAC_BUF(mac);
1918 1917
1919 /* 1918 /*
1920 * TBD: BSSID is usually 00:00:00:00:00:00 here and not 1919 * TBD: BSSID is usually 00:00:00:00:00:00 here and not
@@ -1975,10 +1974,9 @@ static void isr_indicate_associated(struct ipw2100_priv *priv, u32 status)
1975 break; 1974 break;
1976 } 1975 }
1977 1976
1978 IPW_DEBUG_INFO("%s: Associated with '%s' at %s, channel %d (BSSID=" 1977 IPW_DEBUG_INFO("%s: Associated with '%s' at %s, channel %d (BSSID=%pM)\n",
1979 "%s)\n",
1980 priv->net_dev->name, escape_essid(essid, essid_len), 1978 priv->net_dev->name, escape_essid(essid, essid_len),
1981 txratename, chan, print_mac(mac, bssid)); 1979 txratename, chan, bssid);
1982 1980
1983 /* now we copy read ssid into dev */ 1981 /* now we copy read ssid into dev */
1984 if (!(priv->config & CFG_STATIC_ESSID)) { 1982 if (!(priv->config & CFG_STATIC_ESSID)) {
@@ -2046,12 +2044,10 @@ static int ipw2100_set_essid(struct ipw2100_priv *priv, char *essid,
2046 2044
2047static void isr_indicate_association_lost(struct ipw2100_priv *priv, u32 status) 2045static void isr_indicate_association_lost(struct ipw2100_priv *priv, u32 status)
2048{ 2046{
2049 DECLARE_MAC_BUF(mac);
2050
2051 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | IPW_DL_ASSOC, 2047 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | IPW_DL_ASSOC,
2052 "disassociated: '%s' %s \n", 2048 "disassociated: '%s' %pM \n",
2053 escape_essid(priv->essid, priv->essid_len), 2049 escape_essid(priv->essid, priv->essid_len),
2054 print_mac(mac, priv->bssid)); 2050 priv->bssid);
2055 2051
2056 priv->status &= ~(STATUS_ASSOCIATED | STATUS_ASSOCIATING); 2052 priv->status &= ~(STATUS_ASSOCIATED | STATUS_ASSOCIATING);
2057 2053
@@ -4058,7 +4054,6 @@ static ssize_t show_bssinfo(struct device *d, struct device_attribute *attr,
4058 char *out = buf; 4054 char *out = buf;
4059 int length; 4055 int length;
4060 int ret; 4056 int ret;
4061 DECLARE_MAC_BUF(mac);
4062 4057
4063 if (priv->status & STATUS_RF_KILL_MASK) 4058 if (priv->status & STATUS_RF_KILL_MASK)
4064 return 0; 4059 return 0;
@@ -4086,7 +4081,7 @@ static ssize_t show_bssinfo(struct device *d, struct device_attribute *attr,
4086 __LINE__); 4081 __LINE__);
4087 4082
4088 out += sprintf(out, "ESSID: %s\n", essid); 4083 out += sprintf(out, "ESSID: %s\n", essid);
4089 out += sprintf(out, "BSSID: %s\n", print_mac(mac, bssid)); 4084 out += sprintf(out, "BSSID: %pM\n", bssid);
4090 out += sprintf(out, "Channel: %d\n", chan); 4085 out += sprintf(out, "Channel: %d\n", chan);
4091 4086
4092 return out - buf; 4087 return out - buf;
@@ -4662,7 +4657,6 @@ static int ipw2100_read_mac_address(struct ipw2100_priv *priv)
4662{ 4657{
4663 u32 length = ETH_ALEN; 4658 u32 length = ETH_ALEN;
4664 u8 addr[ETH_ALEN]; 4659 u8 addr[ETH_ALEN];
4665 DECLARE_MAC_BUF(mac);
4666 4660
4667 int err; 4661 int err;
4668 4662
@@ -4673,8 +4667,7 @@ static int ipw2100_read_mac_address(struct ipw2100_priv *priv)
4673 } 4667 }
4674 4668
4675 memcpy(priv->net_dev->dev_addr, addr, ETH_ALEN); 4669 memcpy(priv->net_dev->dev_addr, addr, ETH_ALEN);
4676 IPW_DEBUG_INFO("card MAC is %s\n", 4670 IPW_DEBUG_INFO("card MAC is %pM\n", priv->net_dev->dev_addr);
4677 print_mac(mac, priv->net_dev->dev_addr));
4678 4671
4679 return 0; 4672 return 0;
4680} 4673}
@@ -5053,10 +5046,8 @@ static int ipw2100_set_mandatory_bssid(struct ipw2100_priv *priv, u8 * bssid,
5053 int err; 5046 int err;
5054 5047
5055#ifdef CONFIG_IPW2100_DEBUG 5048#ifdef CONFIG_IPW2100_DEBUG
5056 DECLARE_MAC_BUF(mac);
5057 if (bssid != NULL) 5049 if (bssid != NULL)
5058 IPW_DEBUG_HC("MANDATORY_BSSID: %s\n", 5050 IPW_DEBUG_HC("MANDATORY_BSSID: %pM\n", bssid);
5059 print_mac(mac, bssid));
5060 else 5051 else
5061 IPW_DEBUG_HC("MANDATORY_BSSID: <clear>\n"); 5052 IPW_DEBUG_HC("MANDATORY_BSSID: <clear>\n");
5062#endif 5053#endif
@@ -6905,7 +6896,6 @@ static int ipw2100_wx_set_wap(struct net_device *dev,
6905 static const unsigned char off[] = { 6896 static const unsigned char off[] = {
6906 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 6897 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
6907 }; 6898 };
6908 DECLARE_MAC_BUF(mac);
6909 6899
6910 // sanity checks 6900 // sanity checks
6911 if (wrqu->ap_addr.sa_family != ARPHRD_ETHER) 6901 if (wrqu->ap_addr.sa_family != ARPHRD_ETHER)
@@ -6931,8 +6921,7 @@ static int ipw2100_wx_set_wap(struct net_device *dev,
6931 6921
6932 err = ipw2100_set_mandatory_bssid(priv, wrqu->ap_addr.sa_data, 0); 6922 err = ipw2100_set_mandatory_bssid(priv, wrqu->ap_addr.sa_data, 0);
6933 6923
6934 IPW_DEBUG_WX("SET BSSID -> %s\n", 6924 IPW_DEBUG_WX("SET BSSID -> %pM\n", wrqu->ap_addr.sa_data);
6935 print_mac(mac, wrqu->ap_addr.sa_data));
6936 6925
6937 done: 6926 done:
6938 mutex_unlock(&priv->action_mutex); 6927 mutex_unlock(&priv->action_mutex);
@@ -6948,7 +6937,6 @@ static int ipw2100_wx_get_wap(struct net_device *dev,
6948 */ 6937 */
6949 6938
6950 struct ipw2100_priv *priv = ieee80211_priv(dev); 6939 struct ipw2100_priv *priv = ieee80211_priv(dev);
6951 DECLARE_MAC_BUF(mac);
6952 6940
6953 /* If we are associated, trying to associate, or have a statically 6941 /* If we are associated, trying to associate, or have a statically
6954 * configured BSSID then return that; otherwise return ANY */ 6942 * configured BSSID then return that; otherwise return ANY */
@@ -6958,8 +6946,7 @@ static int ipw2100_wx_get_wap(struct net_device *dev,
6958 } else 6946 } else
6959 memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN); 6947 memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN);
6960 6948
6961 IPW_DEBUG_WX("Getting WAP BSSID: %s\n", 6949 IPW_DEBUG_WX("Getting WAP BSSID: %pM\n", wrqu->ap_addr.sa_data);
6962 print_mac(mac, wrqu->ap_addr.sa_data));
6963 return 0; 6950 return 0;
6964} 6951}
6965 6952
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index dcce3542d5a7..d0bfd8621119 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -2265,8 +2265,8 @@ static int ipw_send_adapter_address(struct ipw_priv *priv, u8 * mac)
2265 return -1; 2265 return -1;
2266 } 2266 }
2267 2267
2268 IPW_DEBUG_INFO("%s: Setting MAC to %s\n", 2268 IPW_DEBUG_INFO("%s: Setting MAC to %pM\n",
2269 priv->net_dev->name, print_mac(mac, mac)); 2269 priv->net_dev->name, mac);
2270 2270
2271 return ipw_send_cmd_pdu(priv, IPW_CMD_ADAPTER_ADDRESS, ETH_ALEN, mac); 2271 return ipw_send_cmd_pdu(priv, IPW_CMD_ADAPTER_ADDRESS, ETH_ALEN, mac);
2272} 2272}
@@ -3812,7 +3812,6 @@ static u8 ipw_add_station(struct ipw_priv *priv, u8 * bssid)
3812{ 3812{
3813 struct ipw_station_entry entry; 3813 struct ipw_station_entry entry;
3814 int i; 3814 int i;
3815 DECLARE_MAC_BUF(mac);
3816 3815
3817 for (i = 0; i < priv->num_stations; i++) { 3816 for (i = 0; i < priv->num_stations; i++) {
3818 if (!memcmp(priv->stations[i], bssid, ETH_ALEN)) { 3817 if (!memcmp(priv->stations[i], bssid, ETH_ALEN)) {
@@ -3829,7 +3828,7 @@ static u8 ipw_add_station(struct ipw_priv *priv, u8 * bssid)
3829 if (i == MAX_STATIONS) 3828 if (i == MAX_STATIONS)
3830 return IPW_INVALID_STATION; 3829 return IPW_INVALID_STATION;
3831 3830
3832 IPW_DEBUG_SCAN("Adding AdHoc station: %s\n", print_mac(mac, bssid)); 3831 IPW_DEBUG_SCAN("Adding AdHoc station: %pM\n", bssid);
3833 3832
3834 entry.reserved = 0; 3833 entry.reserved = 0;
3835 entry.support_mode = 0; 3834 entry.support_mode = 0;
@@ -3856,7 +3855,6 @@ static u8 ipw_find_station(struct ipw_priv *priv, u8 * bssid)
3856static void ipw_send_disassociate(struct ipw_priv *priv, int quiet) 3855static void ipw_send_disassociate(struct ipw_priv *priv, int quiet)
3857{ 3856{
3858 int err; 3857 int err;
3859 DECLARE_MAC_BUF(mac);
3860 3858
3861 if (priv->status & STATUS_ASSOCIATING) { 3859 if (priv->status & STATUS_ASSOCIATING) {
3862 IPW_DEBUG_ASSOC("Disassociating while associating.\n"); 3860 IPW_DEBUG_ASSOC("Disassociating while associating.\n");
@@ -3869,9 +3867,9 @@ static void ipw_send_disassociate(struct ipw_priv *priv, int quiet)
3869 return; 3867 return;
3870 } 3868 }
3871 3869
3872 IPW_DEBUG_ASSOC("Disassocation attempt from %s " 3870 IPW_DEBUG_ASSOC("Disassocation attempt from %pM "
3873 "on channel %d.\n", 3871 "on channel %d.\n",
3874 print_mac(mac, priv->assoc_request.bssid), 3872 priv->assoc_request.bssid,
3875 priv->assoc_request.channel); 3873 priv->assoc_request.channel);
3876 3874
3877 priv->status &= ~(STATUS_ASSOCIATING | STATUS_ASSOCIATED); 3875 priv->status &= ~(STATUS_ASSOCIATING | STATUS_ASSOCIATED);
@@ -4397,7 +4395,6 @@ static void handle_scan_event(struct ipw_priv *priv)
4397static void ipw_rx_notification(struct ipw_priv *priv, 4395static void ipw_rx_notification(struct ipw_priv *priv,
4398 struct ipw_rx_notification *notif) 4396 struct ipw_rx_notification *notif)
4399{ 4397{
4400 DECLARE_MAC_BUF(mac);
4401 u16 size = le16_to_cpu(notif->size); 4398 u16 size = le16_to_cpu(notif->size);
4402 notif->size = le16_to_cpu(notif->size); 4399 notif->size = le16_to_cpu(notif->size);
4403 4400
@@ -4411,11 +4408,10 @@ static void ipw_rx_notification(struct ipw_priv *priv,
4411 case CMAS_ASSOCIATED:{ 4408 case CMAS_ASSOCIATED:{
4412 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | 4409 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE |
4413 IPW_DL_ASSOC, 4410 IPW_DL_ASSOC,
4414 "associated: '%s' %s" 4411 "associated: '%s' %pM \n",
4415 " \n",
4416 escape_essid(priv->essid, 4412 escape_essid(priv->essid,
4417 priv->essid_len), 4413 priv->essid_len),
4418 print_mac(mac, priv->bssid)); 4414 priv->bssid);
4419 4415
4420 switch (priv->ieee->iw_mode) { 4416 switch (priv->ieee->iw_mode) {
4421 case IW_MODE_INFRA: 4417 case IW_MODE_INFRA:
@@ -4492,13 +4488,13 @@ static void ipw_rx_notification(struct ipw_priv *priv,
4492 IPW_DL_STATE | 4488 IPW_DL_STATE |
4493 IPW_DL_ASSOC, 4489 IPW_DL_ASSOC,
4494 "deauthenticated: '%s' " 4490 "deauthenticated: '%s' "
4495 "%s" 4491 "%pM"
4496 ": (0x%04X) - %s \n", 4492 ": (0x%04X) - %s \n",
4497 escape_essid(priv-> 4493 escape_essid(priv->
4498 essid, 4494 essid,
4499 priv-> 4495 priv->
4500 essid_len), 4496 essid_len),
4501 print_mac(mac, priv->bssid), 4497 priv->bssid,
4502 le16_to_cpu(auth->status), 4498 le16_to_cpu(auth->status),
4503 ipw_get_status_code 4499 ipw_get_status_code
4504 (le16_to_cpu 4500 (le16_to_cpu
@@ -4515,11 +4511,10 @@ static void ipw_rx_notification(struct ipw_priv *priv,
4515 4511
4516 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | 4512 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE |
4517 IPW_DL_ASSOC, 4513 IPW_DL_ASSOC,
4518 "authenticated: '%s' %s" 4514 "authenticated: '%s' %pM\n",
4519 "\n",
4520 escape_essid(priv->essid, 4515 escape_essid(priv->essid,
4521 priv->essid_len), 4516 priv->essid_len),
4522 print_mac(mac, priv->bssid)); 4517 priv->bssid);
4523 break; 4518 break;
4524 } 4519 }
4525 4520
@@ -4544,11 +4539,10 @@ static void ipw_rx_notification(struct ipw_priv *priv,
4544 4539
4545 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | 4540 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE |
4546 IPW_DL_ASSOC, 4541 IPW_DL_ASSOC,
4547 "disassociated: '%s' %s" 4542 "disassociated: '%s' %pM \n",
4548 " \n",
4549 escape_essid(priv->essid, 4543 escape_essid(priv->essid,
4550 priv->essid_len), 4544 priv->essid_len),
4551 print_mac(mac, priv->bssid)); 4545 priv->bssid);
4552 4546
4553 priv->status &= 4547 priv->status &=
4554 ~(STATUS_DISASSOCIATING | 4548 ~(STATUS_DISASSOCIATING |
@@ -4583,10 +4577,10 @@ static void ipw_rx_notification(struct ipw_priv *priv,
4583 switch (auth->state) { 4577 switch (auth->state) {
4584 case CMAS_AUTHENTICATED: 4578 case CMAS_AUTHENTICATED:
4585 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE, 4579 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE,
4586 "authenticated: '%s' %s \n", 4580 "authenticated: '%s' %pM \n",
4587 escape_essid(priv->essid, 4581 escape_essid(priv->essid,
4588 priv->essid_len), 4582 priv->essid_len),
4589 print_mac(mac, priv->bssid)); 4583 priv->bssid);
4590 priv->status |= STATUS_AUTH; 4584 priv->status |= STATUS_AUTH;
4591 break; 4585 break;
4592 4586
@@ -4602,10 +4596,10 @@ static void ipw_rx_notification(struct ipw_priv *priv,
4602 } 4596 }
4603 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | 4597 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE |
4604 IPW_DL_ASSOC, 4598 IPW_DL_ASSOC,
4605 "deauthenticated: '%s' %s\n", 4599 "deauthenticated: '%s' %pM\n",
4606 escape_essid(priv->essid, 4600 escape_essid(priv->essid,
4607 priv->essid_len), 4601 priv->essid_len),
4608 print_mac(mac, priv->bssid)); 4602 priv->bssid);
4609 4603
4610 priv->status &= ~(STATUS_ASSOCIATING | 4604 priv->status &= ~(STATUS_ASSOCIATING |
4611 STATUS_AUTH | 4605 STATUS_AUTH |
@@ -5429,27 +5423,25 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5429 int roaming) 5423 int roaming)
5430{ 5424{
5431 struct ipw_supported_rates rates; 5425 struct ipw_supported_rates rates;
5432 DECLARE_MAC_BUF(mac);
5433 DECLARE_MAC_BUF(mac2);
5434 5426
5435 /* Verify that this network's capability is compatible with the 5427 /* Verify that this network's capability is compatible with the
5436 * current mode (AdHoc or Infrastructure) */ 5428 * current mode (AdHoc or Infrastructure) */
5437 if ((priv->ieee->iw_mode == IW_MODE_ADHOC && 5429 if ((priv->ieee->iw_mode == IW_MODE_ADHOC &&
5438 !(network->capability & WLAN_CAPABILITY_IBSS))) { 5430 !(network->capability & WLAN_CAPABILITY_IBSS))) {
5439 IPW_DEBUG_MERGE("Network '%s (%s)' excluded due to " 5431 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded due to "
5440 "capability mismatch.\n", 5432 "capability mismatch.\n",
5441 escape_essid(network->ssid, network->ssid_len), 5433 escape_essid(network->ssid, network->ssid_len),
5442 print_mac(mac, network->bssid)); 5434 network->bssid);
5443 return 0; 5435 return 0;
5444 } 5436 }
5445 5437
5446 /* If we do not have an ESSID for this AP, we can not associate with 5438 /* If we do not have an ESSID for this AP, we can not associate with
5447 * it */ 5439 * it */
5448 if (network->flags & NETWORK_EMPTY_ESSID) { 5440 if (network->flags & NETWORK_EMPTY_ESSID) {
5449 IPW_DEBUG_MERGE("Network '%s (%s)' excluded " 5441 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
5450 "because of hidden ESSID.\n", 5442 "because of hidden ESSID.\n",
5451 escape_essid(network->ssid, network->ssid_len), 5443 escape_essid(network->ssid, network->ssid_len),
5452 print_mac(mac, network->bssid)); 5444 network->bssid);
5453 return 0; 5445 return 0;
5454 } 5446 }
5455 5447
@@ -5459,11 +5451,11 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5459 if ((network->ssid_len != match->network->ssid_len) || 5451 if ((network->ssid_len != match->network->ssid_len) ||
5460 memcmp(network->ssid, match->network->ssid, 5452 memcmp(network->ssid, match->network->ssid,
5461 network->ssid_len)) { 5453 network->ssid_len)) {
5462 IPW_DEBUG_MERGE("Network '%s (%s)' excluded " 5454 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
5463 "because of non-network ESSID.\n", 5455 "because of non-network ESSID.\n",
5464 escape_essid(network->ssid, 5456 escape_essid(network->ssid,
5465 network->ssid_len), 5457 network->ssid_len),
5466 print_mac(mac, network->bssid)); 5458 network->bssid);
5467 return 0; 5459 return 0;
5468 } 5460 }
5469 } else { 5461 } else {
@@ -5478,9 +5470,9 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5478 strncpy(escaped, 5470 strncpy(escaped,
5479 escape_essid(network->ssid, network->ssid_len), 5471 escape_essid(network->ssid, network->ssid_len),
5480 sizeof(escaped)); 5472 sizeof(escaped));
5481 IPW_DEBUG_MERGE("Network '%s (%s)' excluded " 5473 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
5482 "because of ESSID mismatch: '%s'.\n", 5474 "because of ESSID mismatch: '%s'.\n",
5483 escaped, print_mac(mac, network->bssid), 5475 escaped, network->bssid,
5484 escape_essid(priv->essid, 5476 escape_essid(priv->essid,
5485 priv->essid_len)); 5477 priv->essid_len));
5486 return 0; 5478 return 0;
@@ -5507,10 +5499,10 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5507 /* Now go through and see if the requested network is valid... */ 5499 /* Now go through and see if the requested network is valid... */
5508 if (priv->ieee->scan_age != 0 && 5500 if (priv->ieee->scan_age != 0 &&
5509 time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) { 5501 time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) {
5510 IPW_DEBUG_MERGE("Network '%s (%s)' excluded " 5502 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
5511 "because of age: %ums.\n", 5503 "because of age: %ums.\n",
5512 escape_essid(network->ssid, network->ssid_len), 5504 escape_essid(network->ssid, network->ssid_len),
5513 print_mac(mac, network->bssid), 5505 network->bssid,
5514 jiffies_to_msecs(jiffies - 5506 jiffies_to_msecs(jiffies -
5515 network->last_scanned)); 5507 network->last_scanned));
5516 return 0; 5508 return 0;
@@ -5518,10 +5510,10 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5518 5510
5519 if ((priv->config & CFG_STATIC_CHANNEL) && 5511 if ((priv->config & CFG_STATIC_CHANNEL) &&
5520 (network->channel != priv->channel)) { 5512 (network->channel != priv->channel)) {
5521 IPW_DEBUG_MERGE("Network '%s (%s)' excluded " 5513 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
5522 "because of channel mismatch: %d != %d.\n", 5514 "because of channel mismatch: %d != %d.\n",
5523 escape_essid(network->ssid, network->ssid_len), 5515 escape_essid(network->ssid, network->ssid_len),
5524 print_mac(mac, network->bssid), 5516 network->bssid,
5525 network->channel, priv->channel); 5517 network->channel, priv->channel);
5526 return 0; 5518 return 0;
5527 } 5519 }
@@ -5529,10 +5521,10 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5529 /* Verify privacy compatability */ 5521 /* Verify privacy compatability */
5530 if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) != 5522 if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) !=
5531 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { 5523 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) {
5532 IPW_DEBUG_MERGE("Network '%s (%s)' excluded " 5524 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
5533 "because of privacy mismatch: %s != %s.\n", 5525 "because of privacy mismatch: %s != %s.\n",
5534 escape_essid(network->ssid, network->ssid_len), 5526 escape_essid(network->ssid, network->ssid_len),
5535 print_mac(mac, network->bssid), 5527 network->bssid,
5536 priv-> 5528 priv->
5537 capability & CAP_PRIVACY_ON ? "on" : "off", 5529 capability & CAP_PRIVACY_ON ? "on" : "off",
5538 network-> 5530 network->
@@ -5542,41 +5534,41 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5542 } 5534 }
5543 5535
5544 if (!memcmp(network->bssid, priv->bssid, ETH_ALEN)) { 5536 if (!memcmp(network->bssid, priv->bssid, ETH_ALEN)) {
5545 IPW_DEBUG_MERGE("Network '%s (%s)' excluded " 5537 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
5546 "because of the same BSSID match: %s" 5538 "because of the same BSSID match: %pM"
5547 ".\n", escape_essid(network->ssid, 5539 ".\n", escape_essid(network->ssid,
5548 network->ssid_len), 5540 network->ssid_len),
5549 print_mac(mac, network->bssid), 5541 network->bssid,
5550 print_mac(mac2, priv->bssid)); 5542 priv->bssid);
5551 return 0; 5543 return 0;
5552 } 5544 }
5553 5545
5554 /* Filter out any incompatible freq / mode combinations */ 5546 /* Filter out any incompatible freq / mode combinations */
5555 if (!ieee80211_is_valid_mode(priv->ieee, network->mode)) { 5547 if (!ieee80211_is_valid_mode(priv->ieee, network->mode)) {
5556 IPW_DEBUG_MERGE("Network '%s (%s)' excluded " 5548 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
5557 "because of invalid frequency/mode " 5549 "because of invalid frequency/mode "
5558 "combination.\n", 5550 "combination.\n",
5559 escape_essid(network->ssid, network->ssid_len), 5551 escape_essid(network->ssid, network->ssid_len),
5560 print_mac(mac, network->bssid)); 5552 network->bssid);
5561 return 0; 5553 return 0;
5562 } 5554 }
5563 5555
5564 /* Ensure that the rates supported by the driver are compatible with 5556 /* Ensure that the rates supported by the driver are compatible with
5565 * this AP, including verification of basic rates (mandatory) */ 5557 * this AP, including verification of basic rates (mandatory) */
5566 if (!ipw_compatible_rates(priv, network, &rates)) { 5558 if (!ipw_compatible_rates(priv, network, &rates)) {
5567 IPW_DEBUG_MERGE("Network '%s (%s)' excluded " 5559 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
5568 "because configured rate mask excludes " 5560 "because configured rate mask excludes "
5569 "AP mandatory rate.\n", 5561 "AP mandatory rate.\n",
5570 escape_essid(network->ssid, network->ssid_len), 5562 escape_essid(network->ssid, network->ssid_len),
5571 print_mac(mac, network->bssid)); 5563 network->bssid);
5572 return 0; 5564 return 0;
5573 } 5565 }
5574 5566
5575 if (rates.num_rates == 0) { 5567 if (rates.num_rates == 0) {
5576 IPW_DEBUG_MERGE("Network '%s (%s)' excluded " 5568 IPW_DEBUG_MERGE("Network '%s (%pM)' excluded "
5577 "because of no compatible rates.\n", 5569 "because of no compatible rates.\n",
5578 escape_essid(network->ssid, network->ssid_len), 5570 escape_essid(network->ssid, network->ssid_len),
5579 print_mac(mac, network->bssid)); 5571 network->bssid);
5580 return 0; 5572 return 0;
5581 } 5573 }
5582 5574
@@ -5587,9 +5579,9 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5587 /* Set up 'new' AP to this network */ 5579 /* Set up 'new' AP to this network */
5588 ipw_copy_rates(&match->rates, &rates); 5580 ipw_copy_rates(&match->rates, &rates);
5589 match->network = network; 5581 match->network = network;
5590 IPW_DEBUG_MERGE("Network '%s (%s)' is a viable match.\n", 5582 IPW_DEBUG_MERGE("Network '%s (%pM)' is a viable match.\n",
5591 escape_essid(network->ssid, network->ssid_len), 5583 escape_essid(network->ssid, network->ssid_len),
5592 print_mac(mac, network->bssid)); 5584 network->bssid);
5593 5585
5594 return 1; 5586 return 1;
5595} 5587}
@@ -5643,7 +5635,6 @@ static int ipw_best_network(struct ipw_priv *priv,
5643 struct ieee80211_network *network, int roaming) 5635 struct ieee80211_network *network, int roaming)
5644{ 5636{
5645 struct ipw_supported_rates rates; 5637 struct ipw_supported_rates rates;
5646 DECLARE_MAC_BUF(mac);
5647 5638
5648 /* Verify that this network's capability is compatible with the 5639 /* Verify that this network's capability is compatible with the
5649 * current mode (AdHoc or Infrastructure) */ 5640 * current mode (AdHoc or Infrastructure) */
@@ -5651,20 +5642,20 @@ static int ipw_best_network(struct ipw_priv *priv,
5651 !(network->capability & WLAN_CAPABILITY_ESS)) || 5642 !(network->capability & WLAN_CAPABILITY_ESS)) ||
5652 (priv->ieee->iw_mode == IW_MODE_ADHOC && 5643 (priv->ieee->iw_mode == IW_MODE_ADHOC &&
5653 !(network->capability & WLAN_CAPABILITY_IBSS))) { 5644 !(network->capability & WLAN_CAPABILITY_IBSS))) {
5654 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded due to " 5645 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded due to "
5655 "capability mismatch.\n", 5646 "capability mismatch.\n",
5656 escape_essid(network->ssid, network->ssid_len), 5647 escape_essid(network->ssid, network->ssid_len),
5657 print_mac(mac, network->bssid)); 5648 network->bssid);
5658 return 0; 5649 return 0;
5659 } 5650 }
5660 5651
5661 /* If we do not have an ESSID for this AP, we can not associate with 5652 /* If we do not have an ESSID for this AP, we can not associate with
5662 * it */ 5653 * it */
5663 if (network->flags & NETWORK_EMPTY_ESSID) { 5654 if (network->flags & NETWORK_EMPTY_ESSID) {
5664 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5655 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5665 "because of hidden ESSID.\n", 5656 "because of hidden ESSID.\n",
5666 escape_essid(network->ssid, network->ssid_len), 5657 escape_essid(network->ssid, network->ssid_len),
5667 print_mac(mac, network->bssid)); 5658 network->bssid);
5668 return 0; 5659 return 0;
5669 } 5660 }
5670 5661
@@ -5674,11 +5665,11 @@ static int ipw_best_network(struct ipw_priv *priv,
5674 if ((network->ssid_len != match->network->ssid_len) || 5665 if ((network->ssid_len != match->network->ssid_len) ||
5675 memcmp(network->ssid, match->network->ssid, 5666 memcmp(network->ssid, match->network->ssid,
5676 network->ssid_len)) { 5667 network->ssid_len)) {
5677 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5668 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5678 "because of non-network ESSID.\n", 5669 "because of non-network ESSID.\n",
5679 escape_essid(network->ssid, 5670 escape_essid(network->ssid,
5680 network->ssid_len), 5671 network->ssid_len),
5681 print_mac(mac, network->bssid)); 5672 network->bssid);
5682 return 0; 5673 return 0;
5683 } 5674 }
5684 } else { 5675 } else {
@@ -5692,9 +5683,9 @@ static int ipw_best_network(struct ipw_priv *priv,
5692 strncpy(escaped, 5683 strncpy(escaped,
5693 escape_essid(network->ssid, network->ssid_len), 5684 escape_essid(network->ssid, network->ssid_len),
5694 sizeof(escaped)); 5685 sizeof(escaped));
5695 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5686 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5696 "because of ESSID mismatch: '%s'.\n", 5687 "because of ESSID mismatch: '%s'.\n",
5697 escaped, print_mac(mac, network->bssid), 5688 escaped, network->bssid,
5698 escape_essid(priv->essid, 5689 escape_essid(priv->essid,
5699 priv->essid_len)); 5690 priv->essid_len));
5700 return 0; 5691 return 0;
@@ -5708,12 +5699,12 @@ static int ipw_best_network(struct ipw_priv *priv,
5708 strncpy(escaped, 5699 strncpy(escaped,
5709 escape_essid(network->ssid, network->ssid_len), 5700 escape_essid(network->ssid, network->ssid_len),
5710 sizeof(escaped)); 5701 sizeof(escaped));
5711 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded because " 5702 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded because "
5712 "'%s (%s)' has a stronger signal.\n", 5703 "'%s (%pM)' has a stronger signal.\n",
5713 escaped, print_mac(mac, network->bssid), 5704 escaped, network->bssid,
5714 escape_essid(match->network->ssid, 5705 escape_essid(match->network->ssid,
5715 match->network->ssid_len), 5706 match->network->ssid_len),
5716 print_mac(mac, match->network->bssid)); 5707 match->network->bssid);
5717 return 0; 5708 return 0;
5718 } 5709 }
5719 5710
@@ -5721,11 +5712,11 @@ static int ipw_best_network(struct ipw_priv *priv,
5721 * last 3 seconds, do not try and associate again... */ 5712 * last 3 seconds, do not try and associate again... */
5722 if (network->last_associate && 5713 if (network->last_associate &&
5723 time_after(network->last_associate + (HZ * 3UL), jiffies)) { 5714 time_after(network->last_associate + (HZ * 3UL), jiffies)) {
5724 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5715 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5725 "because of storming (%ums since last " 5716 "because of storming (%ums since last "
5726 "assoc attempt).\n", 5717 "assoc attempt).\n",
5727 escape_essid(network->ssid, network->ssid_len), 5718 escape_essid(network->ssid, network->ssid_len),
5728 print_mac(mac, network->bssid), 5719 network->bssid,
5729 jiffies_to_msecs(jiffies - 5720 jiffies_to_msecs(jiffies -
5730 network->last_associate)); 5721 network->last_associate));
5731 return 0; 5722 return 0;
@@ -5734,10 +5725,10 @@ static int ipw_best_network(struct ipw_priv *priv,
5734 /* Now go through and see if the requested network is valid... */ 5725 /* Now go through and see if the requested network is valid... */
5735 if (priv->ieee->scan_age != 0 && 5726 if (priv->ieee->scan_age != 0 &&
5736 time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) { 5727 time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) {
5737 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5728 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5738 "because of age: %ums.\n", 5729 "because of age: %ums.\n",
5739 escape_essid(network->ssid, network->ssid_len), 5730 escape_essid(network->ssid, network->ssid_len),
5740 print_mac(mac, network->bssid), 5731 network->bssid,
5741 jiffies_to_msecs(jiffies - 5732 jiffies_to_msecs(jiffies -
5742 network->last_scanned)); 5733 network->last_scanned));
5743 return 0; 5734 return 0;
@@ -5745,10 +5736,10 @@ static int ipw_best_network(struct ipw_priv *priv,
5745 5736
5746 if ((priv->config & CFG_STATIC_CHANNEL) && 5737 if ((priv->config & CFG_STATIC_CHANNEL) &&
5747 (network->channel != priv->channel)) { 5738 (network->channel != priv->channel)) {
5748 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5739 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5749 "because of channel mismatch: %d != %d.\n", 5740 "because of channel mismatch: %d != %d.\n",
5750 escape_essid(network->ssid, network->ssid_len), 5741 escape_essid(network->ssid, network->ssid_len),
5751 print_mac(mac, network->bssid), 5742 network->bssid,
5752 network->channel, priv->channel); 5743 network->channel, priv->channel);
5753 return 0; 5744 return 0;
5754 } 5745 }
@@ -5756,10 +5747,10 @@ static int ipw_best_network(struct ipw_priv *priv,
5756 /* Verify privacy compatability */ 5747 /* Verify privacy compatability */
5757 if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) != 5748 if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) !=
5758 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { 5749 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) {
5759 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5750 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5760 "because of privacy mismatch: %s != %s.\n", 5751 "because of privacy mismatch: %s != %s.\n",
5761 escape_essid(network->ssid, network->ssid_len), 5752 escape_essid(network->ssid, network->ssid_len),
5762 print_mac(mac, network->bssid), 5753 network->bssid,
5763 priv->capability & CAP_PRIVACY_ON ? "on" : 5754 priv->capability & CAP_PRIVACY_ON ? "on" :
5764 "off", 5755 "off",
5765 network->capability & 5756 network->capability &
@@ -5769,48 +5760,48 @@ static int ipw_best_network(struct ipw_priv *priv,
5769 5760
5770 if ((priv->config & CFG_STATIC_BSSID) && 5761 if ((priv->config & CFG_STATIC_BSSID) &&
5771 memcmp(network->bssid, priv->bssid, ETH_ALEN)) { 5762 memcmp(network->bssid, priv->bssid, ETH_ALEN)) {
5772 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5763 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5773 "because of BSSID mismatch: %s.\n", 5764 "because of BSSID mismatch: %pM.\n",
5774 escape_essid(network->ssid, network->ssid_len), 5765 escape_essid(network->ssid, network->ssid_len),
5775 print_mac(mac, network->bssid), print_mac(mac, priv->bssid)); 5766 network->bssid, priv->bssid);
5776 return 0; 5767 return 0;
5777 } 5768 }
5778 5769
5779 /* Filter out any incompatible freq / mode combinations */ 5770 /* Filter out any incompatible freq / mode combinations */
5780 if (!ieee80211_is_valid_mode(priv->ieee, network->mode)) { 5771 if (!ieee80211_is_valid_mode(priv->ieee, network->mode)) {
5781 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5772 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5782 "because of invalid frequency/mode " 5773 "because of invalid frequency/mode "
5783 "combination.\n", 5774 "combination.\n",
5784 escape_essid(network->ssid, network->ssid_len), 5775 escape_essid(network->ssid, network->ssid_len),
5785 print_mac(mac, network->bssid)); 5776 network->bssid);
5786 return 0; 5777 return 0;
5787 } 5778 }
5788 5779
5789 /* Filter out invalid channel in current GEO */ 5780 /* Filter out invalid channel in current GEO */
5790 if (!ieee80211_is_valid_channel(priv->ieee, network->channel)) { 5781 if (!ieee80211_is_valid_channel(priv->ieee, network->channel)) {
5791 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5782 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5792 "because of invalid channel in current GEO\n", 5783 "because of invalid channel in current GEO\n",
5793 escape_essid(network->ssid, network->ssid_len), 5784 escape_essid(network->ssid, network->ssid_len),
5794 print_mac(mac, network->bssid)); 5785 network->bssid);
5795 return 0; 5786 return 0;
5796 } 5787 }
5797 5788
5798 /* Ensure that the rates supported by the driver are compatible with 5789 /* Ensure that the rates supported by the driver are compatible with
5799 * this AP, including verification of basic rates (mandatory) */ 5790 * this AP, including verification of basic rates (mandatory) */
5800 if (!ipw_compatible_rates(priv, network, &rates)) { 5791 if (!ipw_compatible_rates(priv, network, &rates)) {
5801 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5792 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5802 "because configured rate mask excludes " 5793 "because configured rate mask excludes "
5803 "AP mandatory rate.\n", 5794 "AP mandatory rate.\n",
5804 escape_essid(network->ssid, network->ssid_len), 5795 escape_essid(network->ssid, network->ssid_len),
5805 print_mac(mac, network->bssid)); 5796 network->bssid);
5806 return 0; 5797 return 0;
5807 } 5798 }
5808 5799
5809 if (rates.num_rates == 0) { 5800 if (rates.num_rates == 0) {
5810 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded " 5801 IPW_DEBUG_ASSOC("Network '%s (%pM)' excluded "
5811 "because of no compatible rates.\n", 5802 "because of no compatible rates.\n",
5812 escape_essid(network->ssid, network->ssid_len), 5803 escape_essid(network->ssid, network->ssid_len),
5813 print_mac(mac, network->bssid)); 5804 network->bssid);
5814 return 0; 5805 return 0;
5815 } 5806 }
5816 5807
@@ -5822,9 +5813,9 @@ static int ipw_best_network(struct ipw_priv *priv,
5822 ipw_copy_rates(&match->rates, &rates); 5813 ipw_copy_rates(&match->rates, &rates);
5823 match->network = network; 5814 match->network = network;
5824 5815
5825 IPW_DEBUG_ASSOC("Network '%s (%s)' is a viable match.\n", 5816 IPW_DEBUG_ASSOC("Network '%s (%pM)' is a viable match.\n",
5826 escape_essid(network->ssid, network->ssid_len), 5817 escape_essid(network->ssid, network->ssid_len),
5827 print_mac(mac, network->bssid)); 5818 network->bssid);
5828 5819
5829 return 1; 5820 return 1;
5830} 5821}
@@ -6066,7 +6057,6 @@ static void ipw_bg_adhoc_check(struct work_struct *work)
6066 6057
6067static void ipw_debug_config(struct ipw_priv *priv) 6058static void ipw_debug_config(struct ipw_priv *priv)
6068{ 6059{
6069 DECLARE_MAC_BUF(mac);
6070 IPW_DEBUG_INFO("Scan completed, no valid APs matched " 6060 IPW_DEBUG_INFO("Scan completed, no valid APs matched "
6071 "[CFG 0x%08X]\n", priv->config); 6061 "[CFG 0x%08X]\n", priv->config);
6072 if (priv->config & CFG_STATIC_CHANNEL) 6062 if (priv->config & CFG_STATIC_CHANNEL)
@@ -6079,8 +6069,7 @@ static void ipw_debug_config(struct ipw_priv *priv)
6079 else 6069 else
6080 IPW_DEBUG_INFO("ESSID unlocked.\n"); 6070 IPW_DEBUG_INFO("ESSID unlocked.\n");
6081 if (priv->config & CFG_STATIC_BSSID) 6071 if (priv->config & CFG_STATIC_BSSID)
6082 IPW_DEBUG_INFO("BSSID locked to %s\n", 6072 IPW_DEBUG_INFO("BSSID locked to %pM\n", priv->bssid);
6083 print_mac(mac, priv->bssid));
6084 else 6073 else
6085 IPW_DEBUG_INFO("BSSID unlocked.\n"); 6074 IPW_DEBUG_INFO("BSSID unlocked.\n");
6086 if (priv->capability & CAP_PRIVACY_ON) 6075 if (priv->capability & CAP_PRIVACY_ON)
@@ -7295,7 +7284,6 @@ static int ipw_associate_network(struct ipw_priv *priv,
7295 struct ipw_supported_rates *rates, int roaming) 7284 struct ipw_supported_rates *rates, int roaming)
7296{ 7285{
7297 int err; 7286 int err;
7298 DECLARE_MAC_BUF(mac);
7299 7287
7300 if (priv->config & CFG_FIXED_RATE) 7288 if (priv->config & CFG_FIXED_RATE)
7301 ipw_set_fixed_rate(priv, network->mode); 7289 ipw_set_fixed_rate(priv, network->mode);
@@ -7463,9 +7451,9 @@ static int ipw_associate_network(struct ipw_priv *priv,
7463 return err; 7451 return err;
7464 } 7452 }
7465 7453
7466 IPW_DEBUG(IPW_DL_STATE, "associating: '%s' %s \n", 7454 IPW_DEBUG(IPW_DL_STATE, "associating: '%s' %pM \n",
7467 escape_essid(priv->essid, priv->essid_len), 7455 escape_essid(priv->essid, priv->essid_len),
7468 print_mac(mac, priv->bssid)); 7456 priv->bssid);
7469 7457
7470 return 0; 7458 return 0;
7471} 7459}
@@ -7604,7 +7592,6 @@ static int ipw_associate(void *data)
7604 if (list_empty(&priv->ieee->network_free_list)) { 7592 if (list_empty(&priv->ieee->network_free_list)) {
7605 struct ieee80211_network *oldest = NULL; 7593 struct ieee80211_network *oldest = NULL;
7606 struct ieee80211_network *target; 7594 struct ieee80211_network *target;
7607 DECLARE_MAC_BUF(mac);
7608 7595
7609 list_for_each_entry(target, &priv->ieee->network_list, list) { 7596 list_for_each_entry(target, &priv->ieee->network_list, list) {
7610 if ((oldest == NULL) || 7597 if ((oldest == NULL) ||
@@ -7615,11 +7602,11 @@ static int ipw_associate(void *data)
7615 /* If there are no more slots, expire the oldest */ 7602 /* If there are no more slots, expire the oldest */
7616 list_del(&oldest->list); 7603 list_del(&oldest->list);
7617 target = oldest; 7604 target = oldest;
7618 IPW_DEBUG_ASSOC("Expired '%s' (%s) from " 7605 IPW_DEBUG_ASSOC("Expired '%s' (%pM) from "
7619 "network list.\n", 7606 "network list.\n",
7620 escape_essid(target->ssid, 7607 escape_essid(target->ssid,
7621 target->ssid_len), 7608 target->ssid_len),
7622 print_mac(mac, target->bssid)); 7609 target->bssid);
7623 list_add_tail(&target->list, 7610 list_add_tail(&target->list,
7624 &priv->ieee->network_free_list); 7611 &priv->ieee->network_free_list);
7625 } 7612 }
@@ -8301,9 +8288,6 @@ static void ipw_rx(struct ipw_priv *priv)
8301 u32 r, w, i; 8288 u32 r, w, i;
8302 u8 network_packet; 8289 u8 network_packet;
8303 u8 fill_rx = 0; 8290 u8 fill_rx = 0;
8304 DECLARE_MAC_BUF(mac);
8305 DECLARE_MAC_BUF(mac2);
8306 DECLARE_MAC_BUF(mac3);
8307 8291
8308 r = ipw_read32(priv, IPW_RX_READ_INDEX); 8292 r = ipw_read32(priv, IPW_RX_READ_INDEX);
8309 w = ipw_read32(priv, IPW_RX_WRITE_INDEX); 8293 w = ipw_read32(priv, IPW_RX_WRITE_INDEX);
@@ -8433,18 +8417,12 @@ static void ipw_rx(struct ipw_priv *priv)
8433 header))) 8417 header)))
8434 { 8418 {
8435 IPW_DEBUG_DROP("Dropping: " 8419 IPW_DEBUG_DROP("Dropping: "
8436 "%s, " 8420 "%pM, "
8437 "%s, " 8421 "%pM, "
8438 "%s\n", 8422 "%pM\n",
8439 print_mac(mac, 8423 header->addr1,
8440 header-> 8424 header->addr2,
8441 addr1), 8425 header->addr3);
8442 print_mac(mac2,
8443 header->
8444 addr2),
8445 print_mac(mac3,
8446 header->
8447 addr3));
8448 break; 8426 break;
8449 } 8427 }
8450 8428
@@ -8983,7 +8961,6 @@ static int ipw_wx_set_wap(struct net_device *dev,
8983 union iwreq_data *wrqu, char *extra) 8961 union iwreq_data *wrqu, char *extra)
8984{ 8962{
8985 struct ipw_priv *priv = ieee80211_priv(dev); 8963 struct ipw_priv *priv = ieee80211_priv(dev);
8986 DECLARE_MAC_BUF(mac);
8987 8964
8988 static const unsigned char any[] = { 8965 static const unsigned char any[] = {
8989 0xff, 0xff, 0xff, 0xff, 0xff, 0xff 8966 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
@@ -9014,8 +8991,8 @@ static int ipw_wx_set_wap(struct net_device *dev,
9014 return 0; 8991 return 0;
9015 } 8992 }
9016 8993
9017 IPW_DEBUG_WX("Setting mandatory BSSID to %s\n", 8994 IPW_DEBUG_WX("Setting mandatory BSSID to %pM\n",
9018 print_mac(mac, wrqu->ap_addr.sa_data)); 8995 wrqu->ap_addr.sa_data);
9019 8996
9020 memcpy(priv->bssid, wrqu->ap_addr.sa_data, ETH_ALEN); 8997 memcpy(priv->bssid, wrqu->ap_addr.sa_data, ETH_ALEN);
9021 8998
@@ -9033,7 +9010,6 @@ static int ipw_wx_get_wap(struct net_device *dev,
9033 union iwreq_data *wrqu, char *extra) 9010 union iwreq_data *wrqu, char *extra)
9034{ 9011{
9035 struct ipw_priv *priv = ieee80211_priv(dev); 9012 struct ipw_priv *priv = ieee80211_priv(dev);
9036 DECLARE_MAC_BUF(mac);
9037 9013
9038 /* If we are associated, trying to associate, or have a statically 9014 /* If we are associated, trying to associate, or have a statically
9039 * configured BSSID then return that; otherwise return ANY */ 9015 * configured BSSID then return that; otherwise return ANY */
@@ -9045,8 +9021,8 @@ static int ipw_wx_get_wap(struct net_device *dev,
9045 } else 9021 } else
9046 memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN); 9022 memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN);
9047 9023
9048 IPW_DEBUG_WX("Getting WAP BSSID: %s\n", 9024 IPW_DEBUG_WX("Getting WAP BSSID: %pM\n",
9049 print_mac(mac, wrqu->ap_addr.sa_data)); 9025 wrqu->ap_addr.sa_data);
9050 mutex_unlock(&priv->mutex); 9026 mutex_unlock(&priv->mutex);
9051 return 0; 9027 return 0;
9052} 9028}
@@ -10199,10 +10175,8 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb,
10199 id = ipw_add_station(priv, hdr->addr1); 10175 id = ipw_add_station(priv, hdr->addr1);
10200 if (id == IPW_INVALID_STATION) { 10176 if (id == IPW_INVALID_STATION) {
10201 IPW_WARNING("Attempt to send data to " 10177 IPW_WARNING("Attempt to send data to "
10202 "invalid cell: " MAC_FMT "\n", 10178 "invalid cell: %pM\n",
10203 hdr->addr1[0], hdr->addr1[1], 10179 hdr->addr1);
10204 hdr->addr1[2], hdr->addr1[3],
10205 hdr->addr1[4], hdr->addr1[5]);
10206 goto drop; 10180 goto drop;
10207 } 10181 }
10208 } 10182 }
@@ -10505,15 +10479,14 @@ static int ipw_net_set_mac_address(struct net_device *dev, void *p)
10505{ 10479{
10506 struct ipw_priv *priv = ieee80211_priv(dev); 10480 struct ipw_priv *priv = ieee80211_priv(dev);
10507 struct sockaddr *addr = p; 10481 struct sockaddr *addr = p;
10508 DECLARE_MAC_BUF(mac);
10509 10482
10510 if (!is_valid_ether_addr(addr->sa_data)) 10483 if (!is_valid_ether_addr(addr->sa_data))
10511 return -EADDRNOTAVAIL; 10484 return -EADDRNOTAVAIL;
10512 mutex_lock(&priv->mutex); 10485 mutex_lock(&priv->mutex);
10513 priv->config |= CFG_CUSTOM_MAC; 10486 priv->config |= CFG_CUSTOM_MAC;
10514 memcpy(priv->mac_addr, addr->sa_data, ETH_ALEN); 10487 memcpy(priv->mac_addr, addr->sa_data, ETH_ALEN);
10515 printk(KERN_INFO "%s: Setting MAC to %s\n", 10488 printk(KERN_INFO "%s: Setting MAC to %pM\n",
10516 priv->net_dev->name, print_mac(mac, priv->mac_addr)); 10489 priv->net_dev->name, priv->mac_addr);
10517 queue_work(priv->workqueue, &priv->adapter_restart); 10490 queue_work(priv->workqueue, &priv->adapter_restart);
10518 mutex_unlock(&priv->mutex); 10491 mutex_unlock(&priv->mutex);
10519 return 0; 10492 return 0;
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
index 6fc5e7361f26..bb91353c443e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
@@ -649,7 +649,6 @@ static void rs_get_rate(void *priv_r, struct ieee80211_supported_band *sband,
649 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; 649 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
650 u16 fc, rate_mask; 650 u16 fc, rate_mask;
651 struct iwl3945_priv *priv = (struct iwl3945_priv *)priv_r; 651 struct iwl3945_priv *priv = (struct iwl3945_priv *)priv_r;
652 DECLARE_MAC_BUF(mac);
653 652
654 IWL_DEBUG_RATE("enter\n"); 653 IWL_DEBUG_RATE("enter\n");
655 654
@@ -675,8 +674,8 @@ static void rs_get_rate(void *priv_r, struct ieee80211_supported_band *sband,
675 u8 sta_id = iwl3945_hw_find_station(priv, hdr->addr1); 674 u8 sta_id = iwl3945_hw_find_station(priv, hdr->addr1);
676 675
677 if (sta_id == IWL_INVALID_STATION) { 676 if (sta_id == IWL_INVALID_STATION) {
678 IWL_DEBUG_RATE("LQ: ADD station %s\n", 677 IWL_DEBUG_RATE("LQ: ADD station %pm\n",
679 print_mac(mac, hdr->addr1)); 678 hdr->addr1);
680 sta_id = iwl3945_add_station(priv, 679 sta_id = iwl3945_add_station(priv,
681 hdr->addr1, 0, CMD_ASYNC); 680 hdr->addr1, 0, CMD_ASYNC);
682 } 681 }
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 7ca5627cc078..8a00245be51e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -759,7 +759,6 @@ u8 iwl3945_hw_find_station(struct iwl3945_priv *priv, const u8 *addr)
759 int i; 759 int i;
760 int ret = IWL_INVALID_STATION; 760 int ret = IWL_INVALID_STATION;
761 unsigned long flags; 761 unsigned long flags;
762 DECLARE_MAC_BUF(mac);
763 762
764 spin_lock_irqsave(&priv->sta_lock, flags); 763 spin_lock_irqsave(&priv->sta_lock, flags);
765 for (i = IWL_STA_ID; i < priv->hw_setting.max_stations; i++) 764 for (i = IWL_STA_ID; i < priv->hw_setting.max_stations; i++)
@@ -770,8 +769,8 @@ u8 iwl3945_hw_find_station(struct iwl3945_priv *priv, const u8 *addr)
770 goto out; 769 goto out;
771 } 770 }
772 771
773 IWL_DEBUG_INFO("can not find STA %s (total %d)\n", 772 IWL_DEBUG_INFO("can not find STA %pM (total %d)\n",
774 print_mac(mac, addr), priv->num_stations); 773 addr, priv->num_stations);
775 out: 774 out:
776 spin_unlock_irqrestore(&priv->sta_lock, flags); 775 spin_unlock_irqrestore(&priv->sta_lock, flags);
777 return ret; 776 return ret;
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index e2a58e477036..b497d40dc396 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -357,11 +357,9 @@ static void rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv,
357 struct iwl_lq_sta *lq_data, u8 tid, 357 struct iwl_lq_sta *lq_data, u8 tid,
358 struct ieee80211_sta *sta) 358 struct ieee80211_sta *sta)
359{ 359{
360 DECLARE_MAC_BUF(mac);
361
362 if (rs_tl_get_load(lq_data, tid) > IWL_AGG_LOAD_THRESHOLD) { 360 if (rs_tl_get_load(lq_data, tid) > IWL_AGG_LOAD_THRESHOLD) {
363 IWL_DEBUG_HT("Starting Tx agg: STA: %s tid: %d\n", 361 IWL_DEBUG_HT("Starting Tx agg: STA: %pM tid: %d\n",
364 print_mac(mac, sta->addr), tid); 362 sta->addr, tid);
365 ieee80211_start_tx_ba_session(priv->hw, sta->addr, tid); 363 ieee80211_start_tx_ba_session(priv->hw, sta->addr, tid);
366 } 364 }
367} 365}
@@ -2132,11 +2130,10 @@ static void rs_get_rate(void *priv_r, struct ieee80211_supported_band *sband,
2132 if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) && 2130 if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) &&
2133 !lq_sta->ibss_sta_added) { 2131 !lq_sta->ibss_sta_added) {
2134 u8 sta_id = iwl_find_station(priv, hdr->addr1); 2132 u8 sta_id = iwl_find_station(priv, hdr->addr1);
2135 DECLARE_MAC_BUF(mac);
2136 2133
2137 if (sta_id == IWL_INVALID_STATION) { 2134 if (sta_id == IWL_INVALID_STATION) {
2138 IWL_DEBUG_RATE("LQ: ADD station %s\n", 2135 IWL_DEBUG_RATE("LQ: ADD station %pM\n",
2139 print_mac(mac, hdr->addr1)); 2136 hdr->addr1);
2140 sta_id = iwl_add_station_flags(priv, hdr->addr1, 2137 sta_id = iwl_add_station_flags(priv, hdr->addr1,
2141 0, CMD_ASYNC, NULL); 2138 0, CMD_ASYNC, NULL);
2142 } 2139 }
@@ -2205,15 +2202,12 @@ static void rs_rate_init(void *priv_r, struct ieee80211_supported_band *sband,
2205 lq_sta->ibss_sta_added = 0; 2202 lq_sta->ibss_sta_added = 0;
2206 if (priv->iw_mode == NL80211_IFTYPE_AP) { 2203 if (priv->iw_mode == NL80211_IFTYPE_AP) {
2207 u8 sta_id = iwl_find_station(priv, sta->addr); 2204 u8 sta_id = iwl_find_station(priv, sta->addr);
2208 DECLARE_MAC_BUF(mac);
2209 2205
2210 /* for IBSS the call are from tasklet */ 2206 /* for IBSS the call are from tasklet */
2211 IWL_DEBUG_RATE("LQ: ADD station %s\n", 2207 IWL_DEBUG_RATE("LQ: ADD station %pM\n", sta->addr);
2212 print_mac(mac, sta->addr));
2213 2208
2214 if (sta_id == IWL_INVALID_STATION) { 2209 if (sta_id == IWL_INVALID_STATION) {
2215 IWL_DEBUG_RATE("LQ: ADD station %s\n", 2210 IWL_DEBUG_RATE("LQ: ADD station %pM\n", sta->addr);
2216 print_mac(mac, sta->addr));
2217 sta_id = iwl_add_station_flags(priv, sta->addr, 2211 sta_id = iwl_add_station_flags(priv, sta->addr,
2218 0, CMD_ASYNC, NULL); 2212 0, CMD_ASYNC, NULL);
2219 } 2213 }
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 24a1aeb6448f..2af9a14446e4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -239,7 +239,6 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv)
239{ 239{
240 /* cast away the const for active_rxon in this function */ 240 /* cast away the const for active_rxon in this function */
241 struct iwl_rxon_cmd *active_rxon = (void *)&priv->active_rxon; 241 struct iwl_rxon_cmd *active_rxon = (void *)&priv->active_rxon;
242 DECLARE_MAC_BUF(mac);
243 int ret; 242 int ret;
244 bool new_assoc = 243 bool new_assoc =
245 !!(priv->staging_rxon.filter_flags & RXON_FILTER_ASSOC_MSK); 244 !!(priv->staging_rxon.filter_flags & RXON_FILTER_ASSOC_MSK);
@@ -300,10 +299,10 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv)
300 IWL_DEBUG_INFO("Sending RXON\n" 299 IWL_DEBUG_INFO("Sending RXON\n"
301 "* with%s RXON_FILTER_ASSOC_MSK\n" 300 "* with%s RXON_FILTER_ASSOC_MSK\n"
302 "* channel = %d\n" 301 "* channel = %d\n"
303 "* bssid = %s\n", 302 "* bssid = %pM\n",
304 (new_assoc ? "" : "out"), 303 (new_assoc ? "" : "out"),
305 le16_to_cpu(priv->staging_rxon.channel), 304 le16_to_cpu(priv->staging_rxon.channel),
306 print_mac(mac, priv->staging_rxon.bssid_addr)); 305 priv->staging_rxon.bssid_addr);
307 306
308 iwl4965_set_rxon_hwcrypto(priv, !priv->hw_params.sw_crypto); 307 iwl4965_set_rxon_hwcrypto(priv, !priv->hw_params.sw_crypto);
309 308
@@ -1464,7 +1463,6 @@ void iwl_rx_handle(struct iwl_priv *priv)
1464static void iwl4965_print_rx_config_cmd(struct iwl_priv *priv) 1463static void iwl4965_print_rx_config_cmd(struct iwl_priv *priv)
1465{ 1464{
1466 struct iwl_rxon_cmd *rxon = &priv->staging_rxon; 1465 struct iwl_rxon_cmd *rxon = &priv->staging_rxon;
1467 DECLARE_MAC_BUF(mac);
1468 1466
1469 IWL_DEBUG_RADIO("RX CONFIG:\n"); 1467 IWL_DEBUG_RADIO("RX CONFIG:\n");
1470 iwl_print_hex_dump(priv, IWL_DL_RADIO, (u8 *) rxon, sizeof(*rxon)); 1468 iwl_print_hex_dump(priv, IWL_DL_RADIO, (u8 *) rxon, sizeof(*rxon));
@@ -1476,10 +1474,8 @@ static void iwl4965_print_rx_config_cmd(struct iwl_priv *priv)
1476 IWL_DEBUG_RADIO("u8 ofdm_basic_rates: 0x%02x\n", 1474 IWL_DEBUG_RADIO("u8 ofdm_basic_rates: 0x%02x\n",
1477 rxon->ofdm_basic_rates); 1475 rxon->ofdm_basic_rates);
1478 IWL_DEBUG_RADIO("u8 cck_basic_rates: 0x%02x\n", rxon->cck_basic_rates); 1476 IWL_DEBUG_RADIO("u8 cck_basic_rates: 0x%02x\n", rxon->cck_basic_rates);
1479 IWL_DEBUG_RADIO("u8[6] node_addr: %s\n", 1477 IWL_DEBUG_RADIO("u8[6] node_addr: %pM\n", rxon->node_addr);
1480 print_mac(mac, rxon->node_addr)); 1478 IWL_DEBUG_RADIO("u8[6] bssid_addr: %pM\n", rxon->bssid_addr);
1481 IWL_DEBUG_RADIO("u8[6] bssid_addr: %s\n",
1482 print_mac(mac, rxon->bssid_addr));
1483 IWL_DEBUG_RADIO("u16 assoc_id: 0x%x\n", le16_to_cpu(rxon->assoc_id)); 1479 IWL_DEBUG_RADIO("u16 assoc_id: 0x%x\n", le16_to_cpu(rxon->assoc_id));
1484} 1480}
1485#endif 1481#endif
@@ -2466,7 +2462,6 @@ static void iwl4965_post_associate(struct iwl_priv *priv)
2466{ 2462{
2467 struct ieee80211_conf *conf = NULL; 2463 struct ieee80211_conf *conf = NULL;
2468 int ret = 0; 2464 int ret = 0;
2469 DECLARE_MAC_BUF(mac);
2470 unsigned long flags; 2465 unsigned long flags;
2471 2466
2472 if (priv->iw_mode == NL80211_IFTYPE_AP) { 2467 if (priv->iw_mode == NL80211_IFTYPE_AP) {
@@ -2474,9 +2469,8 @@ static void iwl4965_post_associate(struct iwl_priv *priv)
2474 return; 2469 return;
2475 } 2470 }
2476 2471
2477 IWL_DEBUG_ASSOC("Associated as %d to: %s\n", 2472 IWL_DEBUG_ASSOC("Associated as %d to: %pM\n",
2478 priv->assoc_id, 2473 priv->assoc_id, priv->active_rxon.bssid_addr);
2479 print_mac(mac, priv->active_rxon.bssid_addr));
2480 2474
2481 2475
2482 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 2476 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
@@ -2722,7 +2716,6 @@ static int iwl4965_mac_add_interface(struct ieee80211_hw *hw,
2722{ 2716{
2723 struct iwl_priv *priv = hw->priv; 2717 struct iwl_priv *priv = hw->priv;
2724 unsigned long flags; 2718 unsigned long flags;
2725 DECLARE_MAC_BUF(mac);
2726 2719
2727 IWL_DEBUG_MAC80211("enter: type %d\n", conf->type); 2720 IWL_DEBUG_MAC80211("enter: type %d\n", conf->type);
2728 2721
@@ -2739,7 +2732,7 @@ static int iwl4965_mac_add_interface(struct ieee80211_hw *hw,
2739 mutex_lock(&priv->mutex); 2732 mutex_lock(&priv->mutex);
2740 2733
2741 if (conf->mac_addr) { 2734 if (conf->mac_addr) {
2742 IWL_DEBUG_MAC80211("Set %s\n", print_mac(mac, conf->mac_addr)); 2735 IWL_DEBUG_MAC80211("Set %pM\n", conf->mac_addr);
2743 memcpy(priv->mac_addr, conf->mac_addr, ETH_ALEN); 2736 memcpy(priv->mac_addr, conf->mac_addr, ETH_ALEN);
2744 } 2737 }
2745 2738
@@ -2948,7 +2941,6 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw,
2948 struct ieee80211_if_conf *conf) 2941 struct ieee80211_if_conf *conf)
2949{ 2942{
2950 struct iwl_priv *priv = hw->priv; 2943 struct iwl_priv *priv = hw->priv;
2951 DECLARE_MAC_BUF(mac);
2952 unsigned long flags; 2944 unsigned long flags;
2953 int rc; 2945 int rc;
2954 2946
@@ -2983,8 +2975,7 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw,
2983 mutex_lock(&priv->mutex); 2975 mutex_lock(&priv->mutex);
2984 2976
2985 if (conf->bssid) 2977 if (conf->bssid)
2986 IWL_DEBUG_MAC80211("bssid: %s\n", 2978 IWL_DEBUG_MAC80211("bssid: %pM\n", conf->bssid);
2987 print_mac(mac, conf->bssid));
2988 2979
2989/* 2980/*
2990 * very dubious code was here; the probe filtering flag is never set: 2981 * very dubious code was here; the probe filtering flag is never set:
@@ -2997,8 +2988,8 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw,
2997 if (!conf->bssid) { 2988 if (!conf->bssid) {
2998 conf->bssid = priv->mac_addr; 2989 conf->bssid = priv->mac_addr;
2999 memcpy(priv->bssid, priv->mac_addr, ETH_ALEN); 2990 memcpy(priv->bssid, priv->mac_addr, ETH_ALEN);
3000 IWL_DEBUG_MAC80211("bssid was set to: %s\n", 2991 IWL_DEBUG_MAC80211("bssid was set to: %pM\n",
3001 print_mac(mac, conf->bssid)); 2992 conf->bssid);
3002 } 2993 }
3003 if (priv->ibss_beacon) 2994 if (priv->ibss_beacon)
3004 dev_kfree_skb(priv->ibss_beacon); 2995 dev_kfree_skb(priv->ibss_beacon);
@@ -3241,14 +3232,13 @@ static void iwl4965_mac_update_tkip_key(struct ieee80211_hw *hw,
3241 unsigned long flags; 3232 unsigned long flags;
3242 __le16 key_flags = 0; 3233 __le16 key_flags = 0;
3243 int i; 3234 int i;
3244 DECLARE_MAC_BUF(mac);
3245 3235
3246 IWL_DEBUG_MAC80211("enter\n"); 3236 IWL_DEBUG_MAC80211("enter\n");
3247 3237
3248 sta_id = iwl_find_station(priv, addr); 3238 sta_id = iwl_find_station(priv, addr);
3249 if (sta_id == IWL_INVALID_STATION) { 3239 if (sta_id == IWL_INVALID_STATION) {
3250 IWL_DEBUG_MAC80211("leave - %s not in station map.\n", 3240 IWL_DEBUG_MAC80211("leave - %pM not in station map.\n",
3251 print_mac(mac, addr)); 3241 addr);
3252 return; 3242 return;
3253 } 3243 }
3254 3244
@@ -3285,7 +3275,6 @@ static int iwl4965_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
3285 struct ieee80211_key_conf *key) 3275 struct ieee80211_key_conf *key)
3286{ 3276{
3287 struct iwl_priv *priv = hw->priv; 3277 struct iwl_priv *priv = hw->priv;
3288 DECLARE_MAC_BUF(mac);
3289 int ret = 0; 3278 int ret = 0;
3290 u8 sta_id = IWL_INVALID_STATION; 3279 u8 sta_id = IWL_INVALID_STATION;
3291 u8 is_default_wep_key = 0; 3280 u8 is_default_wep_key = 0;
@@ -3303,8 +3292,8 @@ static int iwl4965_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
3303 3292
3304 sta_id = iwl_find_station(priv, addr); 3293 sta_id = iwl_find_station(priv, addr);
3305 if (sta_id == IWL_INVALID_STATION) { 3294 if (sta_id == IWL_INVALID_STATION) {
3306 IWL_DEBUG_MAC80211("leave - %s not in station map.\n", 3295 IWL_DEBUG_MAC80211("leave - %pM not in station map.\n",
3307 print_mac(mac, addr)); 3296 addr);
3308 return -EINVAL; 3297 return -EINVAL;
3309 3298
3310 } 3299 }
@@ -3405,10 +3394,9 @@ static int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw,
3405 struct ieee80211_sta *sta, u16 tid, u16 *ssn) 3394 struct ieee80211_sta *sta, u16 tid, u16 *ssn)
3406{ 3395{
3407 struct iwl_priv *priv = hw->priv; 3396 struct iwl_priv *priv = hw->priv;
3408 DECLARE_MAC_BUF(mac);
3409 3397
3410 IWL_DEBUG_HT("A-MPDU action on addr %s tid %d\n", 3398 IWL_DEBUG_HT("A-MPDU action on addr %pM tid %d\n",
3411 print_mac(mac, sta->addr), tid); 3399 sta->addr, tid);
3412 3400
3413 if (!(priv->cfg->sku & IWL_SKU_N)) 3401 if (!(priv->cfg->sku & IWL_SKU_N))
3414 return -EACCES; 3402 return -EACCES;
@@ -4171,7 +4159,6 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
4171 struct ieee80211_hw *hw; 4159 struct ieee80211_hw *hw;
4172 struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data); 4160 struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data);
4173 unsigned long flags; 4161 unsigned long flags;
4174 DECLARE_MAC_BUF(mac);
4175 4162
4176 /************************ 4163 /************************
4177 * 1. Allocating HW data 4164 * 1. Allocating HW data
@@ -4280,7 +4267,7 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
4280 4267
4281 /* extract MAC Address */ 4268 /* extract MAC Address */
4282 iwl_eeprom_get_mac(priv, priv->mac_addr); 4269 iwl_eeprom_get_mac(priv, priv->mac_addr);
4283 IWL_DEBUG_INFO("MAC address: %s\n", print_mac(mac, priv->mac_addr)); 4270 IWL_DEBUG_INFO("MAC address: %pM\n", priv->mac_addr);
4284 SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr); 4271 SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr);
4285 4272
4286 /************************ 4273 /************************
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
index 20db0eb636a8..753f9387aa68 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
@@ -228,7 +228,6 @@ static ssize_t iwl_dbgfs_stations_read(struct file *file, char __user *user_buf,
228 ssize_t ret; 228 ssize_t ret;
229 /* Add 30 for initial string */ 229 /* Add 30 for initial string */
230 const size_t bufsz = 30 + sizeof(char) * 500 * (priv->num_stations); 230 const size_t bufsz = 30 + sizeof(char) * 500 * (priv->num_stations);
231 DECLARE_MAC_BUF(mac);
232 231
233 buf = kmalloc(bufsz, GFP_KERNEL); 232 buf = kmalloc(bufsz, GFP_KERNEL);
234 if (!buf) 233 if (!buf)
@@ -242,7 +241,6 @@ static ssize_t iwl_dbgfs_stations_read(struct file *file, char __user *user_buf,
242 if (station->used) { 241 if (station->used) {
243 pos += scnprintf(buf + pos, bufsz - pos, 242 pos += scnprintf(buf + pos, bufsz - pos,
244 "station %d:\ngeneral data:\n", i+1); 243 "station %d:\ngeneral data:\n", i+1);
245 print_mac(mac, station->sta.sta.addr);
246 pos += scnprintf(buf + pos, bufsz - pos, "id: %u\n", 244 pos += scnprintf(buf + pos, bufsz - pos, "id: %u\n",
247 station->sta.sta.sta_id); 245 station->sta.sta.sta_id);
248 pos += scnprintf(buf + pos, bufsz - pos, "mode: %u\n", 246 pos += scnprintf(buf + pos, bufsz - pos, "mode: %u\n",
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
index 61797f3f8d5c..e02c4717c93c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
@@ -45,7 +45,6 @@ u8 iwl_find_station(struct iwl_priv *priv, const u8 *addr)
45 int start = 0; 45 int start = 0;
46 int ret = IWL_INVALID_STATION; 46 int ret = IWL_INVALID_STATION;
47 unsigned long flags; 47 unsigned long flags;
48 DECLARE_MAC_BUF(mac);
49 48
50 if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) || 49 if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) ||
51 (priv->iw_mode == NL80211_IFTYPE_AP)) 50 (priv->iw_mode == NL80211_IFTYPE_AP))
@@ -63,8 +62,8 @@ u8 iwl_find_station(struct iwl_priv *priv, const u8 *addr)
63 goto out; 62 goto out;
64 } 63 }
65 64
66 IWL_DEBUG_ASSOC_LIMIT("can not find STA %s total %d\n", 65 IWL_DEBUG_ASSOC_LIMIT("can not find STA %pM total %d\n",
67 print_mac(mac, addr), priv->num_stations); 66 addr, priv->num_stations);
68 67
69 out: 68 out:
70 spin_unlock_irqrestore(&priv->sta_lock, flags); 69 spin_unlock_irqrestore(&priv->sta_lock, flags);
@@ -86,7 +85,6 @@ EXPORT_SYMBOL(iwl_get_ra_sta_id);
86static void iwl_sta_ucode_activate(struct iwl_priv *priv, u8 sta_id) 85static void iwl_sta_ucode_activate(struct iwl_priv *priv, u8 sta_id)
87{ 86{
88 unsigned long flags; 87 unsigned long flags;
89 DECLARE_MAC_BUF(mac);
90 88
91 spin_lock_irqsave(&priv->sta_lock, flags); 89 spin_lock_irqsave(&priv->sta_lock, flags);
92 90
@@ -94,8 +92,8 @@ static void iwl_sta_ucode_activate(struct iwl_priv *priv, u8 sta_id)
94 IWL_ERROR("ACTIVATE a non DRIVER active station %d\n", sta_id); 92 IWL_ERROR("ACTIVATE a non DRIVER active station %d\n", sta_id);
95 93
96 priv->stations[sta_id].used |= IWL_STA_UCODE_ACTIVE; 94 priv->stations[sta_id].used |= IWL_STA_UCODE_ACTIVE;
97 IWL_DEBUG_ASSOC("Added STA to Ucode: %s\n", 95 IWL_DEBUG_ASSOC("Added STA to Ucode: %pM\n",
98 print_mac(mac, priv->stations[sta_id].sta.sta.addr)); 96 priv->stations[sta_id].sta.sta.addr);
99 97
100 spin_unlock_irqrestore(&priv->sta_lock, flags); 98 spin_unlock_irqrestore(&priv->sta_lock, flags);
101} 99}
@@ -237,7 +235,6 @@ u8 iwl_add_station_flags(struct iwl_priv *priv, const u8 *addr, int is_ap,
237 int sta_id = IWL_INVALID_STATION; 235 int sta_id = IWL_INVALID_STATION;
238 struct iwl_station_entry *station; 236 struct iwl_station_entry *station;
239 unsigned long flags_spin; 237 unsigned long flags_spin;
240 DECLARE_MAC_BUF(mac);
241 238
242 spin_lock_irqsave(&priv->sta_lock, flags_spin); 239 spin_lock_irqsave(&priv->sta_lock, flags_spin);
243 if (is_ap) 240 if (is_ap)
@@ -273,8 +270,8 @@ u8 iwl_add_station_flags(struct iwl_priv *priv, const u8 *addr, int is_ap,
273 270
274 station = &priv->stations[sta_id]; 271 station = &priv->stations[sta_id];
275 station->used = IWL_STA_DRIVER_ACTIVE; 272 station->used = IWL_STA_DRIVER_ACTIVE;
276 IWL_DEBUG_ASSOC("Add STA to driver ID %d: %s\n", 273 IWL_DEBUG_ASSOC("Add STA to driver ID %d: %pM\n",
277 sta_id, print_mac(mac, addr)); 274 sta_id, addr);
278 priv->num_stations++; 275 priv->num_stations++;
279 276
280 /* Set up the REPLY_ADD_STA command to send to device */ 277 /* Set up the REPLY_ADD_STA command to send to device */
@@ -301,14 +298,11 @@ EXPORT_SYMBOL(iwl_add_station_flags);
301static void iwl_sta_ucode_deactivate(struct iwl_priv *priv, const char *addr) 298static void iwl_sta_ucode_deactivate(struct iwl_priv *priv, const char *addr)
302{ 299{
303 unsigned long flags; 300 unsigned long flags;
304 DECLARE_MAC_BUF(mac);
305
306 u8 sta_id = iwl_find_station(priv, addr); 301 u8 sta_id = iwl_find_station(priv, addr);
307 302
308 BUG_ON(sta_id == IWL_INVALID_STATION); 303 BUG_ON(sta_id == IWL_INVALID_STATION);
309 304
310 IWL_DEBUG_ASSOC("Removed STA from Ucode: %s\n", 305 IWL_DEBUG_ASSOC("Removed STA from Ucode: %pM\n", addr);
311 print_mac(mac, addr));
312 306
313 spin_lock_irqsave(&priv->sta_lock, flags); 307 spin_lock_irqsave(&priv->sta_lock, flags);
314 308
@@ -415,7 +409,6 @@ int iwl_remove_station(struct iwl_priv *priv, const u8 *addr, int is_ap)
415 int sta_id = IWL_INVALID_STATION; 409 int sta_id = IWL_INVALID_STATION;
416 int i, ret = -EINVAL; 410 int i, ret = -EINVAL;
417 unsigned long flags; 411 unsigned long flags;
418 DECLARE_MAC_BUF(mac);
419 412
420 spin_lock_irqsave(&priv->sta_lock, flags); 413 spin_lock_irqsave(&priv->sta_lock, flags);
421 414
@@ -435,18 +428,18 @@ int iwl_remove_station(struct iwl_priv *priv, const u8 *addr, int is_ap)
435 if (unlikely(sta_id == IWL_INVALID_STATION)) 428 if (unlikely(sta_id == IWL_INVALID_STATION))
436 goto out; 429 goto out;
437 430
438 IWL_DEBUG_ASSOC("Removing STA from driver:%d %s\n", 431 IWL_DEBUG_ASSOC("Removing STA from driver:%d %pM\n",
439 sta_id, print_mac(mac, addr)); 432 sta_id, addr);
440 433
441 if (!(priv->stations[sta_id].used & IWL_STA_DRIVER_ACTIVE)) { 434 if (!(priv->stations[sta_id].used & IWL_STA_DRIVER_ACTIVE)) {
442 IWL_ERROR("Removing %s but non DRIVER active\n", 435 IWL_ERROR("Removing %pM but non DRIVER active\n",
443 print_mac(mac, addr)); 436 addr);
444 goto out; 437 goto out;
445 } 438 }
446 439
447 if (!(priv->stations[sta_id].used & IWL_STA_UCODE_ACTIVE)) { 440 if (!(priv->stations[sta_id].used & IWL_STA_UCODE_ACTIVE)) {
448 IWL_ERROR("Removing %s but non UCODE active\n", 441 IWL_ERROR("Removing %pM but non UCODE active\n",
449 print_mac(mac, addr)); 442 addr);
450 goto out; 443 goto out;
451 } 444 }
452 445
@@ -927,7 +920,6 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
927{ 920{
928 int sta_id; 921 int sta_id;
929 u16 fc = le16_to_cpu(hdr->frame_control); 922 u16 fc = le16_to_cpu(hdr->frame_control);
930 DECLARE_MAC_BUF(mac);
931 923
932 /* If this frame is broadcast or management, use broadcast station id */ 924 /* If this frame is broadcast or management, use broadcast station id */
933 if (((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA) || 925 if (((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA) ||
@@ -962,9 +954,9 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
962 if (sta_id != IWL_INVALID_STATION) 954 if (sta_id != IWL_INVALID_STATION)
963 return sta_id; 955 return sta_id;
964 956
965 IWL_DEBUG_DROP("Station %s not in station map. " 957 IWL_DEBUG_DROP("Station %pM not in station map. "
966 "Defaulting to broadcast...\n", 958 "Defaulting to broadcast...\n",
967 print_mac(mac, hdr->addr1)); 959 hdr->addr1);
968 iwl_print_hex_dump(priv, IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr)); 960 iwl_print_hex_dump(priv, IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr));
969 return priv->hw_params.bcast_sta_id; 961 return priv->hw_params.bcast_sta_id;
970 962
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 907a53ebc6e4..37ebcff409e2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -830,10 +830,8 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
830 /* Find (or create) index into station table for destination station */ 830 /* Find (or create) index into station table for destination station */
831 sta_id = iwl_get_sta_id(priv, hdr); 831 sta_id = iwl_get_sta_id(priv, hdr);
832 if (sta_id == IWL_INVALID_STATION) { 832 if (sta_id == IWL_INVALID_STATION) {
833 DECLARE_MAC_BUF(mac); 833 IWL_DEBUG_DROP("Dropping - INVALID STATION: %pM\n",
834 834 hdr->addr1);
835 IWL_DEBUG_DROP("Dropping - INVALID STATION: %s\n",
836 print_mac(mac, hdr->addr1));
837 goto drop; 835 goto drop;
838 } 836 }
839 837
@@ -1248,15 +1246,14 @@ int iwl_tx_agg_start(struct iwl_priv *priv, const u8 *ra, u16 tid, u16 *ssn)
1248 int ret; 1246 int ret;
1249 unsigned long flags; 1247 unsigned long flags;
1250 struct iwl_tid_data *tid_data; 1248 struct iwl_tid_data *tid_data;
1251 DECLARE_MAC_BUF(mac);
1252 1249
1253 if (likely(tid < ARRAY_SIZE(default_tid_to_tx_fifo))) 1250 if (likely(tid < ARRAY_SIZE(default_tid_to_tx_fifo)))
1254 tx_fifo = default_tid_to_tx_fifo[tid]; 1251 tx_fifo = default_tid_to_tx_fifo[tid];
1255 else 1252 else
1256 return -EINVAL; 1253 return -EINVAL;
1257 1254
1258 IWL_WARNING("%s on ra = %s tid = %d\n", 1255 IWL_WARNING("%s on ra = %pM tid = %d\n",
1259 __func__, print_mac(mac, ra), tid); 1256 __func__, ra, tid);
1260 1257
1261 sta_id = iwl_find_station(priv, ra); 1258 sta_id = iwl_find_station(priv, ra);
1262 if (sta_id == IWL_INVALID_STATION) 1259 if (sta_id == IWL_INVALID_STATION)
@@ -1301,7 +1298,6 @@ int iwl_tx_agg_stop(struct iwl_priv *priv , const u8 *ra, u16 tid)
1301 struct iwl_tid_data *tid_data; 1298 struct iwl_tid_data *tid_data;
1302 int ret, write_ptr, read_ptr; 1299 int ret, write_ptr, read_ptr;
1303 unsigned long flags; 1300 unsigned long flags;
1304 DECLARE_MAC_BUF(mac);
1305 1301
1306 if (!ra) { 1302 if (!ra) {
1307 IWL_ERROR("ra = NULL\n"); 1303 IWL_ERROR("ra = NULL\n");
@@ -1467,7 +1463,6 @@ void iwl_rx_reply_compressed_ba(struct iwl_priv *priv,
1467 int index; 1463 int index;
1468 struct iwl_tx_queue *txq = NULL; 1464 struct iwl_tx_queue *txq = NULL;
1469 struct iwl_ht_agg *agg; 1465 struct iwl_ht_agg *agg;
1470 DECLARE_MAC_BUF(mac);
1471 1466
1472 /* "flow" corresponds to Tx queue */ 1467 /* "flow" corresponds to Tx queue */
1473 u16 scd_flow = le16_to_cpu(ba_resp->scd_flow); 1468 u16 scd_flow = le16_to_cpu(ba_resp->scd_flow);
@@ -1489,10 +1484,10 @@ void iwl_rx_reply_compressed_ba(struct iwl_priv *priv,
1489 1484
1490 /* TODO: Need to get this copy more safely - now good for debug */ 1485 /* TODO: Need to get this copy more safely - now good for debug */
1491 1486
1492 IWL_DEBUG_TX_REPLY("REPLY_COMPRESSED_BA [%d]Received from %s, " 1487 IWL_DEBUG_TX_REPLY("REPLY_COMPRESSED_BA [%d]Received from %pM, "
1493 "sta_id = %d\n", 1488 "sta_id = %d\n",
1494 agg->wait_for_ba, 1489 agg->wait_for_ba,
1495 print_mac(mac, (u8 *) &ba_resp->sta_addr_lo32), 1490 (u8 *) &ba_resp->sta_addr_lo32,
1496 ba_resp->sta_id); 1491 ba_resp->sta_id);
1497 IWL_DEBUG_TX_REPLY("TID = %d, SeqCtl = %d, bitmap = 0x%llx, scd_flow = " 1492 IWL_DEBUG_TX_REPLY("TID = %d, SeqCtl = %d, bitmap = 0x%llx, scd_flow = "
1498 "%d, scd_ssn = %d\n", 1493 "%d, scd_ssn = %d\n",
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index d15a2c997954..d3a2966d9181 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -446,7 +446,6 @@ u8 iwl3945_add_station(struct iwl3945_priv *priv, const u8 *addr, int is_ap, u8
446 int index = IWL_INVALID_STATION; 446 int index = IWL_INVALID_STATION;
447 struct iwl3945_station_entry *station; 447 struct iwl3945_station_entry *station;
448 unsigned long flags_spin; 448 unsigned long flags_spin;
449 DECLARE_MAC_BUF(mac);
450 u8 rate; 449 u8 rate;
451 450
452 spin_lock_irqsave(&priv->sta_lock, flags_spin); 451 spin_lock_irqsave(&priv->sta_lock, flags_spin);
@@ -480,7 +479,7 @@ u8 iwl3945_add_station(struct iwl3945_priv *priv, const u8 *addr, int is_ap, u8
480 return index; 479 return index;
481 } 480 }
482 481
483 IWL_DEBUG_ASSOC("Add STA ID %d: %s\n", index, print_mac(mac, addr)); 482 IWL_DEBUG_ASSOC("Add STA ID %d: %pM\n", index, addr);
484 station = &priv->stations[index]; 483 station = &priv->stations[index];
485 station->used = 1; 484 station->used = 1;
486 priv->num_stations++; 485 priv->num_stations++;
@@ -1063,7 +1062,6 @@ static int iwl3945_commit_rxon(struct iwl3945_priv *priv)
1063 /* cast away the const for active_rxon in this function */ 1062 /* cast away the const for active_rxon in this function */
1064 struct iwl3945_rxon_cmd *active_rxon = (void *)&priv->active_rxon; 1063 struct iwl3945_rxon_cmd *active_rxon = (void *)&priv->active_rxon;
1065 int rc = 0; 1064 int rc = 0;
1066 DECLARE_MAC_BUF(mac);
1067 1065
1068 if (!iwl3945_is_alive(priv)) 1066 if (!iwl3945_is_alive(priv))
1069 return -1; 1067 return -1;
@@ -1124,11 +1122,11 @@ static int iwl3945_commit_rxon(struct iwl3945_priv *priv)
1124 IWL_DEBUG_INFO("Sending RXON\n" 1122 IWL_DEBUG_INFO("Sending RXON\n"
1125 "* with%s RXON_FILTER_ASSOC_MSK\n" 1123 "* with%s RXON_FILTER_ASSOC_MSK\n"
1126 "* channel = %d\n" 1124 "* channel = %d\n"
1127 "* bssid = %s\n", 1125 "* bssid = %pM\n",
1128 ((priv->staging_rxon.filter_flags & 1126 ((priv->staging_rxon.filter_flags &
1129 RXON_FILTER_ASSOC_MSK) ? "" : "out"), 1127 RXON_FILTER_ASSOC_MSK) ? "" : "out"),
1130 le16_to_cpu(priv->staging_rxon.channel), 1128 le16_to_cpu(priv->staging_rxon.channel),
1131 print_mac(mac, priv->staging_rxon.bssid_addr)); 1129 priv->staging_rxon.bssid_addr);
1132 1130
1133 /* Apply the new configuration */ 1131 /* Apply the new configuration */
1134 rc = iwl3945_send_cmd_pdu(priv, REPLY_RXON, 1132 rc = iwl3945_send_cmd_pdu(priv, REPLY_RXON,
@@ -2482,8 +2480,6 @@ static int iwl3945_get_sta_id(struct iwl3945_priv *priv, struct ieee80211_hdr *h
2482 /* If this frame is going out to an IBSS network, find the station, 2480 /* If this frame is going out to an IBSS network, find the station,
2483 * or create a new station table entry */ 2481 * or create a new station table entry */
2484 case NL80211_IFTYPE_ADHOC: { 2482 case NL80211_IFTYPE_ADHOC: {
2485 DECLARE_MAC_BUF(mac);
2486
2487 /* Create new station table entry */ 2483 /* Create new station table entry */
2488 sta_id = iwl3945_hw_find_station(priv, hdr->addr1); 2484 sta_id = iwl3945_hw_find_station(priv, hdr->addr1);
2489 if (sta_id != IWL_INVALID_STATION) 2485 if (sta_id != IWL_INVALID_STATION)
@@ -2494,9 +2490,9 @@ static int iwl3945_get_sta_id(struct iwl3945_priv *priv, struct ieee80211_hdr *h
2494 if (sta_id != IWL_INVALID_STATION) 2490 if (sta_id != IWL_INVALID_STATION)
2495 return sta_id; 2491 return sta_id;
2496 2492
2497 IWL_DEBUG_DROP("Station %s not in station map. " 2493 IWL_DEBUG_DROP("Station %pM not in station map. "
2498 "Defaulting to broadcast...\n", 2494 "Defaulting to broadcast...\n",
2499 print_mac(mac, hdr->addr1)); 2495 hdr->addr1);
2500 iwl3945_print_hex_dump(IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr)); 2496 iwl3945_print_hex_dump(IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr));
2501 return priv->hw_setting.bcast_sta_id; 2497 return priv->hw_setting.bcast_sta_id;
2502 } 2498 }
@@ -2579,10 +2575,8 @@ static int iwl3945_tx_skb(struct iwl3945_priv *priv, struct sk_buff *skb)
2579 /* Find (or create) index into station table for destination station */ 2575 /* Find (or create) index into station table for destination station */
2580 sta_id = iwl3945_get_sta_id(priv, hdr); 2576 sta_id = iwl3945_get_sta_id(priv, hdr);
2581 if (sta_id == IWL_INVALID_STATION) { 2577 if (sta_id == IWL_INVALID_STATION) {
2582 DECLARE_MAC_BUF(mac); 2578 IWL_DEBUG_DROP("Dropping - INVALID STATION: %pM\n",
2583 2579 hdr->addr1);
2584 IWL_DEBUG_DROP("Dropping - INVALID STATION: %s\n",
2585 print_mac(mac, hdr->addr1));
2586 goto drop; 2580 goto drop;
2587 } 2581 }
2588 2582
@@ -4019,8 +4013,6 @@ static int iwl3945_tx_queue_update_write_ptr(struct iwl3945_priv *priv,
4019#ifdef CONFIG_IWL3945_DEBUG 4013#ifdef CONFIG_IWL3945_DEBUG
4020static void iwl3945_print_rx_config_cmd(struct iwl3945_rxon_cmd *rxon) 4014static void iwl3945_print_rx_config_cmd(struct iwl3945_rxon_cmd *rxon)
4021{ 4015{
4022 DECLARE_MAC_BUF(mac);
4023
4024 IWL_DEBUG_RADIO("RX CONFIG:\n"); 4016 IWL_DEBUG_RADIO("RX CONFIG:\n");
4025 iwl3945_print_hex_dump(IWL_DL_RADIO, (u8 *) rxon, sizeof(*rxon)); 4017 iwl3945_print_hex_dump(IWL_DL_RADIO, (u8 *) rxon, sizeof(*rxon));
4026 IWL_DEBUG_RADIO("u16 channel: 0x%x\n", le16_to_cpu(rxon->channel)); 4018 IWL_DEBUG_RADIO("u16 channel: 0x%x\n", le16_to_cpu(rxon->channel));
@@ -4031,10 +4023,8 @@ static void iwl3945_print_rx_config_cmd(struct iwl3945_rxon_cmd *rxon)
4031 IWL_DEBUG_RADIO("u8 ofdm_basic_rates: 0x%02x\n", 4023 IWL_DEBUG_RADIO("u8 ofdm_basic_rates: 0x%02x\n",
4032 rxon->ofdm_basic_rates); 4024 rxon->ofdm_basic_rates);
4033 IWL_DEBUG_RADIO("u8 cck_basic_rates: 0x%02x\n", rxon->cck_basic_rates); 4025 IWL_DEBUG_RADIO("u8 cck_basic_rates: 0x%02x\n", rxon->cck_basic_rates);
4034 IWL_DEBUG_RADIO("u8[6] node_addr: %s\n", 4026 IWL_DEBUG_RADIO("u8[6] node_addr: %pM\n", rxon->node_addr);
4035 print_mac(mac, rxon->node_addr)); 4027 IWL_DEBUG_RADIO("u8[6] bssid_addr: %pM\n", rxon->bssid_addr);
4036 IWL_DEBUG_RADIO("u8[6] bssid_addr: %s\n",
4037 print_mac(mac, rxon->bssid_addr));
4038 IWL_DEBUG_RADIO("u16 assoc_id: 0x%x\n", le16_to_cpu(rxon->assoc_id)); 4028 IWL_DEBUG_RADIO("u16 assoc_id: 0x%x\n", le16_to_cpu(rxon->assoc_id));
4039} 4029}
4040#endif 4030#endif
@@ -6321,7 +6311,6 @@ static void iwl3945_post_associate(struct iwl3945_priv *priv)
6321{ 6311{
6322 int rc = 0; 6312 int rc = 0;
6323 struct ieee80211_conf *conf = NULL; 6313 struct ieee80211_conf *conf = NULL;
6324 DECLARE_MAC_BUF(mac);
6325 6314
6326 if (priv->iw_mode == NL80211_IFTYPE_AP) { 6315 if (priv->iw_mode == NL80211_IFTYPE_AP) {
6327 IWL_ERROR("%s Should not be called in AP mode\n", __func__); 6316 IWL_ERROR("%s Should not be called in AP mode\n", __func__);
@@ -6329,9 +6318,8 @@ static void iwl3945_post_associate(struct iwl3945_priv *priv)
6329 } 6318 }
6330 6319
6331 6320
6332 IWL_DEBUG_ASSOC("Associated as %d to: %s\n", 6321 IWL_DEBUG_ASSOC("Associated as %d to: %pM\n",
6333 priv->assoc_id, 6322 priv->assoc_id, priv->active_rxon.bssid_addr);
6334 print_mac(mac, priv->active_rxon.bssid_addr));
6335 6323
6336 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 6324 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
6337 return; 6325 return;
@@ -6592,7 +6580,6 @@ static int iwl3945_mac_add_interface(struct ieee80211_hw *hw,
6592{ 6580{
6593 struct iwl3945_priv *priv = hw->priv; 6581 struct iwl3945_priv *priv = hw->priv;
6594 unsigned long flags; 6582 unsigned long flags;
6595 DECLARE_MAC_BUF(mac);
6596 6583
6597 IWL_DEBUG_MAC80211("enter: type %d\n", conf->type); 6584 IWL_DEBUG_MAC80211("enter: type %d\n", conf->type);
6598 6585
@@ -6609,7 +6596,7 @@ static int iwl3945_mac_add_interface(struct ieee80211_hw *hw,
6609 mutex_lock(&priv->mutex); 6596 mutex_lock(&priv->mutex);
6610 6597
6611 if (conf->mac_addr) { 6598 if (conf->mac_addr) {
6612 IWL_DEBUG_MAC80211("Set: %s\n", print_mac(mac, conf->mac_addr)); 6599 IWL_DEBUG_MAC80211("Set: %pM\n", conf->mac_addr);
6613 memcpy(priv->mac_addr, conf->mac_addr, ETH_ALEN); 6600 memcpy(priv->mac_addr, conf->mac_addr, ETH_ALEN);
6614 } 6601 }
6615 6602
@@ -6778,7 +6765,6 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw,
6778 struct ieee80211_if_conf *conf) 6765 struct ieee80211_if_conf *conf)
6779{ 6766{
6780 struct iwl3945_priv *priv = hw->priv; 6767 struct iwl3945_priv *priv = hw->priv;
6781 DECLARE_MAC_BUF(mac);
6782 unsigned long flags; 6768 unsigned long flags;
6783 int rc; 6769 int rc;
6784 6770
@@ -6816,8 +6802,7 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw,
6816 mutex_lock(&priv->mutex); 6802 mutex_lock(&priv->mutex);
6817 6803
6818 if (conf->bssid) 6804 if (conf->bssid)
6819 IWL_DEBUG_MAC80211("bssid: %s\n", 6805 IWL_DEBUG_MAC80211("bssid: %pM\n", conf->bssid);
6820 print_mac(mac, conf->bssid));
6821 6806
6822/* 6807/*
6823 * very dubious code was here; the probe filtering flag is never set: 6808 * very dubious code was here; the probe filtering flag is never set:
@@ -6830,8 +6815,8 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw,
6830 if (!conf->bssid) { 6815 if (!conf->bssid) {
6831 conf->bssid = priv->mac_addr; 6816 conf->bssid = priv->mac_addr;
6832 memcpy(priv->bssid, priv->mac_addr, ETH_ALEN); 6817 memcpy(priv->bssid, priv->mac_addr, ETH_ALEN);
6833 IWL_DEBUG_MAC80211("bssid was set to: %s\n", 6818 IWL_DEBUG_MAC80211("bssid was set to: %pM\n",
6834 print_mac(mac, conf->bssid)); 6819 conf->bssid);
6835 } 6820 }
6836 if (priv->ibss_beacon) 6821 if (priv->ibss_beacon)
6837 dev_kfree_skb(priv->ibss_beacon); 6822 dev_kfree_skb(priv->ibss_beacon);
@@ -7072,10 +7057,8 @@ static int iwl3945_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
7072 7057
7073 sta_id = iwl3945_hw_find_station(priv, addr); 7058 sta_id = iwl3945_hw_find_station(priv, addr);
7074 if (sta_id == IWL_INVALID_STATION) { 7059 if (sta_id == IWL_INVALID_STATION) {
7075 DECLARE_MAC_BUF(mac); 7060 IWL_DEBUG_MAC80211("leave - %pM not in station map.\n",
7076 7061 addr);
7077 IWL_DEBUG_MAC80211("leave - %s not in station map.\n",
7078 print_mac(mac, addr));
7079 return -EINVAL; 7062 return -EINVAL;
7080 } 7063 }
7081 7064
@@ -7870,7 +7853,6 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
7870 struct ieee80211_hw *hw; 7853 struct ieee80211_hw *hw;
7871 struct iwl_3945_cfg *cfg = (struct iwl_3945_cfg *)(ent->driver_data); 7854 struct iwl_3945_cfg *cfg = (struct iwl_3945_cfg *)(ent->driver_data);
7872 unsigned long flags; 7855 unsigned long flags;
7873 DECLARE_MAC_BUF(mac);
7874 7856
7875 /* Disabling hardware scan means that mac80211 will perform scans 7857 /* Disabling hardware scan means that mac80211 will perform scans
7876 * "the hard way", rather than using device's scan. */ 7858 * "the hard way", rather than using device's scan. */
@@ -8045,7 +8027,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
8045 } 8027 }
8046 /* MAC Address location in EEPROM same for 3945/4965 */ 8028 /* MAC Address location in EEPROM same for 3945/4965 */
8047 get_eeprom_mac(priv, priv->mac_addr); 8029 get_eeprom_mac(priv, priv->mac_addr);
8048 IWL_DEBUG_INFO("MAC address: %s\n", print_mac(mac, priv->mac_addr)); 8030 IWL_DEBUG_INFO("MAC address: %pM\n", priv->mac_addr);
8049 SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr); 8031 SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr);
8050 8032
8051 err = iwl3945_init_channel_map(priv); 8033 err = iwl3945_init_channel_map(priv);
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c
index 92be60415d04..8b88e9544418 100644
--- a/drivers/net/wireless/libertas/assoc.c
+++ b/drivers/net/wireless/libertas/assoc.c
@@ -151,7 +151,6 @@ static int lbs_adhoc_join(struct lbs_private *priv,
151 struct cmd_ds_802_11_ad_hoc_join cmd; 151 struct cmd_ds_802_11_ad_hoc_join cmd;
152 struct bss_descriptor *bss = &assoc_req->bss; 152 struct bss_descriptor *bss = &assoc_req->bss;
153 u8 preamble = RADIO_PREAMBLE_LONG; 153 u8 preamble = RADIO_PREAMBLE_LONG;
154 DECLARE_MAC_BUF(mac);
155 u16 ratesize = 0; 154 u16 ratesize = 0;
156 int ret = 0; 155 int ret = 0;
157 156
@@ -226,8 +225,8 @@ static int lbs_adhoc_join(struct lbs_private *priv,
226 bss->capability, CAPINFO_MASK); 225 bss->capability, CAPINFO_MASK);
227 226
228 /* information on BSSID descriptor passed to FW */ 227 /* information on BSSID descriptor passed to FW */
229 lbs_deb_join("ADHOC_J_CMD: BSSID = %s, SSID = '%s'\n", 228 lbs_deb_join("ADHOC_J_CMD: BSSID = %pM, SSID = '%s'\n",
230 print_mac(mac, cmd.bss.bssid), cmd.bss.ssid); 229 cmd.bss.bssid, cmd.bss.ssid);
231 230
232 /* Only v8 and below support setting these */ 231 /* Only v8 and below support setting these */
233 if (priv->fwrelease < 0x09000000) { 232 if (priv->fwrelease < 0x09000000) {
@@ -752,17 +751,15 @@ static int assoc_helper_bssid(struct lbs_private *priv,
752{ 751{
753 int ret = 0; 752 int ret = 0;
754 struct bss_descriptor * bss; 753 struct bss_descriptor * bss;
755 DECLARE_MAC_BUF(mac);
756 754
757 lbs_deb_enter_args(LBS_DEB_ASSOC, "BSSID %s", 755 lbs_deb_enter_args(LBS_DEB_ASSOC, "BSSID %pM", assoc_req->bssid);
758 print_mac(mac, assoc_req->bssid));
759 756
760 /* Search for index position in list for requested MAC */ 757 /* Search for index position in list for requested MAC */
761 bss = lbs_find_bssid_in_list(priv, assoc_req->bssid, 758 bss = lbs_find_bssid_in_list(priv, assoc_req->bssid,
762 assoc_req->mode); 759 assoc_req->mode);
763 if (bss == NULL) { 760 if (bss == NULL) {
764 lbs_deb_assoc("ASSOC: WAP: BSSID %s not found, " 761 lbs_deb_assoc("ASSOC: WAP: BSSID %pM not found, "
765 "cannot associate.\n", print_mac(mac, assoc_req->bssid)); 762 "cannot associate.\n", assoc_req->bssid);
766 goto out; 763 goto out;
767 } 764 }
768 765
@@ -1208,7 +1205,6 @@ void lbs_association_worker(struct work_struct *work)
1208 struct assoc_request * assoc_req = NULL; 1205 struct assoc_request * assoc_req = NULL;
1209 int ret = 0; 1206 int ret = 0;
1210 int find_any_ssid = 0; 1207 int find_any_ssid = 0;
1211 DECLARE_MAC_BUF(mac);
1212 1208
1213 lbs_deb_enter(LBS_DEB_ASSOC); 1209 lbs_deb_enter(LBS_DEB_ASSOC);
1214 1210
@@ -1228,13 +1224,13 @@ void lbs_association_worker(struct work_struct *work)
1228 " chann: %d\n" 1224 " chann: %d\n"
1229 " band: %d\n" 1225 " band: %d\n"
1230 " mode: %d\n" 1226 " mode: %d\n"
1231 " BSSID: %s\n" 1227 " BSSID: %pM\n"
1232 " secinfo: %s%s%s\n" 1228 " secinfo: %s%s%s\n"
1233 " auth_mode: %d\n", 1229 " auth_mode: %d\n",
1234 assoc_req->flags, 1230 assoc_req->flags,
1235 escape_essid(assoc_req->ssid, assoc_req->ssid_len), 1231 escape_essid(assoc_req->ssid, assoc_req->ssid_len),
1236 assoc_req->channel, assoc_req->band, assoc_req->mode, 1232 assoc_req->channel, assoc_req->band, assoc_req->mode,
1237 print_mac(mac, assoc_req->bssid), 1233 assoc_req->bssid,
1238 assoc_req->secinfo.WPAenabled ? " WPA" : "", 1234 assoc_req->secinfo.WPAenabled ? " WPA" : "",
1239 assoc_req->secinfo.WPA2enabled ? " WPA2" : "", 1235 assoc_req->secinfo.WPA2enabled ? " WPA2" : "",
1240 assoc_req->secinfo.wep_enabled ? " WEP" : "", 1236 assoc_req->secinfo.wep_enabled ? " WEP" : "",
@@ -1357,8 +1353,8 @@ void lbs_association_worker(struct work_struct *work)
1357 } 1353 }
1358 1354
1359 if (success) { 1355 if (success) {
1360 lbs_deb_assoc("associated to %s\n", 1356 lbs_deb_assoc("associated to %pM\n",
1361 print_mac(mac, priv->curbssparams.bssid)); 1357 priv->curbssparams.bssid);
1362 lbs_prepare_and_send_command(priv, 1358 lbs_prepare_and_send_command(priv,
1363 CMD_802_11_RSSI, 1359 CMD_802_11_RSSI,
1364 0, CMD_OPTION_WAITFORRSP, 0, NULL); 1360 0, CMD_OPTION_WAITFORRSP, 0, NULL);
@@ -1478,7 +1474,6 @@ int lbs_cmd_80211_authenticate(struct lbs_private *priv,
1478 struct cmd_ds_802_11_authenticate *pauthenticate = &cmd->params.auth; 1474 struct cmd_ds_802_11_authenticate *pauthenticate = &cmd->params.auth;
1479 int ret = -1; 1475 int ret = -1;
1480 u8 *bssid = pdata_buf; 1476 u8 *bssid = pdata_buf;
1481 DECLARE_MAC_BUF(mac);
1482 1477
1483 lbs_deb_enter(LBS_DEB_JOIN); 1478 lbs_deb_enter(LBS_DEB_JOIN);
1484 1479
@@ -1505,8 +1500,8 @@ int lbs_cmd_80211_authenticate(struct lbs_private *priv,
1505 1500
1506 memcpy(pauthenticate->macaddr, bssid, ETH_ALEN); 1501 memcpy(pauthenticate->macaddr, bssid, ETH_ALEN);
1507 1502
1508 lbs_deb_join("AUTH_CMD: BSSID %s, auth 0x%x\n", 1503 lbs_deb_join("AUTH_CMD: BSSID %pM, auth 0x%x\n",
1509 print_mac(mac, bssid), pauthenticate->authtype); 1504 bssid, pauthenticate->authtype);
1510 ret = 0; 1505 ret = 0;
1511 1506
1512out: 1507out:
@@ -1770,7 +1765,6 @@ static int lbs_adhoc_post(struct lbs_private *priv, struct cmd_header *resp)
1770 struct cmd_ds_802_11_ad_hoc_result *adhoc_resp; 1765 struct cmd_ds_802_11_ad_hoc_result *adhoc_resp;
1771 union iwreq_data wrqu; 1766 union iwreq_data wrqu;
1772 struct bss_descriptor *bss; 1767 struct bss_descriptor *bss;
1773 DECLARE_MAC_BUF(mac);
1774 1768
1775 lbs_deb_enter(LBS_DEB_JOIN); 1769 lbs_deb_enter(LBS_DEB_JOIN);
1776 1770
@@ -1819,9 +1813,9 @@ static int lbs_adhoc_post(struct lbs_private *priv, struct cmd_header *resp)
1819 wrqu.ap_addr.sa_family = ARPHRD_ETHER; 1813 wrqu.ap_addr.sa_family = ARPHRD_ETHER;
1820 wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL); 1814 wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL);
1821 1815
1822 lbs_deb_join("ADHOC_RESP: Joined/started '%s', BSSID %s, channel %d\n", 1816 lbs_deb_join("ADHOC_RESP: Joined/started '%s', BSSID %pM, channel %d\n",
1823 escape_essid(bss->ssid, bss->ssid_len), 1817 escape_essid(bss->ssid, bss->ssid_len),
1824 print_mac(mac, priv->curbssparams.bssid), 1818 priv->curbssparams.bssid,
1825 priv->curbssparams.channel); 1819 priv->curbssparams.channel);
1826 1820
1827done: 1821done:
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 297696de2da0..8542d85f36af 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -87,7 +87,6 @@ int lbs_update_hw_spec(struct lbs_private *priv)
87 struct cmd_ds_get_hw_spec cmd; 87 struct cmd_ds_get_hw_spec cmd;
88 int ret = -1; 88 int ret = -1;
89 u32 i; 89 u32 i;
90 DECLARE_MAC_BUF(mac);
91 90
92 lbs_deb_enter(LBS_DEB_CMD); 91 lbs_deb_enter(LBS_DEB_CMD);
93 92
@@ -110,8 +109,8 @@ int lbs_update_hw_spec(struct lbs_private *priv)
110 * CF card firmware 5.0.16p0: cap 0x00000303 109 * CF card firmware 5.0.16p0: cap 0x00000303
111 * USB dongle firmware 5.110.17p2: cap 0x00000303 110 * USB dongle firmware 5.110.17p2: cap 0x00000303
112 */ 111 */
113 lbs_pr_info("%s, fw %u.%u.%up%u, cap 0x%08x\n", 112 lbs_pr_info("%pM, fw %u.%u.%up%u, cap 0x%08x\n",
114 print_mac(mac, cmd.permanentaddr), 113 cmd.permanentaddr,
115 priv->fwrelease >> 24 & 0xff, 114 priv->fwrelease >> 24 & 0xff,
116 priv->fwrelease >> 16 & 0xff, 115 priv->fwrelease >> 16 & 0xff,
117 priv->fwrelease >> 8 & 0xff, 116 priv->fwrelease >> 8 & 0xff,
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c
index 0aa0ce3b2c42..5f6bee493f23 100644
--- a/drivers/net/wireless/libertas/debugfs.c
+++ b/drivers/net/wireless/libertas/debugfs.c
@@ -65,7 +65,6 @@ static ssize_t lbs_getscantable(struct file *file, char __user *userbuf,
65 int numscansdone = 0, res; 65 int numscansdone = 0, res;
66 unsigned long addr = get_zeroed_page(GFP_KERNEL); 66 unsigned long addr = get_zeroed_page(GFP_KERNEL);
67 char *buf = (char *)addr; 67 char *buf = (char *)addr;
68 DECLARE_MAC_BUF(mac);
69 struct bss_descriptor * iter_bss; 68 struct bss_descriptor * iter_bss;
70 69
71 pos += snprintf(buf+pos, len-pos, 70 pos += snprintf(buf+pos, len-pos,
@@ -77,10 +76,9 @@ static ssize_t lbs_getscantable(struct file *file, char __user *userbuf,
77 u16 privacy = (iter_bss->capability & WLAN_CAPABILITY_PRIVACY); 76 u16 privacy = (iter_bss->capability & WLAN_CAPABILITY_PRIVACY);
78 u16 spectrum_mgmt = (iter_bss->capability & WLAN_CAPABILITY_SPECTRUM_MGMT); 77 u16 spectrum_mgmt = (iter_bss->capability & WLAN_CAPABILITY_SPECTRUM_MGMT);
79 78
80 pos += snprintf(buf+pos, len-pos, 79 pos += snprintf(buf+pos, len-pos, "%02u| %03d | %04d | %pM |",
81 "%02u| %03d | %04d | %s |",
82 numscansdone, iter_bss->channel, iter_bss->rssi, 80 numscansdone, iter_bss->channel, iter_bss->rssi,
83 print_mac(mac, iter_bss->bssid)); 81 iter_bss->bssid);
84 pos += snprintf(buf+pos, len-pos, " %04x-", iter_bss->capability); 82 pos += snprintf(buf+pos, len-pos, " %04x-", iter_bss->capability);
85 pos += snprintf(buf+pos, len-pos, "%c%c%c |", 83 pos += snprintf(buf+pos, len-pos, "%c%c%c |",
86 ibss ? 'A' : 'I', privacy ? 'P' : ' ', 84 ibss ? 'A' : 'I', privacy ? 'P' : ' ',
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 73dc8c72402a..34a47f692bd6 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -588,7 +588,6 @@ static int lbs_add_mcast_addrs(struct cmd_ds_mac_multicast_adr *cmd,
588{ 588{
589 int i = nr_addrs; 589 int i = nr_addrs;
590 struct dev_mc_list *mc_list; 590 struct dev_mc_list *mc_list;
591 DECLARE_MAC_BUF(mac);
592 591
593 if ((dev->flags & (IFF_UP|IFF_MULTICAST)) != (IFF_UP|IFF_MULTICAST)) 592 if ((dev->flags & (IFF_UP|IFF_MULTICAST)) != (IFF_UP|IFF_MULTICAST))
594 return nr_addrs; 593 return nr_addrs;
@@ -596,16 +595,16 @@ static int lbs_add_mcast_addrs(struct cmd_ds_mac_multicast_adr *cmd,
596 netif_addr_lock_bh(dev); 595 netif_addr_lock_bh(dev);
597 for (mc_list = dev->mc_list; mc_list; mc_list = mc_list->next) { 596 for (mc_list = dev->mc_list; mc_list; mc_list = mc_list->next) {
598 if (mac_in_list(cmd->maclist, nr_addrs, mc_list->dmi_addr)) { 597 if (mac_in_list(cmd->maclist, nr_addrs, mc_list->dmi_addr)) {
599 lbs_deb_net("mcast address %s:%s skipped\n", dev->name, 598 lbs_deb_net("mcast address %s:%pM skipped\n", dev->name,
600 print_mac(mac, mc_list->dmi_addr)); 599 mc_list->dmi_addr);
601 continue; 600 continue;
602 } 601 }
603 602
604 if (i == MRVDRV_MAX_MULTICAST_LIST_SIZE) 603 if (i == MRVDRV_MAX_MULTICAST_LIST_SIZE)
605 break; 604 break;
606 memcpy(&cmd->maclist[6*i], mc_list->dmi_addr, ETH_ALEN); 605 memcpy(&cmd->maclist[6*i], mc_list->dmi_addr, ETH_ALEN);
607 lbs_deb_net("mcast address %s:%s added to filter\n", dev->name, 606 lbs_deb_net("mcast address %s:%pM added to filter\n", dev->name,
608 print_mac(mac, mc_list->dmi_addr)); 607 mc_list->dmi_addr);
609 i++; 608 i++;
610 } 609 }
611 netif_addr_unlock_bh(dev); 610 netif_addr_unlock_bh(dev);
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c
index 8f66903641b9..fcaef38d5df9 100644
--- a/drivers/net/wireless/libertas/scan.c
+++ b/drivers/net/wireless/libertas/scan.c
@@ -359,7 +359,6 @@ int lbs_scan_networks(struct lbs_private *priv, int full_scan)
359#ifdef CONFIG_LIBERTAS_DEBUG 359#ifdef CONFIG_LIBERTAS_DEBUG
360 struct bss_descriptor *iter; 360 struct bss_descriptor *iter;
361 int i = 0; 361 int i = 0;
362 DECLARE_MAC_BUF(mac);
363#endif 362#endif
364 363
365 lbs_deb_enter_args(LBS_DEB_SCAN, "full_scan %d", full_scan); 364 lbs_deb_enter_args(LBS_DEB_SCAN, "full_scan %d", full_scan);
@@ -451,8 +450,8 @@ int lbs_scan_networks(struct lbs_private *priv, int full_scan)
451 mutex_lock(&priv->lock); 450 mutex_lock(&priv->lock);
452 lbs_deb_scan("scan table:\n"); 451 lbs_deb_scan("scan table:\n");
453 list_for_each_entry(iter, &priv->network_list, list) 452 list_for_each_entry(iter, &priv->network_list, list)
454 lbs_deb_scan("%02d: BSSID %s, RSSI %d, SSID '%s'\n", 453 lbs_deb_scan("%02d: BSSID %pM, RSSI %d, SSID '%s'\n",
455 i++, print_mac(mac, iter->bssid), iter->rssi, 454 i++, iter->bssid, iter->rssi,
456 escape_essid(iter->ssid, iter->ssid_len)); 455 escape_essid(iter->ssid, iter->ssid_len));
457 mutex_unlock(&priv->lock); 456 mutex_unlock(&priv->lock);
458#endif 457#endif
@@ -512,7 +511,6 @@ static int lbs_process_bss(struct bss_descriptor *bss,
512 struct ieeetypes_dsparamset *pDS; 511 struct ieeetypes_dsparamset *pDS;
513 struct ieeetypes_cfparamset *pCF; 512 struct ieeetypes_cfparamset *pCF;
514 struct ieeetypes_ibssparamset *pibss; 513 struct ieeetypes_ibssparamset *pibss;
515 DECLARE_MAC_BUF(mac);
516 struct ieeetypes_countryinfoset *pcountryinfo; 514 struct ieeetypes_countryinfoset *pcountryinfo;
517 uint8_t *pos, *end, *p; 515 uint8_t *pos, *end, *p;
518 uint8_t n_ex_rates = 0, got_basic_rates = 0, n_basic_rates = 0; 516 uint8_t n_ex_rates = 0, got_basic_rates = 0, n_basic_rates = 0;
@@ -544,7 +542,7 @@ static int lbs_process_bss(struct bss_descriptor *bss,
544 *bytesleft -= beaconsize; 542 *bytesleft -= beaconsize;
545 543
546 memcpy(bss->bssid, pos, ETH_ALEN); 544 memcpy(bss->bssid, pos, ETH_ALEN);
547 lbs_deb_scan("process_bss: BSSID %s\n", print_mac(mac, bss->bssid)); 545 lbs_deb_scan("process_bss: BSSID %pM\n", bss->bssid);
548 pos += ETH_ALEN; 546 pos += ETH_ALEN;
549 547
550 if ((end - pos) < 12) { 548 if ((end - pos) < 12) {
@@ -1151,7 +1149,6 @@ static int lbs_ret_80211_scan(struct lbs_private *priv, unsigned long dummy,
1151 struct bss_descriptor new; 1149 struct bss_descriptor new;
1152 struct bss_descriptor *found = NULL; 1150 struct bss_descriptor *found = NULL;
1153 struct bss_descriptor *oldest = NULL; 1151 struct bss_descriptor *oldest = NULL;
1154 DECLARE_MAC_BUF(mac);
1155 1152
1156 /* Process the data fields and IEs returned for this BSS */ 1153 /* Process the data fields and IEs returned for this BSS */
1157 memset(&new, 0, sizeof (struct bss_descriptor)); 1154 memset(&new, 0, sizeof (struct bss_descriptor));
@@ -1190,7 +1187,7 @@ static int lbs_ret_80211_scan(struct lbs_private *priv, unsigned long dummy,
1190 continue; 1187 continue;
1191 } 1188 }
1192 1189
1193 lbs_deb_scan("SCAN_RESP: BSSID %s\n", print_mac(mac, new.bssid)); 1190 lbs_deb_scan("SCAN_RESP: BSSID %pM\n", new.bssid);
1194 1191
1195 /* Copy the locally created newbssentry to the scan table */ 1192 /* Copy the locally created newbssentry to the scan table */
1196 memcpy(found, &new, offsetof(struct bss_descriptor, list)); 1193 memcpy(found, &new, offsetof(struct bss_descriptor, list));
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c
index 82c3e5a50ea6..04f0bf2ef0a8 100644
--- a/drivers/net/wireless/libertas/wext.c
+++ b/drivers/net/wireless/libertas/wext.c
@@ -2104,7 +2104,6 @@ static int lbs_set_wap(struct net_device *dev, struct iw_request_info *info,
2104 struct lbs_private *priv = dev->priv; 2104 struct lbs_private *priv = dev->priv;
2105 struct assoc_request * assoc_req; 2105 struct assoc_request * assoc_req;
2106 int ret = 0; 2106 int ret = 0;
2107 DECLARE_MAC_BUF(mac);
2108 2107
2109 lbs_deb_enter(LBS_DEB_WEXT); 2108 lbs_deb_enter(LBS_DEB_WEXT);
2110 2109
@@ -2114,7 +2113,7 @@ static int lbs_set_wap(struct net_device *dev, struct iw_request_info *info,
2114 if (awrq->sa_family != ARPHRD_ETHER) 2113 if (awrq->sa_family != ARPHRD_ETHER)
2115 return -EINVAL; 2114 return -EINVAL;
2116 2115
2117 lbs_deb_wext("ASSOC: WAP: sa_data %s\n", print_mac(mac, awrq->sa_data)); 2116 lbs_deb_wext("ASSOC: WAP: sa_data %pM\n", awrq->sa_data);
2118 2117
2119 mutex_lock(&priv->lock); 2118 mutex_lock(&priv->lock);
2120 2119
diff --git a/drivers/net/wireless/libertas_tf/cmd.c b/drivers/net/wireless/libertas_tf/cmd.c
index fdbcf8ba3e8a..3d3914c83b14 100644
--- a/drivers/net/wireless/libertas_tf/cmd.c
+++ b/drivers/net/wireless/libertas_tf/cmd.c
@@ -79,7 +79,6 @@ int lbtf_update_hw_spec(struct lbtf_private *priv)
79 struct cmd_ds_get_hw_spec cmd; 79 struct cmd_ds_get_hw_spec cmd;
80 int ret = -1; 80 int ret = -1;
81 u32 i; 81 u32 i;
82 DECLARE_MAC_BUF(mac);
83 82
84 memset(&cmd, 0, sizeof(cmd)); 83 memset(&cmd, 0, sizeof(cmd));
85 cmd.hdr.size = cpu_to_le16(sizeof(cmd)); 84 cmd.hdr.size = cpu_to_le16(sizeof(cmd));
@@ -96,8 +95,8 @@ int lbtf_update_hw_spec(struct lbtf_private *priv)
96 priv->fwrelease = (priv->fwrelease << 8) | 95 priv->fwrelease = (priv->fwrelease << 8) |
97 (priv->fwrelease >> 24 & 0xff); 96 (priv->fwrelease >> 24 & 0xff);
98 97
99 printk(KERN_INFO "libertastf: %s, fw %u.%u.%up%u, cap 0x%08x\n", 98 printk(KERN_INFO "libertastf: %pM, fw %u.%u.%up%u, cap 0x%08x\n",
100 print_mac(mac, cmd.permanentaddr), 99 cmd.permanentaddr,
101 priv->fwrelease >> 24 & 0xff, 100 priv->fwrelease >> 24 & 0xff,
102 priv->fwrelease >> 16 & 0xff, 101 priv->fwrelease >> 16 & 0xff,
103 priv->fwrelease >> 8 & 0xff, 102 priv->fwrelease >> 8 & 0xff,
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 1a019e98dac3..88c5eec0607c 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -301,10 +301,9 @@ static void mac80211_hwsim_stop(struct ieee80211_hw *hw)
301static int mac80211_hwsim_add_interface(struct ieee80211_hw *hw, 301static int mac80211_hwsim_add_interface(struct ieee80211_hw *hw,
302 struct ieee80211_if_init_conf *conf) 302 struct ieee80211_if_init_conf *conf)
303{ 303{
304 DECLARE_MAC_BUF(mac); 304 printk(KERN_DEBUG "%s:%s (type=%d mac_addr=%pM)\n",
305 printk(KERN_DEBUG "%s:%s (type=%d mac_addr=%s)\n",
306 wiphy_name(hw->wiphy), __func__, conf->type, 305 wiphy_name(hw->wiphy), __func__, conf->type,
307 print_mac(mac, conf->mac_addr)); 306 conf->mac_addr);
308 hwsim_set_magic(conf->vif); 307 hwsim_set_magic(conf->vif);
309 return 0; 308 return 0;
310} 309}
@@ -313,10 +312,9 @@ static int mac80211_hwsim_add_interface(struct ieee80211_hw *hw,
313static void mac80211_hwsim_remove_interface( 312static void mac80211_hwsim_remove_interface(
314 struct ieee80211_hw *hw, struct ieee80211_if_init_conf *conf) 313 struct ieee80211_hw *hw, struct ieee80211_if_init_conf *conf)
315{ 314{
316 DECLARE_MAC_BUF(mac); 315 printk(KERN_DEBUG "%s:%s (type=%d mac_addr=%pM)\n",
317 printk(KERN_DEBUG "%s:%s (type=%d mac_addr=%s)\n",
318 wiphy_name(hw->wiphy), __func__, conf->type, 316 wiphy_name(hw->wiphy), __func__, conf->type,
319 print_mac(mac, conf->mac_addr)); 317 conf->mac_addr);
320 hwsim_check_magic(conf->vif); 318 hwsim_check_magic(conf->vif);
321 hwsim_clear_magic(conf->vif); 319 hwsim_clear_magic(conf->vif);
322} 320}
@@ -505,7 +503,6 @@ static int __init init_mac80211_hwsim(void)
505 u8 addr[ETH_ALEN]; 503 u8 addr[ETH_ALEN];
506 struct mac80211_hwsim_data *data; 504 struct mac80211_hwsim_data *data;
507 struct ieee80211_hw *hw; 505 struct ieee80211_hw *hw;
508 DECLARE_MAC_BUF(mac);
509 506
510 if (radios < 1 || radios > 100) 507 if (radios < 1 || radios > 100)
511 return -EINVAL; 508 return -EINVAL;
@@ -588,9 +585,9 @@ static int __init init_mac80211_hwsim(void)
588 goto failed_hw; 585 goto failed_hw;
589 } 586 }
590 587
591 printk(KERN_DEBUG "%s: hwaddr %s registered\n", 588 printk(KERN_DEBUG "%s: hwaddr %pM registered\n",
592 wiphy_name(hw->wiphy), 589 wiphy_name(hw->wiphy),
593 print_mac(mac, hw->wiphy->perm_addr)); 590 hw->wiphy->perm_addr);
594 591
595 setup_timer(&data->beacon_timer, mac80211_hwsim_beacon, 592 setup_timer(&data->beacon_timer, mac80211_hwsim_beacon,
596 (unsigned long) hw); 593 (unsigned long) hw);
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c
index a670f36b5f3f..be80c0093b79 100644
--- a/drivers/net/wireless/netwave_cs.c
+++ b/drivers/net/wireless/netwave_cs.c
@@ -737,7 +737,6 @@ static int netwave_pcmcia_config(struct pcmcia_device *link) {
737 win_req_t req; 737 win_req_t req;
738 memreq_t mem; 738 memreq_t mem;
739 u_char __iomem *ramBase = NULL; 739 u_char __iomem *ramBase = NULL;
740 DECLARE_MAC_BUF(mac);
741 740
742 DEBUG(0, "netwave_pcmcia_config(0x%p)\n", link); 741 DEBUG(0, "netwave_pcmcia_config(0x%p)\n", link);
743 742
@@ -808,12 +807,12 @@ static int netwave_pcmcia_config(struct pcmcia_device *link) {
808 dev->dev_addr[i] = readb(ramBase + NETWAVE_EREG_PA + i); 807 dev->dev_addr[i] = readb(ramBase + NETWAVE_EREG_PA + i);
809 808
810 printk(KERN_INFO "%s: Netwave: port %#3lx, irq %d, mem %lx, " 809 printk(KERN_INFO "%s: Netwave: port %#3lx, irq %d, mem %lx, "
811 "id %c%c, hw_addr %s\n", 810 "id %c%c, hw_addr %pM\n",
812 dev->name, dev->base_addr, dev->irq, 811 dev->name, dev->base_addr, dev->irq,
813 (u_long) ramBase, 812 (u_long) ramBase,
814 (int) readb(ramBase+NETWAVE_EREG_NI), 813 (int) readb(ramBase+NETWAVE_EREG_NI),
815 (int) readb(ramBase+NETWAVE_EREG_NI+1), 814 (int) readb(ramBase+NETWAVE_EREG_NI+1),
816 print_mac(mac, dev->dev_addr)); 815 dev->dev_addr);
817 816
818 /* get revision words */ 817 /* get revision words */
819 printk(KERN_DEBUG "Netwave_reset: revision %04x %04x\n", 818 printk(KERN_DEBUG "Netwave_reset: revision %04x %04x\n",
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c
index e0512e49d6d3..366556fafaee 100644
--- a/drivers/net/wireless/orinoco.c
+++ b/drivers/net/wireless/orinoco.c
@@ -1477,12 +1477,11 @@ static void orinoco_rx(struct net_device *dev,
1477 MICHAEL_MIC_LEN)) { 1477 MICHAEL_MIC_LEN)) {
1478 union iwreq_data wrqu; 1478 union iwreq_data wrqu;
1479 struct iw_michaelmicfailure wxmic; 1479 struct iw_michaelmicfailure wxmic;
1480 DECLARE_MAC_BUF(mac);
1481 1480
1482 printk(KERN_WARNING "%s: " 1481 printk(KERN_WARNING "%s: "
1483 "Invalid Michael MIC in data frame from %s, " 1482 "Invalid Michael MIC in data frame from %pM, "
1484 "using key %i\n", 1483 "using key %i\n",
1485 dev->name, print_mac(mac, src), key_id); 1484 dev->name, src, key_id);
1486 1485
1487 /* TODO: update stats */ 1486 /* TODO: update stats */
1488 1487
@@ -3277,7 +3276,6 @@ static int orinoco_init(struct net_device *dev)
3277 struct hermes_idstring nickbuf; 3276 struct hermes_idstring nickbuf;
3278 u16 reclen; 3277 u16 reclen;
3279 int len; 3278 int len;
3280 DECLARE_MAC_BUF(mac);
3281 3279
3282 /* No need to lock, the hw_unavailable flag is already set in 3280 /* No need to lock, the hw_unavailable flag is already set in
3283 * alloc_orinocodev() */ 3281 * alloc_orinocodev() */
@@ -3348,8 +3346,8 @@ static int orinoco_init(struct net_device *dev)
3348 goto out; 3346 goto out;
3349 } 3347 }
3350 3348
3351 printk(KERN_DEBUG "%s: MAC address %s\n", 3349 printk(KERN_DEBUG "%s: MAC address %pM\n",
3352 dev->name, print_mac(mac, dev->dev_addr)); 3350 dev->name, dev->dev_addr);
3353 3351
3354 /* Get the station name */ 3352 /* Get the station name */
3355 err = hermes_read_ltv(hw, USER_BAP, HERMES_RID_CNFOWNNAME, 3353 err = hermes_read_ltv(hw, USER_BAP, HERMES_RID_CNFOWNNAME,
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c
index 2d022f83774c..72859decd907 100644
--- a/drivers/net/wireless/p54/p54common.c
+++ b/drivers/net/wireless/p54/p54common.c
@@ -320,7 +320,6 @@ static int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
320 int err; 320 int err;
321 u8 *end = (u8 *)eeprom + len; 321 u8 *end = (u8 *)eeprom + len;
322 u16 synth; 322 u16 synth;
323 DECLARE_MAC_BUF(mac);
324 323
325 wrap = (struct eeprom_pda_wrap *) eeprom; 324 wrap = (struct eeprom_pda_wrap *) eeprom;
326 entry = (void *)wrap->data + le16_to_cpu(wrap->len); 325 entry = (void *)wrap->data + le16_to_cpu(wrap->len);
@@ -445,9 +444,9 @@ static int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
445 SET_IEEE80211_PERM_ADDR(dev, perm_addr); 444 SET_IEEE80211_PERM_ADDR(dev, perm_addr);
446 } 445 }
447 446
448 printk(KERN_INFO "%s: hwaddr %s, MAC:isl38%02x RF:%s\n", 447 printk(KERN_INFO "%s: hwaddr %pM, MAC:isl38%02x RF:%s\n",
449 wiphy_name(dev->wiphy), 448 wiphy_name(dev->wiphy),
450 print_mac(mac, dev->wiphy->perm_addr), 449 dev->wiphy->perm_addr,
451 priv->version, p54_rf_chips[priv->rxhw]); 450 priv->version, p54_rf_chips[priv->rxhw]);
452 451
453 return 0; 452 return 0;
diff --git a/drivers/net/wireless/p54/p54pci.c b/drivers/net/wireless/p54/p54pci.c
index 1c2a02a741af..194237b66424 100644
--- a/drivers/net/wireless/p54/p54pci.c
+++ b/drivers/net/wireless/p54/p54pci.c
@@ -481,7 +481,6 @@ static int __devinit p54p_probe(struct pci_dev *pdev,
481 struct ieee80211_hw *dev; 481 struct ieee80211_hw *dev;
482 unsigned long mem_addr, mem_len; 482 unsigned long mem_addr, mem_len;
483 int err; 483 int err;
484 DECLARE_MAC_BUF(mac);
485 484
486 err = pci_enable_device(pdev); 485 err = pci_enable_device(pdev);
487 if (err) { 486 if (err) {
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
index 75d749bccb0d..68f1b80f04d9 100644
--- a/drivers/net/wireless/p54/p54usb.c
+++ b/drivers/net/wireless/p54/p54usb.c
@@ -786,7 +786,6 @@ static int __devinit p54u_probe(struct usb_interface *intf,
786 struct p54u_priv *priv; 786 struct p54u_priv *priv;
787 int err; 787 int err;
788 unsigned int i, recognized_pipes; 788 unsigned int i, recognized_pipes;
789 DECLARE_MAC_BUF(mac);
790 789
791 dev = p54_init_common(sizeof(*priv)); 790 dev = p54_init_common(sizeof(*priv));
792 if (!dev) { 791 if (!dev) {
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c
index 16e68f4b654a..57a150a22de5 100644
--- a/drivers/net/wireless/prism54/isl_ioctl.c
+++ b/drivers/net/wireless/prism54/isl_ioctl.c
@@ -2028,12 +2028,11 @@ static void
2028format_event(islpci_private *priv, char *dest, const char *str, 2028format_event(islpci_private *priv, char *dest, const char *str,
2029 const struct obj_mlme *mlme, u16 *length, int error) 2029 const struct obj_mlme *mlme, u16 *length, int error)
2030{ 2030{
2031 DECLARE_MAC_BUF(mac);
2032 int n = snprintf(dest, IW_CUSTOM_MAX, 2031 int n = snprintf(dest, IW_CUSTOM_MAX,
2033 "%s %s %s %s (%2.2X)", 2032 "%s %s %pM %s (%2.2X)",
2034 str, 2033 str,
2035 ((priv->iw_mode == IW_MODE_MASTER) ? "from" : "to"), 2034 ((priv->iw_mode == IW_MODE_MASTER) ? "from" : "to"),
2036 print_mac(mac, mlme->address), 2035 mlme->address,
2037 (error ? (mlme->code ? " : REJECTED " : " : ACCEPTED ") 2036 (error ? (mlme->code ? " : REJECTED " : " : ACCEPTED ")
2038 : ""), mlme->code); 2037 : ""), mlme->code);
2039 BUG_ON(n > IW_CUSTOM_MAX); 2038 BUG_ON(n > IW_CUSTOM_MAX);
@@ -2113,7 +2112,6 @@ prism54_wpa_bss_ie_add(islpci_private *priv, u8 *bssid,
2113{ 2112{
2114 struct list_head *ptr; 2113 struct list_head *ptr;
2115 struct islpci_bss_wpa_ie *bss = NULL; 2114 struct islpci_bss_wpa_ie *bss = NULL;
2116 DECLARE_MAC_BUF(mac);
2117 2115
2118 if (wpa_ie_len > MAX_WPA_IE_LEN) 2116 if (wpa_ie_len > MAX_WPA_IE_LEN)
2119 wpa_ie_len = MAX_WPA_IE_LEN; 2117 wpa_ie_len = MAX_WPA_IE_LEN;
@@ -2154,7 +2152,7 @@ prism54_wpa_bss_ie_add(islpci_private *priv, u8 *bssid,
2154 bss->last_update = jiffies; 2152 bss->last_update = jiffies;
2155 } else { 2153 } else {
2156 printk(KERN_DEBUG "Failed to add BSS WPA entry for " 2154 printk(KERN_DEBUG "Failed to add BSS WPA entry for "
2157 "%s\n", print_mac(mac, bssid)); 2155 "%pM\n", bssid);
2158 } 2156 }
2159 2157
2160 /* expire old entries from WPA list */ 2158 /* expire old entries from WPA list */
@@ -2219,7 +2217,6 @@ prism54_process_bss_data(islpci_private *priv, u32 oid, u8 *addr,
2219{ 2217{
2220 struct ieee80211_beacon_phdr *hdr; 2218 struct ieee80211_beacon_phdr *hdr;
2221 u8 *pos, *end; 2219 u8 *pos, *end;
2222 DECLARE_MAC_BUF(mac);
2223 2220
2224 if (!priv->wpa) 2221 if (!priv->wpa)
2225 return; 2222 return;
@@ -2230,7 +2227,7 @@ prism54_process_bss_data(islpci_private *priv, u32 oid, u8 *addr,
2230 while (pos < end) { 2227 while (pos < end) {
2231 if (pos + 2 + pos[1] > end) { 2228 if (pos + 2 + pos[1] > end) {
2232 printk(KERN_DEBUG "Parsing Beacon/ProbeResp failed " 2229 printk(KERN_DEBUG "Parsing Beacon/ProbeResp failed "
2233 "for %s\n", print_mac(mac, addr)); 2230 "for %pM\n", addr);
2234 return; 2231 return;
2235 } 2232 }
2236 if (pos[0] == WLAN_EID_GENERIC && pos[1] >= 4 && 2233 if (pos[0] == WLAN_EID_GENERIC && pos[1] >= 4 &&
@@ -2269,7 +2266,6 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid,
2269 size_t len = 0; /* u16, better? */ 2266 size_t len = 0; /* u16, better? */
2270 u8 *payload = NULL, *pos = NULL; 2267 u8 *payload = NULL, *pos = NULL;
2271 int ret; 2268 int ret;
2272 DECLARE_MAC_BUF(mac);
2273 2269
2274 /* I think all trapable objects are listed here. 2270 /* I think all trapable objects are listed here.
2275 * Some oids have a EX version. The difference is that they are emitted 2271 * Some oids have a EX version. The difference is that they are emitted
@@ -2358,8 +2354,8 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid,
2358 break; 2354 break;
2359 2355
2360 memcpy(&confirm->address, mlmeex->address, ETH_ALEN); 2356 memcpy(&confirm->address, mlmeex->address, ETH_ALEN);
2361 printk(KERN_DEBUG "Authenticate from: address:\t%s\n", 2357 printk(KERN_DEBUG "Authenticate from: address:\t%pM\n",
2362 print_mac(mac, mlmeex->address)); 2358 mlmeex->address);
2363 confirm->id = -1; /* or mlmeex->id ? */ 2359 confirm->id = -1; /* or mlmeex->id ? */
2364 confirm->state = 0; /* not used */ 2360 confirm->state = 0; /* not used */
2365 confirm->code = 0; 2361 confirm->code = 0;
@@ -2404,8 +2400,8 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid,
2404 wpa_ie_len = prism54_wpa_bss_ie_get(priv, mlmeex->address, wpa_ie); 2400 wpa_ie_len = prism54_wpa_bss_ie_get(priv, mlmeex->address, wpa_ie);
2405 2401
2406 if (!wpa_ie_len) { 2402 if (!wpa_ie_len) {
2407 printk(KERN_DEBUG "No WPA IE found from address:\t%s\n", 2403 printk(KERN_DEBUG "No WPA IE found from address:\t%pM\n",
2408 print_mac(mac, mlmeex->address)); 2404 mlmeex->address);
2409 kfree(confirm); 2405 kfree(confirm);
2410 break; 2406 break;
2411 } 2407 }
@@ -2441,8 +2437,8 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid,
2441 wpa_ie_len = prism54_wpa_bss_ie_get(priv, mlmeex->address, wpa_ie); 2437 wpa_ie_len = prism54_wpa_bss_ie_get(priv, mlmeex->address, wpa_ie);
2442 2438
2443 if (!wpa_ie_len) { 2439 if (!wpa_ie_len) {
2444 printk(KERN_DEBUG "No WPA IE found from address:\t%s\n", 2440 printk(KERN_DEBUG "No WPA IE found from address:\t%pM\n",
2445 print_mac(mac, mlmeex->address)); 2441 mlmeex->address);
2446 kfree(confirm); 2442 kfree(confirm);
2447 break; 2443 break;
2448 } 2444 }
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 1404a5717520..bf0b9299b5df 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -414,7 +414,6 @@ static int ray_config(struct pcmcia_device *link)
414 memreq_t mem; 414 memreq_t mem;
415 struct net_device *dev = (struct net_device *)link->priv; 415 struct net_device *dev = (struct net_device *)link->priv;
416 ray_dev_t *local = netdev_priv(dev); 416 ray_dev_t *local = netdev_priv(dev);
417 DECLARE_MAC_BUF(mac);
418 417
419 DEBUG(1, "ray_config(0x%p)\n", link); 418 DEBUG(1, "ray_config(0x%p)\n", link);
420 419
@@ -485,8 +484,8 @@ static int ray_config(struct pcmcia_device *link)
485 strcpy(local->node.dev_name, dev->name); 484 strcpy(local->node.dev_name, dev->name);
486 link->dev_node = &local->node; 485 link->dev_node = &local->node;
487 486
488 printk(KERN_INFO "%s: RayLink, irq %d, hw_addr %s\n", 487 printk(KERN_INFO "%s: RayLink, irq %d, hw_addr %pM\n",
489 dev->name, dev->irq, print_mac(mac, dev->dev_addr)); 488 dev->name, dev->irq, dev->dev_addr);
490 489
491 return 0; 490 return 0;
492 491
@@ -2595,7 +2594,6 @@ static int ray_cs_proc_show(struct seq_file *m, void *v)
2595 UCHAR *p; 2594 UCHAR *p;
2596 struct freq_hop_element *pfh; 2595 struct freq_hop_element *pfh;
2597 UCHAR c[33]; 2596 UCHAR c[33];
2598 DECLARE_MAC_BUF(mac);
2599 2597
2600 link = this_device; 2598 link = this_device;
2601 if (!link) 2599 if (!link)
@@ -2623,8 +2621,7 @@ static int ray_cs_proc_show(struct seq_file *m, void *v)
2623 nettype[local->sparm.b5.a_network_type], c); 2621 nettype[local->sparm.b5.a_network_type], c);
2624 2622
2625 p = local->bss_id; 2623 p = local->bss_id;
2626 seq_printf(m, "BSSID = %s\n", 2624 seq_printf(m, "BSSID = %pM\n", p);
2627 print_mac(mac, p));
2628 2625
2629 seq_printf(m, "Country code = %d\n", 2626 seq_printf(m, "Country code = %d\n",
2630 local->sparm.b5.a_curr_country_code); 2627 local->sparm.b5.a_curr_country_code);
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index 2b414899dfa0..bd059e3c7e2b 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -1276,12 +1276,11 @@ static int rndis_iw_get_bssid(struct net_device *dev,
1276 struct usbnet *usbdev = dev->priv; 1276 struct usbnet *usbdev = dev->priv;
1277 unsigned char bssid[ETH_ALEN]; 1277 unsigned char bssid[ETH_ALEN];
1278 int ret; 1278 int ret;
1279 DECLARE_MAC_BUF(mac);
1280 1279
1281 ret = get_bssid(usbdev, bssid); 1280 ret = get_bssid(usbdev, bssid);
1282 1281
1283 if (ret == 0) 1282 if (ret == 0)
1284 devdbg(usbdev, "SIOCGIWAP: %s", print_mac(mac, bssid)); 1283 devdbg(usbdev, "SIOCGIWAP: %pM", bssid);
1285 else 1284 else
1286 devdbg(usbdev, "SIOCGIWAP: <not associated>"); 1285 devdbg(usbdev, "SIOCGIWAP: <not associated>");
1287 1286
@@ -1297,10 +1296,9 @@ static int rndis_iw_set_bssid(struct net_device *dev,
1297{ 1296{
1298 struct usbnet *usbdev = dev->priv; 1297 struct usbnet *usbdev = dev->priv;
1299 u8 *bssid = (u8 *)wrqu->ap_addr.sa_data; 1298 u8 *bssid = (u8 *)wrqu->ap_addr.sa_data;
1300 DECLARE_MAC_BUF(mac);
1301 int ret; 1299 int ret;
1302 1300
1303 devdbg(usbdev, "SIOCSIWAP: %s", print_mac(mac, bssid)); 1301 devdbg(usbdev, "SIOCSIWAP: %pM", bssid);
1304 1302
1305 ret = rndis_set_oid(usbdev, OID_802_11_BSSID, bssid, ETH_ALEN); 1303 ret = rndis_set_oid(usbdev, OID_802_11_BSSID, bssid, ETH_ALEN);
1306 1304
@@ -1660,11 +1658,10 @@ static char *rndis_translate_scan(struct net_device *dev,
1660 u32 beacon, atim; 1658 u32 beacon, atim;
1661 struct iw_event iwe; 1659 struct iw_event iwe;
1662 unsigned char sbuf[32]; 1660 unsigned char sbuf[32];
1663 DECLARE_MAC_BUF(mac);
1664 1661
1665 bssid_len = le32_to_cpu(bssid->length); 1662 bssid_len = le32_to_cpu(bssid->length);
1666 1663
1667 devdbg(usbdev, "BSSID %s", print_mac(mac, bssid->mac)); 1664 devdbg(usbdev, "BSSID %pM", bssid->mac);
1668 iwe.cmd = SIOCGIWAP; 1665 iwe.cmd = SIOCGIWAP;
1669 iwe.u.ap_addr.sa_family = ARPHRD_ETHER; 1666 iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
1670 memcpy(iwe.u.ap_addr.sa_data, bssid->mac, ETH_ALEN); 1667 memcpy(iwe.u.ap_addr.sa_data, bssid->mac, ETH_ALEN);
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index 08cb9eec16a6..96eaf5f4dc68 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -1313,10 +1313,8 @@ static int rt2400pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
1313 */ 1313 */
1314 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); 1314 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
1315 if (!is_valid_ether_addr(mac)) { 1315 if (!is_valid_ether_addr(mac)) {
1316 DECLARE_MAC_BUF(macbuf);
1317
1318 random_ether_addr(mac); 1316 random_ether_addr(mac);
1319 EEPROM(rt2x00dev, "MAC: %s\n", print_mac(macbuf, mac)); 1317 EEPROM(rt2x00dev, "MAC: %pM\n", mac);
1320 } 1318 }
1321 1319
1322 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); 1320 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word);
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index ef42cc04a2d7..8b772ab613e4 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -1451,11 +1451,8 @@ static int rt2500pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
1451 */ 1451 */
1452 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); 1452 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
1453 if (!is_valid_ether_addr(mac)) { 1453 if (!is_valid_ether_addr(mac)) {
1454 DECLARE_MAC_BUF(macbuf);
1455
1456 random_ether_addr(mac); 1454 random_ether_addr(mac);
1457 EEPROM(rt2x00dev, "MAC: %s\n", 1455 EEPROM(rt2x00dev, "MAC: %pM\n", mac);
1458 print_mac(macbuf, mac));
1459 } 1456 }
1460 1457
1461 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); 1458 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word);
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index d3bf7bba611a..d19bee43861d 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -1319,10 +1319,8 @@ static int rt2500usb_validate_eeprom(struct rt2x00_dev *rt2x00dev)
1319 */ 1319 */
1320 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); 1320 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
1321 if (!is_valid_ether_addr(mac)) { 1321 if (!is_valid_ether_addr(mac)) {
1322 DECLARE_MAC_BUF(macbuf);
1323
1324 random_ether_addr(mac); 1322 random_ether_addr(mac);
1325 EEPROM(rt2x00dev, "MAC: %s\n", print_mac(macbuf, mac)); 1323 EEPROM(rt2x00dev, "MAC: %pM\n", mac);
1326 } 1324 }
1327 1325
1328 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); 1326 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word);
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index a461620b489f..45f69f83552c 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -2175,10 +2175,8 @@ static int rt61pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
2175 */ 2175 */
2176 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); 2176 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
2177 if (!is_valid_ether_addr(mac)) { 2177 if (!is_valid_ether_addr(mac)) {
2178 DECLARE_MAC_BUF(macbuf);
2179
2180 random_ether_addr(mac); 2178 random_ether_addr(mac);
2181 EEPROM(rt2x00dev, "MAC: %s\n", print_mac(macbuf, mac)); 2179 EEPROM(rt2x00dev, "MAC: %pM\n", mac);
2182 } 2180 }
2183 2181
2184 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); 2182 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word);
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index 934f8e03c5aa..336fecb04c46 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -1781,10 +1781,8 @@ static int rt73usb_validate_eeprom(struct rt2x00_dev *rt2x00dev)
1781 */ 1781 */
1782 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); 1782 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
1783 if (!is_valid_ether_addr(mac)) { 1783 if (!is_valid_ether_addr(mac)) {
1784 DECLARE_MAC_BUF(macbuf);
1785
1786 random_ether_addr(mac); 1784 random_ether_addr(mac);
1787 EEPROM(rt2x00dev, "MAC: %s\n", print_mac(macbuf, mac)); 1785 EEPROM(rt2x00dev, "MAC: %pM\n", mac);
1788 } 1786 }
1789 1787
1790 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); 1788 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word);
diff --git a/drivers/net/wireless/rtl8180_dev.c b/drivers/net/wireless/rtl8180_dev.c
index df7e78ee8a88..9de8f57486df 100644
--- a/drivers/net/wireless/rtl8180_dev.c
+++ b/drivers/net/wireless/rtl8180_dev.c
@@ -806,7 +806,6 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
806 const char *chip_name, *rf_name = NULL; 806 const char *chip_name, *rf_name = NULL;
807 u32 reg; 807 u32 reg;
808 u16 eeprom_val; 808 u16 eeprom_val;
809 DECLARE_MAC_BUF(mac);
810 809
811 err = pci_enable_device(pdev); 810 err = pci_enable_device(pdev);
812 if (err) { 811 if (err) {
@@ -1002,8 +1001,8 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
1002 goto err_iounmap; 1001 goto err_iounmap;
1003 } 1002 }
1004 1003
1005 printk(KERN_INFO "%s: hwaddr %s, %s + %s\n", 1004 printk(KERN_INFO "%s: hwaddr %pM, %s + %s\n",
1006 wiphy_name(dev->wiphy), print_mac(mac, dev->wiphy->perm_addr), 1005 wiphy_name(dev->wiphy), dev->wiphy->perm_addr,
1007 chip_name, priv->rf->name); 1006 chip_name, priv->rf->name);
1008 1007
1009 return 0; 1008 return 0;
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c
index 431e3c78bf27..9ceae9017f86 100644
--- a/drivers/net/wireless/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl8187_dev.c
@@ -1026,7 +1026,6 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
1026 const char *chip_name; 1026 const char *chip_name;
1027 u16 txpwr, reg; 1027 u16 txpwr, reg;
1028 int err, i; 1028 int err, i;
1029 DECLARE_MAC_BUF(mac);
1030 1029
1031 dev = ieee80211_alloc_hw(sizeof(*priv), &rtl8187_ops); 1030 dev = ieee80211_alloc_hw(sizeof(*priv), &rtl8187_ops);
1032 if (!dev) { 1031 if (!dev) {
@@ -1209,8 +1208,8 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
1209 } 1208 }
1210 mutex_init(&priv->conf_mutex); 1209 mutex_init(&priv->conf_mutex);
1211 1210
1212 printk(KERN_INFO "%s: hwaddr %s, %s V%d + %s\n", 1211 printk(KERN_INFO "%s: hwaddr %pM, %s V%d + %s\n",
1213 wiphy_name(dev->wiphy), print_mac(mac, dev->wiphy->perm_addr), 1212 wiphy_name(dev->wiphy), dev->wiphy->perm_addr,
1214 chip_name, priv->asic_rev, priv->rf->name); 1213 chip_name, priv->asic_rev, priv->rf->name);
1215 1214
1216 return 0; 1215 return 0;
diff --git a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c
index e939a73ff794..6fa3d792ae27 100644
--- a/drivers/net/wireless/wavelan.c
+++ b/drivers/net/wireless/wavelan.c
@@ -859,8 +859,6 @@ static void wv_82586_reconfig(struct net_device * dev)
859 */ 859 */
860static void wv_psa_show(psa_t * p) 860static void wv_psa_show(psa_t * p)
861{ 861{
862 DECLARE_MAC_BUF(mac);
863
864 printk(KERN_DEBUG "##### WaveLAN PSA contents: #####\n"); 862 printk(KERN_DEBUG "##### WaveLAN PSA contents: #####\n");
865 printk(KERN_DEBUG "psa_io_base_addr_1: 0x%02X %02X %02X %02X\n", 863 printk(KERN_DEBUG "psa_io_base_addr_1: 0x%02X %02X %02X %02X\n",
866 p->psa_io_base_addr_1, 864 p->psa_io_base_addr_1,
@@ -872,13 +870,10 @@ static void wv_psa_show(psa_t * p)
872 printk(KERN_DEBUG "psa_holi_params: 0x%02x, ", p->psa_holi_params); 870 printk(KERN_DEBUG "psa_holi_params: 0x%02x, ", p->psa_holi_params);
873 printk("psa_int_req_no: %d\n", p->psa_int_req_no); 871 printk("psa_int_req_no: %d\n", p->psa_int_req_no);
874#ifdef DEBUG_SHOW_UNUSED 872#ifdef DEBUG_SHOW_UNUSED
875 printk(KERN_DEBUG "psa_unused0[]: %s\n", 873 printk(KERN_DEBUG "psa_unused0[]: %pM\n", p->psa_unused0);
876 print_mac(mac, p->psa_unused0));
877#endif /* DEBUG_SHOW_UNUSED */ 874#endif /* DEBUG_SHOW_UNUSED */
878 printk(KERN_DEBUG "psa_univ_mac_addr[]: %s\n", 875 printk(KERN_DEBUG "psa_univ_mac_addr[]: %pM\n", p->psa_univ_mac_addr);
879 print_mac(mac, p->psa_univ_mac_addr)); 876 printk(KERN_DEBUG "psa_local_mac_addr[]: %pM\n", p->psa_local_mac_addr);
880 printk(KERN_DEBUG "psa_local_mac_addr[]: %s\n",
881 print_mac(mac, p->psa_local_mac_addr));
882 printk(KERN_DEBUG "psa_univ_local_sel: %d, ", 877 printk(KERN_DEBUG "psa_univ_local_sel: %d, ",
883 p->psa_univ_local_sel); 878 p->psa_univ_local_sel);
884 printk("psa_comp_number: %d, ", p->psa_comp_number); 879 printk("psa_comp_number: %d, ", p->psa_comp_number);
@@ -1220,14 +1215,13 @@ static inline void wv_packet_info(u8 * p, /* Packet to dump */
1220{ /* Name of the function */ 1215{ /* Name of the function */
1221 int i; 1216 int i;
1222 int maxi; 1217 int maxi;
1223 DECLARE_MAC_BUF(mac);
1224 1218
1225 printk(KERN_DEBUG 1219 printk(KERN_DEBUG
1226 "%s: %s(): dest %s, length %d\n", 1220 "%s: %s(): dest %pM, length %d\n",
1227 msg1, msg2, print_mac(mac, p), length); 1221 msg1, msg2, p, length);
1228 printk(KERN_DEBUG 1222 printk(KERN_DEBUG
1229 "%s: %s(): src %s, type 0x%02X%02X\n", 1223 "%s: %s(): src %pM, type 0x%02X%02X\n",
1230 msg1, msg2, print_mac(mac, &p[6]), p[12], p[13]); 1224 msg1, msg2, &p[6], p[12], p[13]);
1231 1225
1232#ifdef DEBUG_PACKET_DUMP 1226#ifdef DEBUG_PACKET_DUMP
1233 1227
@@ -1258,9 +1252,6 @@ static void wv_init_info(struct net_device * dev)
1258 short ioaddr = dev->base_addr; 1252 short ioaddr = dev->base_addr;
1259 net_local *lp = (net_local *) dev->priv; 1253 net_local *lp = (net_local *) dev->priv;
1260 psa_t psa; 1254 psa_t psa;
1261#ifdef DEBUG_BASIC_SHOW
1262 DECLARE_MAC_BUF(mac);
1263#endif
1264 1255
1265 /* Read the parameter storage area */ 1256 /* Read the parameter storage area */
1266 psa_read(ioaddr, lp->hacr, 0, (unsigned char *) &psa, sizeof(psa)); 1257 psa_read(ioaddr, lp->hacr, 0, (unsigned char *) &psa, sizeof(psa));
@@ -1277,8 +1268,8 @@ static void wv_init_info(struct net_device * dev)
1277 1268
1278#ifdef DEBUG_BASIC_SHOW 1269#ifdef DEBUG_BASIC_SHOW
1279 /* Now, let's go for the basic stuff. */ 1270 /* Now, let's go for the basic stuff. */
1280 printk(KERN_NOTICE "%s: WaveLAN at %#x, %s, IRQ %d", 1271 printk(KERN_NOTICE "%s: WaveLAN at %#x, %pM, IRQ %d",
1281 dev->name, ioaddr, print_mac(mac, dev->dev_addr), dev->irq); 1272 dev->name, ioaddr, dev->dev_addr, dev->irq);
1282 1273
1283 /* Print current network ID. */ 1274 /* Print current network ID. */
1284 if (psa.psa_nwid_select) 1275 if (psa.psa_nwid_select)
@@ -3565,15 +3556,11 @@ static void wv_82586_config(struct net_device * dev)
3565 WAVELAN_ADDR_SIZE >> 1); 3556 WAVELAN_ADDR_SIZE >> 1);
3566 3557
3567#ifdef DEBUG_CONFIG_INFO 3558#ifdef DEBUG_CONFIG_INFO
3568 {
3569 DECLARE_MAC_BUF(mac);
3570 printk(KERN_DEBUG 3559 printk(KERN_DEBUG
3571 "%s: wv_82586_config(): set %d multicast addresses:\n", 3560 "%s: wv_82586_config(): set %d multicast addresses:\n",
3572 dev->name, lp->mc_count); 3561 dev->name, lp->mc_count);
3573 for (dmi = dev->mc_list; dmi; dmi = dmi->next) 3562 for (dmi = dev->mc_list; dmi; dmi = dmi->next)
3574 printk(KERN_DEBUG " %s\n", 3563 printk(KERN_DEBUG " %pM\n", dmi->dmi_addr);
3575 print_mac(mac, dmi->dmi_addr));
3576 }
3577#endif 3564#endif
3578 } 3565 }
3579 3566
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c
index e124b1d6267a..7bf445895a82 100644
--- a/drivers/net/wireless/wavelan_cs.c
+++ b/drivers/net/wireless/wavelan_cs.c
@@ -1020,7 +1020,6 @@ wv_82593_reconfig(struct net_device * dev)
1020static void 1020static void
1021wv_psa_show(psa_t * p) 1021wv_psa_show(psa_t * p)
1022{ 1022{
1023 DECLARE_MAC_BUF(mac);
1024 printk(KERN_DEBUG "##### wavelan psa contents: #####\n"); 1023 printk(KERN_DEBUG "##### wavelan psa contents: #####\n");
1025 printk(KERN_DEBUG "psa_io_base_addr_1: 0x%02X %02X %02X %02X\n", 1024 printk(KERN_DEBUG "psa_io_base_addr_1: 0x%02X %02X %02X %02X\n",
1026 p->psa_io_base_addr_1, 1025 p->psa_io_base_addr_1,
@@ -1034,13 +1033,10 @@ wv_psa_show(psa_t * p)
1034 printk(KERN_DEBUG "psa_holi_params: 0x%02x, ", p->psa_holi_params); 1033 printk(KERN_DEBUG "psa_holi_params: 0x%02x, ", p->psa_holi_params);
1035 printk("psa_int_req_no: %d\n", p->psa_int_req_no); 1034 printk("psa_int_req_no: %d\n", p->psa_int_req_no);
1036#ifdef DEBUG_SHOW_UNUSED 1035#ifdef DEBUG_SHOW_UNUSED
1037 printk(KERN_DEBUG "psa_unused0[]: %s\n", 1036 printk(KERN_DEBUG "psa_unused0[]: %pM\n", p->psa_unused0);
1038 print_mac(mac, p->psa_unused0));
1039#endif /* DEBUG_SHOW_UNUSED */ 1037#endif /* DEBUG_SHOW_UNUSED */
1040 printk(KERN_DEBUG "psa_univ_mac_addr[]: %s\n", 1038 printk(KERN_DEBUG "psa_univ_mac_addr[]: %pM\n", p->psa_univ_mac_addr);
1041 print_mac(mac, p->psa_univ_mac_addr)); 1039 printk(KERN_DEBUG "psa_local_mac_addr[]: %pM\n", p->psa_local_mac_addr);
1042 printk(KERN_DEBUG "psa_local_mac_addr[]: %s\n",
1043 print_mac(mac, p->psa_local_mac_addr));
1044 printk(KERN_DEBUG "psa_univ_local_sel: %d, ", p->psa_univ_local_sel); 1040 printk(KERN_DEBUG "psa_univ_local_sel: %d, ", p->psa_univ_local_sel);
1045 printk("psa_comp_number: %d, ", p->psa_comp_number); 1041 printk("psa_comp_number: %d, ", p->psa_comp_number);
1046 printk("psa_thr_pre_set: 0x%02x\n", p->psa_thr_pre_set); 1042 printk("psa_thr_pre_set: 0x%02x\n", p->psa_thr_pre_set);
@@ -1238,12 +1234,11 @@ wv_packet_info(u_char * p, /* Packet to dump */
1238{ 1234{
1239 int i; 1235 int i;
1240 int maxi; 1236 int maxi;
1241 DECLARE_MAC_BUF(mac);
1242 1237
1243 printk(KERN_DEBUG "%s: %s(): dest %s, length %d\n", 1238 printk(KERN_DEBUG "%s: %s(): dest %pM, length %d\n",
1244 msg1, msg2, print_mac(mac, p), length); 1239 msg1, msg2, p, length);
1245 printk(KERN_DEBUG "%s: %s(): src %s, type 0x%02X%02X\n", 1240 printk(KERN_DEBUG "%s: %s(): src %pM, type 0x%02X%02X\n",
1246 msg1, msg2, print_mac(mac, &p[6]), p[12], p[13]); 1241 msg1, msg2, &p[6], p[12], p[13]);
1247 1242
1248#ifdef DEBUG_PACKET_DUMP 1243#ifdef DEBUG_PACKET_DUMP
1249 1244
@@ -1274,7 +1269,6 @@ wv_init_info(struct net_device * dev)
1274{ 1269{
1275 unsigned int base = dev->base_addr; 1270 unsigned int base = dev->base_addr;
1276 psa_t psa; 1271 psa_t psa;
1277 DECLARE_MAC_BUF(mac);
1278 1272
1279 /* Read the parameter storage area */ 1273 /* Read the parameter storage area */
1280 psa_read(dev, 0, (unsigned char *) &psa, sizeof(psa)); 1274 psa_read(dev, 0, (unsigned char *) &psa, sizeof(psa));
@@ -1291,10 +1285,8 @@ wv_init_info(struct net_device * dev)
1291 1285
1292#ifdef DEBUG_BASIC_SHOW 1286#ifdef DEBUG_BASIC_SHOW
1293 /* Now, let's go for the basic stuff */ 1287 /* Now, let's go for the basic stuff */
1294 printk(KERN_NOTICE "%s: WaveLAN: port %#x, irq %d, " 1288 printk(KERN_NOTICE "%s: WaveLAN: port %#x, irq %d, hw_addr %pM",
1295 "hw_addr %s", 1289 dev->name, base, dev->irq, dev->dev_addr);
1296 dev->name, base, dev->irq,
1297 print_mac(mac, dev->dev_addr));
1298 1290
1299 /* Print current network id */ 1291 /* Print current network id */
1300 if(psa.psa_nwid_select) 1292 if(psa.psa_nwid_select)
@@ -3647,12 +3639,10 @@ wv_82593_config(struct net_device * dev)
3647 int addrs_len = WAVELAN_ADDR_SIZE * lp->mc_count; 3639 int addrs_len = WAVELAN_ADDR_SIZE * lp->mc_count;
3648 3640
3649#ifdef DEBUG_CONFIG_INFO 3641#ifdef DEBUG_CONFIG_INFO
3650 DECLARE_MAC_BUF(mac);
3651 printk(KERN_DEBUG "%s: wv_hw_config(): set %d multicast addresses:\n", 3642 printk(KERN_DEBUG "%s: wv_hw_config(): set %d multicast addresses:\n",
3652 dev->name, lp->mc_count); 3643 dev->name, lp->mc_count);
3653 for(dmi=dev->mc_list; dmi; dmi=dmi->next) 3644 for(dmi=dev->mc_list; dmi; dmi=dmi->next)
3654 printk(KERN_DEBUG " %s\n", 3645 printk(KERN_DEBUG " %pM\n", dmi->dmi_addr);
3655 print_mac(mac, dmi->dmi_addr));
3656#endif 3646#endif
3657 3647
3658 /* Initialize adapter's ethernet multicast addresses */ 3648 /* Initialize adapter's ethernet multicast addresses */
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index 68789c6e1ce9..8b96f50d9c6f 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -860,10 +860,9 @@ static int wl3501_esbq_confirm(struct wl3501_card *this)
860static void wl3501_online(struct net_device *dev) 860static void wl3501_online(struct net_device *dev)
861{ 861{
862 struct wl3501_card *this = netdev_priv(dev); 862 struct wl3501_card *this = netdev_priv(dev);
863 DECLARE_MAC_BUF(mac);
864 863
865 printk(KERN_INFO "%s: Wireless LAN online. BSSID: %s\n", 864 printk(KERN_INFO "%s: Wireless LAN online. BSSID: %pM\n",
866 dev->name, print_mac(mac, this->bssid)); 865 dev->name, this->bssid);
867 netif_wake_queue(dev); 866 netif_wake_queue(dev);
868} 867}
869 868
@@ -1965,7 +1964,6 @@ static int wl3501_config(struct pcmcia_device *link)
1965 struct net_device *dev = link->priv; 1964 struct net_device *dev = link->priv;
1966 int i = 0, j, last_fn, last_ret; 1965 int i = 0, j, last_fn, last_ret;
1967 struct wl3501_card *this; 1966 struct wl3501_card *this;
1968 DECLARE_MAC_BUF(mac);
1969 1967
1970 /* Try allocating IO ports. This tries a few fixed addresses. If you 1968 /* Try allocating IO ports. This tries a few fixed addresses. If you
1971 * want, you can also read the card's config table to pick addresses -- 1969 * want, you can also read the card's config table to pick addresses --
@@ -2024,9 +2022,9 @@ static int wl3501_config(struct pcmcia_device *link)
2024 2022
2025 /* print probe information */ 2023 /* print probe information */
2026 printk(KERN_INFO "%s: wl3501 @ 0x%3.3x, IRQ %d, " 2024 printk(KERN_INFO "%s: wl3501 @ 0x%3.3x, IRQ %d, "
2027 "MAC addr in flash ROM:%s\n", 2025 "MAC addr in flash ROM:%pM\n",
2028 dev->name, this->base_addr, (int)dev->irq, 2026 dev->name, this->base_addr, (int)dev->irq,
2029 print_mac(mac, dev->dev_addr)); 2027 dev->dev_addr);
2030 /* 2028 /*
2031 * Initialize card parameters - added by jss 2029 * Initialize card parameters - added by jss
2032 */ 2030 */
diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c
index e0ac58b8ff1f..f1519143f8a6 100644
--- a/drivers/net/wireless/zd1211rw/zd_chip.c
+++ b/drivers/net/wireless/zd1211rw/zd_chip.c
@@ -378,7 +378,6 @@ int zd_write_mac_addr(struct zd_chip *chip, const u8 *mac_addr)
378 [0] = { .addr = CR_MAC_ADDR_P1 }, 378 [0] = { .addr = CR_MAC_ADDR_P1 },
379 [1] = { .addr = CR_MAC_ADDR_P2 }, 379 [1] = { .addr = CR_MAC_ADDR_P2 },
380 }; 380 };
381 DECLARE_MAC_BUF(mac);
382 381
383 if (mac_addr) { 382 if (mac_addr) {
384 reqs[0].value = (mac_addr[3] << 24) 383 reqs[0].value = (mac_addr[3] << 24)
@@ -387,8 +386,7 @@ int zd_write_mac_addr(struct zd_chip *chip, const u8 *mac_addr)
387 | mac_addr[0]; 386 | mac_addr[0];
388 reqs[1].value = (mac_addr[5] << 8) 387 reqs[1].value = (mac_addr[5] << 8)
389 | mac_addr[4]; 388 | mac_addr[4];
390 dev_dbg_f(zd_chip_dev(chip), 389 dev_dbg_f(zd_chip_dev(chip), "mac addr %pM\n", mac_addr);
391 "mac addr %s\n", print_mac(mac, mac_addr));
392 } else { 390 } else {
393 dev_dbg_f(zd_chip_dev(chip), "set NULL mac\n"); 391 dev_dbg_f(zd_chip_dev(chip), "set NULL mac\n");
394 } 392 }
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index fe1867b25ff7..de45509d757e 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -852,14 +852,12 @@ static void zd_op_configure_filter(struct ieee80211_hw *hw,
852 if (*new_flags & (FIF_PROMISC_IN_BSS | FIF_ALLMULTI)) { 852 if (*new_flags & (FIF_PROMISC_IN_BSS | FIF_ALLMULTI)) {
853 zd_mc_add_all(&hash); 853 zd_mc_add_all(&hash);
854 } else { 854 } else {
855 DECLARE_MAC_BUF(macbuf);
856
857 zd_mc_clear(&hash); 855 zd_mc_clear(&hash);
858 for (i = 0; i < mc_count; i++) { 856 for (i = 0; i < mc_count; i++) {
859 if (!mclist) 857 if (!mclist)
860 break; 858 break;
861 dev_dbg_f(zd_mac_dev(mac), "mc addr %s\n", 859 dev_dbg_f(zd_mac_dev(mac), "mc addr %pM\n",
862 print_mac(macbuf, mclist->dmi_addr)); 860 mclist->dmi_addr);
863 zd_mc_add_addr(&hash, mclist->dmi_addr); 861 zd_mc_add_addr(&hash, mclist->dmi_addr);
864 mclist = mclist->next; 862 mclist = mclist->next;
865 } 863 }