aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/hostap
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/hostap
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/hostap')
-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
8 files changed, 138 insertions, 260 deletions
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;