aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/debugfs_key.c4
-rw-r--r--net/mac80211/debugfs_netdev.c3
-rw-r--r--net/mac80211/debugfs_sta.c5
-rw-r--r--net/mac80211/event.c5
-rw-r--r--net/mac80211/ht.c42
-rw-r--r--net/mac80211/key.c10
-rw-r--r--net/mac80211/mesh_plink.c49
-rw-r--r--net/mac80211/mlme.c121
-rw-r--r--net/mac80211/rx.c38
-rw-r--r--net/mac80211/sta_info.c33
-rw-r--r--net/mac80211/tkip.c10
-rw-r--r--net/mac80211/tx.c24
-rw-r--r--net/mac80211/wme.c8
-rw-r--r--net/mac80211/wpa.c3
14 files changed, 130 insertions, 225 deletions
diff --git a/net/mac80211/debugfs_key.c b/net/mac80211/debugfs_key.c
index a3294d109322..6424ac565ae0 100644
--- a/net/mac80211/debugfs_key.c
+++ b/net/mac80211/debugfs_key.c
@@ -188,7 +188,6 @@ void ieee80211_debugfs_key_add(struct ieee80211_key *key)
188 { 188 {
189 static int keycount; 189 static int keycount;
190 char buf[50]; 190 char buf[50];
191 DECLARE_MAC_BUF(mac);
192 struct sta_info *sta; 191 struct sta_info *sta;
193 192
194 if (!key->local->debugfs.keys) 193 if (!key->local->debugfs.keys)
@@ -206,8 +205,7 @@ void ieee80211_debugfs_key_add(struct ieee80211_key *key)
206 rcu_read_lock(); 205 rcu_read_lock();
207 sta = rcu_dereference(key->sta); 206 sta = rcu_dereference(key->sta);
208 if (sta) 207 if (sta)
209 sprintf(buf, "../../stations/%s", 208 sprintf(buf, "../../stations/%pM", sta->sta.addr);
210 print_mac(mac, sta->sta.addr));
211 rcu_read_unlock(); 209 rcu_read_unlock();
212 210
213 /* using sta as a boolean is fine outside RCU lock */ 211 /* using sta as a boolean is fine outside RCU lock */
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index 2ad504fc3414..69b2fbf35145 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -104,8 +104,7 @@ static ssize_t ieee80211_if_fmt_##name( \
104 const struct ieee80211_sub_if_data *sdata, char *buf, \ 104 const struct ieee80211_sub_if_data *sdata, char *buf, \
105 int buflen) \ 105 int buflen) \
106{ \ 106{ \
107 DECLARE_MAC_BUF(mac); \ 107 return scnprintf(buf, buflen, "%pM\n", sdata->field); \
108 return scnprintf(buf, buflen, "%s\n", print_mac(mac, sdata->field));\
109} 108}
110 109
111#define __IEEE80211_IF_FILE(name) \ 110#define __IEEE80211_IF_FILE(name) \
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index 189d0bafa91a..21e8b1c4f64e 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -246,15 +246,14 @@ STA_OPS_WR(agg_status);
246void ieee80211_sta_debugfs_add(struct sta_info *sta) 246void ieee80211_sta_debugfs_add(struct sta_info *sta)
247{ 247{
248 struct dentry *stations_dir = sta->local->debugfs.stations; 248 struct dentry *stations_dir = sta->local->debugfs.stations;
249 DECLARE_MAC_BUF(mbuf); 249 u8 mac[3*ETH_ALEN];
250 u8 *mac;
251 250
252 sta->debugfs.add_has_run = true; 251 sta->debugfs.add_has_run = true;
253 252
254 if (!stations_dir) 253 if (!stations_dir)
255 return; 254 return;
256 255
257 mac = print_mac(mbuf, sta->sta.addr); 256 snprintf(mac, sizeof(mac), "%pM", sta->sta.addr);
258 257
259 /* 258 /*
260 * This might fail due to a race condition: 259 * This might fail due to a race condition:
diff --git a/net/mac80211/event.c b/net/mac80211/event.c
index 8de60de70bc9..0d95561c0ee0 100644
--- a/net/mac80211/event.c
+++ b/net/mac80211/event.c
@@ -21,14 +21,13 @@ void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int ke
21{ 21{
22 union iwreq_data wrqu; 22 union iwreq_data wrqu;
23 char *buf = kmalloc(128, GFP_ATOMIC); 23 char *buf = kmalloc(128, GFP_ATOMIC);
24 DECLARE_MAC_BUF(mac);
25 24
26 if (buf) { 25 if (buf) {
27 /* TODO: needed parameters: count, key type, TSC */ 26 /* TODO: needed parameters: count, key type, TSC */
28 sprintf(buf, "MLME-MICHAELMICFAILURE.indication(" 27 sprintf(buf, "MLME-MICHAELMICFAILURE.indication("
29 "keyid=%d %scast addr=%s)", 28 "keyid=%d %scast addr=%pM)",
30 keyidx, hdr->addr1[0] & 0x01 ? "broad" : "uni", 29 keyidx, hdr->addr1[0] & 0x01 ? "broad" : "uni",
31 print_mac(mac, hdr->addr2)); 30 hdr->addr2);
32 memset(&wrqu, 0, sizeof(wrqu)); 31 memset(&wrqu, 0, sizeof(wrqu));
33 wrqu.data.length = strlen(buf); 32 wrqu.data.length = strlen(buf);
34 wireless_send_event(sdata->dev, IWEVCUSTOM, &wrqu, buf); 33 wireless_send_event(sdata->dev, IWEVCUSTOM, &wrqu, buf);
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index dc7d9a3d70d5..b854483cf23f 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -241,7 +241,6 @@ void ieee80211_sta_stop_rx_ba_session(struct ieee80211_sub_if_data *sdata, u8 *r
241 struct ieee80211_hw *hw = &local->hw; 241 struct ieee80211_hw *hw = &local->hw;
242 struct sta_info *sta; 242 struct sta_info *sta;
243 int ret, i; 243 int ret, i;
244 DECLARE_MAC_BUF(mac);
245 244
246 rcu_read_lock(); 245 rcu_read_lock();
247 246
@@ -269,8 +268,8 @@ void ieee80211_sta_stop_rx_ba_session(struct ieee80211_sub_if_data *sdata, u8 *r
269 BUG_ON(!local->ops->ampdu_action); 268 BUG_ON(!local->ops->ampdu_action);
270 269
271#ifdef CONFIG_MAC80211_HT_DEBUG 270#ifdef CONFIG_MAC80211_HT_DEBUG
272 printk(KERN_DEBUG "Rx BA session stop requested for %s tid %u\n", 271 printk(KERN_DEBUG "Rx BA session stop requested for %pM tid %u\n",
273 print_mac(mac, ra), tid); 272 ra, tid);
274#endif /* CONFIG_MAC80211_HT_DEBUG */ 273#endif /* CONFIG_MAC80211_HT_DEBUG */
275 274
276 ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_RX_STOP, 275 ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_RX_STOP,
@@ -383,14 +382,13 @@ int ieee80211_start_tx_ba_session(struct ieee80211_hw *hw, u8 *ra, u16 tid)
383 u16 start_seq_num; 382 u16 start_seq_num;
384 u8 *state; 383 u8 *state;
385 int ret; 384 int ret;
386 DECLARE_MAC_BUF(mac);
387 385
388 if (tid >= STA_TID_NUM) 386 if (tid >= STA_TID_NUM)
389 return -EINVAL; 387 return -EINVAL;
390 388
391#ifdef CONFIG_MAC80211_HT_DEBUG 389#ifdef CONFIG_MAC80211_HT_DEBUG
392 printk(KERN_DEBUG "Open BA session requested for %s tid %u\n", 390 printk(KERN_DEBUG "Open BA session requested for %pM tid %u\n",
393 print_mac(mac, ra), tid); 391 ra, tid);
394#endif /* CONFIG_MAC80211_HT_DEBUG */ 392#endif /* CONFIG_MAC80211_HT_DEBUG */
395 393
396 rcu_read_lock(); 394 rcu_read_lock();
@@ -524,7 +522,6 @@ int ieee80211_stop_tx_ba_session(struct ieee80211_hw *hw,
524 struct sta_info *sta; 522 struct sta_info *sta;
525 u8 *state; 523 u8 *state;
526 int ret = 0; 524 int ret = 0;
527 DECLARE_MAC_BUF(mac);
528 525
529 if (tid >= STA_TID_NUM) 526 if (tid >= STA_TID_NUM)
530 return -EINVAL; 527 return -EINVAL;
@@ -546,8 +543,8 @@ int ieee80211_stop_tx_ba_session(struct ieee80211_hw *hw,
546 } 543 }
547 544
548#ifdef CONFIG_MAC80211_HT_DEBUG 545#ifdef CONFIG_MAC80211_HT_DEBUG
549 printk(KERN_DEBUG "Tx BA session stop requested for %s tid %u\n", 546 printk(KERN_DEBUG "Tx BA session stop requested for %pM tid %u\n",
550 print_mac(mac, ra), tid); 547 ra, tid);
551#endif /* CONFIG_MAC80211_HT_DEBUG */ 548#endif /* CONFIG_MAC80211_HT_DEBUG */
552 549
553 ieee80211_stop_queue(hw, sta->tid_to_tx_q[tid]); 550 ieee80211_stop_queue(hw, sta->tid_to_tx_q[tid]);
@@ -579,7 +576,6 @@ void ieee80211_start_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u16 tid)
579 struct ieee80211_local *local = hw_to_local(hw); 576 struct ieee80211_local *local = hw_to_local(hw);
580 struct sta_info *sta; 577 struct sta_info *sta;
581 u8 *state; 578 u8 *state;
582 DECLARE_MAC_BUF(mac);
583 579
584 if (tid >= STA_TID_NUM) { 580 if (tid >= STA_TID_NUM) {
585#ifdef CONFIG_MAC80211_HT_DEBUG 581#ifdef CONFIG_MAC80211_HT_DEBUG
@@ -594,8 +590,7 @@ void ieee80211_start_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u16 tid)
594 if (!sta) { 590 if (!sta) {
595 rcu_read_unlock(); 591 rcu_read_unlock();
596#ifdef CONFIG_MAC80211_HT_DEBUG 592#ifdef CONFIG_MAC80211_HT_DEBUG
597 printk(KERN_DEBUG "Could not find station: %s\n", 593 printk(KERN_DEBUG "Could not find station: %pM\n", ra);
598 print_mac(mac, ra));
599#endif 594#endif
600 return; 595 return;
601 } 596 }
@@ -634,7 +629,6 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid)
634 struct sta_info *sta; 629 struct sta_info *sta;
635 u8 *state; 630 u8 *state;
636 int agg_queue; 631 int agg_queue;
637 DECLARE_MAC_BUF(mac);
638 632
639 if (tid >= STA_TID_NUM) { 633 if (tid >= STA_TID_NUM) {
640#ifdef CONFIG_MAC80211_HT_DEBUG 634#ifdef CONFIG_MAC80211_HT_DEBUG
@@ -645,16 +639,15 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid)
645 } 639 }
646 640
647#ifdef CONFIG_MAC80211_HT_DEBUG 641#ifdef CONFIG_MAC80211_HT_DEBUG
648 printk(KERN_DEBUG "Stopping Tx BA session for %s tid %d\n", 642 printk(KERN_DEBUG "Stopping Tx BA session for %pM tid %d\n",
649 print_mac(mac, ra), tid); 643 ra, tid);
650#endif /* CONFIG_MAC80211_HT_DEBUG */ 644#endif /* CONFIG_MAC80211_HT_DEBUG */
651 645
652 rcu_read_lock(); 646 rcu_read_lock();
653 sta = sta_info_get(local, ra); 647 sta = sta_info_get(local, ra);
654 if (!sta) { 648 if (!sta) {
655#ifdef CONFIG_MAC80211_HT_DEBUG 649#ifdef CONFIG_MAC80211_HT_DEBUG
656 printk(KERN_DEBUG "Could not find station: %s\n", 650 printk(KERN_DEBUG "Could not find station: %pM\n", ra);
657 print_mac(mac, ra));
658#endif 651#endif
659 rcu_read_unlock(); 652 rcu_read_unlock();
660 return; 653 return;
@@ -783,7 +776,6 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
783 u16 capab, tid, timeout, ba_policy, buf_size, start_seq_num, status; 776 u16 capab, tid, timeout, ba_policy, buf_size, start_seq_num, status;
784 u8 dialog_token; 777 u8 dialog_token;
785 int ret = -EOPNOTSUPP; 778 int ret = -EOPNOTSUPP;
786 DECLARE_MAC_BUF(mac);
787 779
788 /* extract session parameters from addba request frame */ 780 /* extract session parameters from addba request frame */
789 dialog_token = mgmt->u.action.u.addba_req.dialog_token; 781 dialog_token = mgmt->u.action.u.addba_req.dialog_token;
@@ -808,8 +800,8 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
808#ifdef CONFIG_MAC80211_HT_DEBUG 800#ifdef CONFIG_MAC80211_HT_DEBUG
809 if (net_ratelimit()) 801 if (net_ratelimit())
810 printk(KERN_DEBUG "AddBA Req with bad params from " 802 printk(KERN_DEBUG "AddBA Req with bad params from "
811 "%s on tid %u. policy %d, buffer size %d\n", 803 "%pM on tid %u. policy %d, buffer size %d\n",
812 print_mac(mac, mgmt->sa), tid, ba_policy, 804 mgmt->sa, tid, ba_policy,
813 buf_size); 805 buf_size);
814#endif /* CONFIG_MAC80211_HT_DEBUG */ 806#endif /* CONFIG_MAC80211_HT_DEBUG */
815 goto end_no_lock; 807 goto end_no_lock;
@@ -831,8 +823,8 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
831#ifdef CONFIG_MAC80211_HT_DEBUG 823#ifdef CONFIG_MAC80211_HT_DEBUG
832 if (net_ratelimit()) 824 if (net_ratelimit())
833 printk(KERN_DEBUG "unexpected AddBA Req from " 825 printk(KERN_DEBUG "unexpected AddBA Req from "
834 "%s on tid %u\n", 826 "%pM on tid %u\n",
835 print_mac(mac, mgmt->sa), tid); 827 mgmt->sa, tid);
836#endif /* CONFIG_MAC80211_HT_DEBUG */ 828#endif /* CONFIG_MAC80211_HT_DEBUG */
837 goto end; 829 goto end;
838 } 830 }
@@ -964,7 +956,6 @@ void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
964 struct ieee80211_local *local = sdata->local; 956 struct ieee80211_local *local = sdata->local;
965 u16 tid, params; 957 u16 tid, params;
966 u16 initiator; 958 u16 initiator;
967 DECLARE_MAC_BUF(mac);
968 959
969 params = le16_to_cpu(mgmt->u.action.u.delba.params); 960 params = le16_to_cpu(mgmt->u.action.u.delba.params);
970 tid = (params & IEEE80211_DELBA_PARAM_TID_MASK) >> 12; 961 tid = (params & IEEE80211_DELBA_PARAM_TID_MASK) >> 12;
@@ -972,9 +963,8 @@ void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
972 963
973#ifdef CONFIG_MAC80211_HT_DEBUG 964#ifdef CONFIG_MAC80211_HT_DEBUG
974 if (net_ratelimit()) 965 if (net_ratelimit())
975 printk(KERN_DEBUG "delba from %s (%s) tid %d reason code %d\n", 966 printk(KERN_DEBUG "delba from %pM (%s) tid %d reason code %d\n",
976 print_mac(mac, mgmt->sa), 967 mgmt->sa, initiator ? "initiator" : "recipient", tid,
977 initiator ? "initiator" : "recipient", tid,
978 mgmt->u.action.u.delba.reason_code); 968 mgmt->u.action.u.delba.reason_code);
979#endif /* CONFIG_MAC80211_HT_DEBUG */ 969#endif /* CONFIG_MAC80211_HT_DEBUG */
980 970
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index a5b06fe71980..999f7aa42326 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -132,7 +132,6 @@ static void ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
132{ 132{
133 const u8 *addr; 133 const u8 *addr;
134 int ret; 134 int ret;
135 DECLARE_MAC_BUF(mac);
136 135
137 assert_key_lock(); 136 assert_key_lock();
138 might_sleep(); 137 might_sleep();
@@ -154,16 +153,15 @@ static void ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
154 153
155 if (ret && ret != -ENOSPC && ret != -EOPNOTSUPP) 154 if (ret && ret != -ENOSPC && ret != -EOPNOTSUPP)
156 printk(KERN_ERR "mac80211-%s: failed to set key " 155 printk(KERN_ERR "mac80211-%s: failed to set key "
157 "(%d, %s) to hardware (%d)\n", 156 "(%d, %pM) to hardware (%d)\n",
158 wiphy_name(key->local->hw.wiphy), 157 wiphy_name(key->local->hw.wiphy),
159 key->conf.keyidx, print_mac(mac, addr), ret); 158 key->conf.keyidx, addr, ret);
160} 159}
161 160
162static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key) 161static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key)
163{ 162{
164 const u8 *addr; 163 const u8 *addr;
165 int ret; 164 int ret;
166 DECLARE_MAC_BUF(mac);
167 165
168 assert_key_lock(); 166 assert_key_lock();
169 might_sleep(); 167 might_sleep();
@@ -186,9 +184,9 @@ static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key)
186 184
187 if (ret) 185 if (ret)
188 printk(KERN_ERR "mac80211-%s: failed to remove key " 186 printk(KERN_ERR "mac80211-%s: failed to remove key "
189 "(%d, %s) from hardware (%d)\n", 187 "(%d, %pM) from hardware (%d)\n",
190 wiphy_name(key->local->hw.wiphy), 188 wiphy_name(key->local->hw.wiphy),
191 key->conf.keyidx, print_mac(mac, addr), ret); 189 key->conf.keyidx, addr, ret);
192 190
193 spin_lock(&todo_lock); 191 spin_lock(&todo_lock);
194 key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE; 192 key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE;
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index faac101c0f85..929ba542fd72 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -257,9 +257,6 @@ static void mesh_plink_timer(unsigned long data)
257 struct sta_info *sta; 257 struct sta_info *sta;
258 __le16 llid, plid, reason; 258 __le16 llid, plid, reason;
259 struct ieee80211_sub_if_data *sdata; 259 struct ieee80211_sub_if_data *sdata;
260#ifdef CONFIG_MAC80211_VERBOSE_MPL_DEBUG
261 DECLARE_MAC_BUF(mac);
262#endif
263 260
264 /* 261 /*
265 * This STA is valid because sta_info_destroy() will 262 * This STA is valid because sta_info_destroy() will
@@ -274,8 +271,8 @@ static void mesh_plink_timer(unsigned long data)
274 spin_unlock_bh(&sta->lock); 271 spin_unlock_bh(&sta->lock);
275 return; 272 return;
276 } 273 }
277 mpl_dbg("Mesh plink timer for %s fired on state %d\n", 274 mpl_dbg("Mesh plink timer for %pM fired on state %d\n",
278 print_mac(mac, sta->sta.addr), sta->plink_state); 275 sta->sta.addr, sta->plink_state);
279 reason = 0; 276 reason = 0;
280 llid = sta->llid; 277 llid = sta->llid;
281 plid = sta->plid; 278 plid = sta->plid;
@@ -287,9 +284,9 @@ static void mesh_plink_timer(unsigned long data)
287 /* retry timer */ 284 /* retry timer */
288 if (sta->plink_retries < dot11MeshMaxRetries(sdata)) { 285 if (sta->plink_retries < dot11MeshMaxRetries(sdata)) {
289 u32 rand; 286 u32 rand;
290 mpl_dbg("Mesh plink for %s (retry, timeout): %d %d\n", 287 mpl_dbg("Mesh plink for %pM (retry, timeout): %d %d\n",
291 print_mac(mac, sta->sta.addr), 288 sta->sta.addr, sta->plink_retries,
292 sta->plink_retries, sta->plink_timeout); 289 sta->plink_timeout);
293 get_random_bytes(&rand, sizeof(u32)); 290 get_random_bytes(&rand, sizeof(u32));
294 sta->plink_timeout = sta->plink_timeout + 291 sta->plink_timeout = sta->plink_timeout +
295 rand % sta->plink_timeout; 292 rand % sta->plink_timeout;
@@ -337,9 +334,6 @@ int mesh_plink_open(struct sta_info *sta)
337{ 334{
338 __le16 llid; 335 __le16 llid;
339 struct ieee80211_sub_if_data *sdata = sta->sdata; 336 struct ieee80211_sub_if_data *sdata = sta->sdata;
340#ifdef CONFIG_MAC80211_VERBOSE_MPL_DEBUG
341 DECLARE_MAC_BUF(mac);
342#endif
343 337
344 spin_lock_bh(&sta->lock); 338 spin_lock_bh(&sta->lock);
345 get_random_bytes(&llid, 2); 339 get_random_bytes(&llid, 2);
@@ -351,8 +345,8 @@ int mesh_plink_open(struct sta_info *sta)
351 sta->plink_state = PLINK_OPN_SNT; 345 sta->plink_state = PLINK_OPN_SNT;
352 mesh_plink_timer_set(sta, dot11MeshRetryTimeout(sdata)); 346 mesh_plink_timer_set(sta, dot11MeshRetryTimeout(sdata));
353 spin_unlock_bh(&sta->lock); 347 spin_unlock_bh(&sta->lock);
354 mpl_dbg("Mesh plink: starting establishment with %s\n", 348 mpl_dbg("Mesh plink: starting establishment with %pM\n",
355 print_mac(mac, sta->sta.addr)); 349 sta->sta.addr);
356 350
357 return mesh_plink_frame_tx(sdata, PLINK_OPEN, 351 return mesh_plink_frame_tx(sdata, PLINK_OPEN,
358 sta->sta.addr, llid, 0, 0); 352 sta->sta.addr, llid, 0, 0);
@@ -360,10 +354,6 @@ int mesh_plink_open(struct sta_info *sta)
360 354
361void mesh_plink_block(struct sta_info *sta) 355void mesh_plink_block(struct sta_info *sta)
362{ 356{
363#ifdef CONFIG_MAC80211_VERBOSE_MPL_DEBUG
364 DECLARE_MAC_BUF(mac);
365#endif
366
367 spin_lock_bh(&sta->lock); 357 spin_lock_bh(&sta->lock);
368 __mesh_plink_deactivate(sta); 358 __mesh_plink_deactivate(sta);
369 sta->plink_state = PLINK_BLOCKED; 359 sta->plink_state = PLINK_BLOCKED;
@@ -374,12 +364,8 @@ int mesh_plink_close(struct sta_info *sta)
374{ 364{
375 struct ieee80211_sub_if_data *sdata = sta->sdata; 365 struct ieee80211_sub_if_data *sdata = sta->sdata;
376 __le16 llid, plid, reason; 366 __le16 llid, plid, reason;
377#ifdef CONFIG_MAC80211_VERBOSE_MPL_DEBUG
378 DECLARE_MAC_BUF(mac);
379#endif
380 367
381 mpl_dbg("Mesh plink: closing link with %s\n", 368 mpl_dbg("Mesh plink: closing link with %pM\n", sta->sta.addr);
382 print_mac(mac, sta->sta.addr));
383 spin_lock_bh(&sta->lock); 369 spin_lock_bh(&sta->lock);
384 sta->reason = cpu_to_le16(MESH_LINK_CANCELLED); 370 sta->reason = cpu_to_le16(MESH_LINK_CANCELLED);
385 reason = sta->reason; 371 reason = sta->reason;
@@ -417,9 +403,6 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
417 u8 ie_len; 403 u8 ie_len;
418 u8 *baseaddr; 404 u8 *baseaddr;
419 __le16 plid, llid, reason; 405 __le16 plid, llid, reason;
420#ifdef CONFIG_MAC80211_VERBOSE_MPL_DEBUG
421 DECLARE_MAC_BUF(mac);
422#endif
423 406
424 /* need action_code, aux */ 407 /* need action_code, aux */
425 if (len < IEEE80211_MIN_ACTION_SIZE + 3) 408 if (len < IEEE80211_MIN_ACTION_SIZE + 3)
@@ -557,10 +540,10 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
557 } 540 }
558 } 541 }
559 542
560 mpl_dbg("Mesh plink (peer, state, llid, plid, event): %s %d %d %d %d\n", 543 mpl_dbg("Mesh plink (peer, state, llid, plid, event): %pM %d %d %d %d\n",
561 print_mac(mac, mgmt->sa), sta->plink_state, 544 mgmt->sa, sta->plink_state,
562 le16_to_cpu(sta->llid), le16_to_cpu(sta->plid), 545 le16_to_cpu(sta->llid), le16_to_cpu(sta->plid),
563 event); 546 event);
564 reason = 0; 547 reason = 0;
565 switch (sta->plink_state) { 548 switch (sta->plink_state) {
566 /* spin_unlock as soon as state is updated at each case */ 549 /* spin_unlock as soon as state is updated at each case */
@@ -660,8 +643,8 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
660 sta->plink_state = PLINK_ESTAB; 643 sta->plink_state = PLINK_ESTAB;
661 mesh_plink_inc_estab_count(sdata); 644 mesh_plink_inc_estab_count(sdata);
662 spin_unlock_bh(&sta->lock); 645 spin_unlock_bh(&sta->lock);
663 mpl_dbg("Mesh plink with %s ESTABLISHED\n", 646 mpl_dbg("Mesh plink with %pM ESTABLISHED\n",
664 print_mac(mac, sta->sta.addr)); 647 sta->sta.addr);
665 break; 648 break;
666 default: 649 default:
667 spin_unlock_bh(&sta->lock); 650 spin_unlock_bh(&sta->lock);
@@ -693,8 +676,8 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
693 sta->plink_state = PLINK_ESTAB; 676 sta->plink_state = PLINK_ESTAB;
694 mesh_plink_inc_estab_count(sdata); 677 mesh_plink_inc_estab_count(sdata);
695 spin_unlock_bh(&sta->lock); 678 spin_unlock_bh(&sta->lock);
696 mpl_dbg("Mesh plink with %s ESTABLISHED\n", 679 mpl_dbg("Mesh plink with %pM ESTABLISHED\n",
697 print_mac(mac, sta->sta.addr)); 680 sta->sta.addr);
698 mesh_plink_frame_tx(sdata, PLINK_CONFIRM, sta->sta.addr, llid, 681 mesh_plink_frame_tx(sdata, PLINK_CONFIRM, sta->sta.addr, llid,
699 plid, 0); 682 plid, 0);
700 break; 683 break;
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 87665d7bb4f9..6ad2619db85f 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -575,18 +575,16 @@ static u32 ieee80211_handle_protect_preamb(struct ieee80211_sub_if_data *sdata,
575 struct ieee80211_bss_conf *bss_conf = &sdata->bss_conf; 575 struct ieee80211_bss_conf *bss_conf = &sdata->bss_conf;
576#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 576#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
577 struct ieee80211_if_sta *ifsta = &sdata->u.sta; 577 struct ieee80211_if_sta *ifsta = &sdata->u.sta;
578 DECLARE_MAC_BUF(mac);
579#endif 578#endif
580 u32 changed = 0; 579 u32 changed = 0;
581 580
582 if (use_protection != bss_conf->use_cts_prot) { 581 if (use_protection != bss_conf->use_cts_prot) {
583#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 582#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
584 if (net_ratelimit()) { 583 if (net_ratelimit()) {
585 printk(KERN_DEBUG "%s: CTS protection %s (BSSID=" 584 printk(KERN_DEBUG "%s: CTS protection %s (BSSID=%pM)\n",
586 "%s)\n",
587 sdata->dev->name, 585 sdata->dev->name,
588 use_protection ? "enabled" : "disabled", 586 use_protection ? "enabled" : "disabled",
589 print_mac(mac, ifsta->bssid)); 587 ifsta->bssid);
590 } 588 }
591#endif 589#endif
592 bss_conf->use_cts_prot = use_protection; 590 bss_conf->use_cts_prot = use_protection;
@@ -597,10 +595,10 @@ static u32 ieee80211_handle_protect_preamb(struct ieee80211_sub_if_data *sdata,
597#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 595#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
598 if (net_ratelimit()) { 596 if (net_ratelimit()) {
599 printk(KERN_DEBUG "%s: switched to %s barker preamble" 597 printk(KERN_DEBUG "%s: switched to %s barker preamble"
600 " (BSSID=%s)\n", 598 " (BSSID=%pM)\n",
601 sdata->dev->name, 599 sdata->dev->name,
602 use_short_preamble ? "short" : "long", 600 use_short_preamble ? "short" : "long",
603 print_mac(mac, ifsta->bssid)); 601 ifsta->bssid);
604 } 602 }
605#endif 603#endif
606 bss_conf->use_short_preamble = use_short_preamble; 604 bss_conf->use_short_preamble = use_short_preamble;
@@ -760,18 +758,16 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata,
760static void ieee80211_direct_probe(struct ieee80211_sub_if_data *sdata, 758static void ieee80211_direct_probe(struct ieee80211_sub_if_data *sdata,
761 struct ieee80211_if_sta *ifsta) 759 struct ieee80211_if_sta *ifsta)
762{ 760{
763 DECLARE_MAC_BUF(mac);
764
765 ifsta->direct_probe_tries++; 761 ifsta->direct_probe_tries++;
766 if (ifsta->direct_probe_tries > IEEE80211_AUTH_MAX_TRIES) { 762 if (ifsta->direct_probe_tries > IEEE80211_AUTH_MAX_TRIES) {
767 printk(KERN_DEBUG "%s: direct probe to AP %s timed out\n", 763 printk(KERN_DEBUG "%s: direct probe to AP %pM timed out\n",
768 sdata->dev->name, print_mac(mac, ifsta->bssid)); 764 sdata->dev->name, ifsta->bssid);
769 ifsta->state = IEEE80211_STA_MLME_DISABLED; 765 ifsta->state = IEEE80211_STA_MLME_DISABLED;
770 return; 766 return;
771 } 767 }
772 768
773 printk(KERN_DEBUG "%s: direct probe to AP %s try %d\n", 769 printk(KERN_DEBUG "%s: direct probe to AP %pM try %d\n",
774 sdata->dev->name, print_mac(mac, ifsta->bssid), 770 sdata->dev->name, ifsta->bssid,
775 ifsta->direct_probe_tries); 771 ifsta->direct_probe_tries);
776 772
777 ifsta->state = IEEE80211_STA_MLME_DIRECT_PROBE; 773 ifsta->state = IEEE80211_STA_MLME_DIRECT_PROBE;
@@ -791,20 +787,18 @@ static void ieee80211_direct_probe(struct ieee80211_sub_if_data *sdata,
791static void ieee80211_authenticate(struct ieee80211_sub_if_data *sdata, 787static void ieee80211_authenticate(struct ieee80211_sub_if_data *sdata,
792 struct ieee80211_if_sta *ifsta) 788 struct ieee80211_if_sta *ifsta)
793{ 789{
794 DECLARE_MAC_BUF(mac);
795
796 ifsta->auth_tries++; 790 ifsta->auth_tries++;
797 if (ifsta->auth_tries > IEEE80211_AUTH_MAX_TRIES) { 791 if (ifsta->auth_tries > IEEE80211_AUTH_MAX_TRIES) {
798 printk(KERN_DEBUG "%s: authentication with AP %s" 792 printk(KERN_DEBUG "%s: authentication with AP %pM"
799 " timed out\n", 793 " timed out\n",
800 sdata->dev->name, print_mac(mac, ifsta->bssid)); 794 sdata->dev->name, ifsta->bssid);
801 ifsta->state = IEEE80211_STA_MLME_DISABLED; 795 ifsta->state = IEEE80211_STA_MLME_DISABLED;
802 return; 796 return;
803 } 797 }
804 798
805 ifsta->state = IEEE80211_STA_MLME_AUTHENTICATE; 799 ifsta->state = IEEE80211_STA_MLME_AUTHENTICATE;
806 printk(KERN_DEBUG "%s: authenticate with AP %s\n", 800 printk(KERN_DEBUG "%s: authenticate with AP %pM\n",
807 sdata->dev->name, print_mac(mac, ifsta->bssid)); 801 sdata->dev->name, ifsta->bssid);
808 802
809 ieee80211_send_auth(sdata, ifsta, 1, NULL, 0, 0); 803 ieee80211_send_auth(sdata, ifsta, 1, NULL, 0, 0);
810 804
@@ -914,20 +908,18 @@ static int ieee80211_privacy_mismatch(struct ieee80211_sub_if_data *sdata,
914static void ieee80211_associate(struct ieee80211_sub_if_data *sdata, 908static void ieee80211_associate(struct ieee80211_sub_if_data *sdata,
915 struct ieee80211_if_sta *ifsta) 909 struct ieee80211_if_sta *ifsta)
916{ 910{
917 DECLARE_MAC_BUF(mac);
918
919 ifsta->assoc_tries++; 911 ifsta->assoc_tries++;
920 if (ifsta->assoc_tries > IEEE80211_ASSOC_MAX_TRIES) { 912 if (ifsta->assoc_tries > IEEE80211_ASSOC_MAX_TRIES) {
921 printk(KERN_DEBUG "%s: association with AP %s" 913 printk(KERN_DEBUG "%s: association with AP %pM"
922 " timed out\n", 914 " timed out\n",
923 sdata->dev->name, print_mac(mac, ifsta->bssid)); 915 sdata->dev->name, ifsta->bssid);
924 ifsta->state = IEEE80211_STA_MLME_DISABLED; 916 ifsta->state = IEEE80211_STA_MLME_DISABLED;
925 return; 917 return;
926 } 918 }
927 919
928 ifsta->state = IEEE80211_STA_MLME_ASSOCIATE; 920 ifsta->state = IEEE80211_STA_MLME_ASSOCIATE;
929 printk(KERN_DEBUG "%s: associate with AP %s\n", 921 printk(KERN_DEBUG "%s: associate with AP %pM\n",
930 sdata->dev->name, print_mac(mac, ifsta->bssid)); 922 sdata->dev->name, ifsta->bssid);
931 if (ieee80211_privacy_mismatch(sdata, ifsta)) { 923 if (ieee80211_privacy_mismatch(sdata, ifsta)) {
932 printk(KERN_DEBUG "%s: mismatch in privacy configuration and " 924 printk(KERN_DEBUG "%s: mismatch in privacy configuration and "
933 "mixed-cell disabled - abort association\n", sdata->dev->name); 925 "mixed-cell disabled - abort association\n", sdata->dev->name);
@@ -947,7 +939,6 @@ static void ieee80211_associated(struct ieee80211_sub_if_data *sdata,
947 struct ieee80211_local *local = sdata->local; 939 struct ieee80211_local *local = sdata->local;
948 struct sta_info *sta; 940 struct sta_info *sta;
949 int disassoc; 941 int disassoc;
950 DECLARE_MAC_BUF(mac);
951 942
952 /* TODO: start monitoring current AP signal quality and number of 943 /* TODO: start monitoring current AP signal quality and number of
953 * missed beacons. Scan other channels every now and then and search 944 * missed beacons. Scan other channels every now and then and search
@@ -960,8 +951,8 @@ static void ieee80211_associated(struct ieee80211_sub_if_data *sdata,
960 951
961 sta = sta_info_get(local, ifsta->bssid); 952 sta = sta_info_get(local, ifsta->bssid);
962 if (!sta) { 953 if (!sta) {
963 printk(KERN_DEBUG "%s: No STA entry for own AP %s\n", 954 printk(KERN_DEBUG "%s: No STA entry for own AP %pM\n",
964 sdata->dev->name, print_mac(mac, ifsta->bssid)); 955 sdata->dev->name, ifsta->bssid);
965 disassoc = 1; 956 disassoc = 1;
966 } else { 957 } else {
967 disassoc = 0; 958 disassoc = 0;
@@ -969,9 +960,9 @@ static void ieee80211_associated(struct ieee80211_sub_if_data *sdata,
969 sta->last_rx + IEEE80211_MONITORING_INTERVAL)) { 960 sta->last_rx + IEEE80211_MONITORING_INTERVAL)) {
970 if (ifsta->flags & IEEE80211_STA_PROBEREQ_POLL) { 961 if (ifsta->flags & IEEE80211_STA_PROBEREQ_POLL) {
971 printk(KERN_DEBUG "%s: No ProbeResp from " 962 printk(KERN_DEBUG "%s: No ProbeResp from "
972 "current AP %s - assume out of " 963 "current AP %pM - assume out of "
973 "range\n", 964 "range\n",
974 sdata->dev->name, print_mac(mac, ifsta->bssid)); 965 sdata->dev->name, ifsta->bssid);
975 disassoc = 1; 966 disassoc = 1;
976 } else 967 } else
977 ieee80211_send_probe_req(sdata, ifsta->bssid, 968 ieee80211_send_probe_req(sdata, ifsta->bssid,
@@ -1032,7 +1023,6 @@ static void ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata,
1032 size_t len) 1023 size_t len)
1033{ 1024{
1034 u16 auth_alg, auth_transaction, status_code; 1025 u16 auth_alg, auth_transaction, status_code;
1035 DECLARE_MAC_BUF(mac);
1036 1026
1037 if (ifsta->state != IEEE80211_STA_MLME_AUTHENTICATE && 1027 if (ifsta->state != IEEE80211_STA_MLME_AUTHENTICATE &&
1038 sdata->vif.type != NL80211_IFTYPE_ADHOC) 1028 sdata->vif.type != NL80211_IFTYPE_ADHOC)
@@ -1125,7 +1115,6 @@ static void ieee80211_rx_mgmt_deauth(struct ieee80211_sub_if_data *sdata,
1125 size_t len) 1115 size_t len)
1126{ 1116{
1127 u16 reason_code; 1117 u16 reason_code;
1128 DECLARE_MAC_BUF(mac);
1129 1118
1130 if (len < 24 + 2) 1119 if (len < 24 + 2)
1131 return; 1120 return;
@@ -1157,7 +1146,6 @@ static void ieee80211_rx_mgmt_disassoc(struct ieee80211_sub_if_data *sdata,
1157 size_t len) 1146 size_t len)
1158{ 1147{
1159 u16 reason_code; 1148 u16 reason_code;
1160 DECLARE_MAC_BUF(mac);
1161 1149
1162 if (len < 24 + 2) 1150 if (len < 24 + 2)
1163 return; 1151 return;
@@ -1195,7 +1183,6 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
1195 struct ieee80211_bss_conf *bss_conf = &sdata->bss_conf; 1183 struct ieee80211_bss_conf *bss_conf = &sdata->bss_conf;
1196 u8 *pos; 1184 u8 *pos;
1197 int i, j; 1185 int i, j;
1198 DECLARE_MAC_BUF(mac);
1199 bool have_higher_than_11mbit = false; 1186 bool have_higher_than_11mbit = false;
1200 1187
1201 /* AssocResp and ReassocResp have identical structure, so process both 1188 /* AssocResp and ReassocResp have identical structure, so process both
@@ -1214,9 +1201,9 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
1214 status_code = le16_to_cpu(mgmt->u.assoc_resp.status_code); 1201 status_code = le16_to_cpu(mgmt->u.assoc_resp.status_code);
1215 aid = le16_to_cpu(mgmt->u.assoc_resp.aid); 1202 aid = le16_to_cpu(mgmt->u.assoc_resp.aid);
1216 1203
1217 printk(KERN_DEBUG "%s: RX %sssocResp from %s (capab=0x%x " 1204 printk(KERN_DEBUG "%s: RX %sssocResp from %pM (capab=0x%x "
1218 "status=%d aid=%d)\n", 1205 "status=%d aid=%d)\n",
1219 sdata->dev->name, reassoc ? "Rea" : "A", print_mac(mac, mgmt->sa), 1206 sdata->dev->name, reassoc ? "Rea" : "A", mgmt->sa,
1220 capab_info, status_code, (u16)(aid & ~(BIT(15) | BIT(14)))); 1207 capab_info, status_code, (u16)(aid & ~(BIT(15) | BIT(14))));
1221 1208
1222 if (status_code != WLAN_STATUS_SUCCESS) { 1209 if (status_code != WLAN_STATUS_SUCCESS) {
@@ -1507,8 +1494,6 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
1507 u64 beacon_timestamp, rx_timestamp; 1494 u64 beacon_timestamp, rx_timestamp;
1508 u64 supp_rates = 0; 1495 u64 supp_rates = 0;
1509 enum ieee80211_band band = rx_status->band; 1496 enum ieee80211_band band = rx_status->band;
1510 DECLARE_MAC_BUF(mac);
1511 DECLARE_MAC_BUF(mac2);
1512 1497
1513 if (elems->ds_params && elems->ds_params_len == 1) 1498 if (elems->ds_params && elems->ds_params_len == 1)
1514 freq = ieee80211_channel_to_frequency(elems->ds_params[0]); 1499 freq = ieee80211_channel_to_frequency(elems->ds_params[0]);
@@ -1538,10 +1523,10 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
1538#ifdef CONFIG_MAC80211_IBSS_DEBUG 1523#ifdef CONFIG_MAC80211_IBSS_DEBUG
1539 if (sta->sta.supp_rates[band] != prev_rates) 1524 if (sta->sta.supp_rates[band] != prev_rates)
1540 printk(KERN_DEBUG "%s: updated supp_rates set " 1525 printk(KERN_DEBUG "%s: updated supp_rates set "
1541 "for %s based on beacon info (0x%llx | " 1526 "for %pM based on beacon info (0x%llx | "
1542 "0x%llx -> 0x%llx)\n", 1527 "0x%llx -> 0x%llx)\n",
1543 sdata->dev->name, 1528 sdata->dev->name,
1544 print_mac(mac, sta->sta.addr), 1529 sta->sta.addr,
1545 (unsigned long long) prev_rates, 1530 (unsigned long long) prev_rates,
1546 (unsigned long long) supp_rates, 1531 (unsigned long long) supp_rates,
1547 (unsigned long long) sta->sta.supp_rates[band]); 1532 (unsigned long long) sta->sta.supp_rates[band]);
@@ -1605,10 +1590,9 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
1605 /* can't merge without knowing the TSF */ 1590 /* can't merge without knowing the TSF */
1606 rx_timestamp = -1LLU; 1591 rx_timestamp = -1LLU;
1607#ifdef CONFIG_MAC80211_IBSS_DEBUG 1592#ifdef CONFIG_MAC80211_IBSS_DEBUG
1608 printk(KERN_DEBUG "RX beacon SA=%s BSSID=" 1593 printk(KERN_DEBUG "RX beacon SA=%pM BSSID="
1609 "%s TSF=0x%llx BCN=0x%llx diff=%lld @%lu\n", 1594 "%pM TSF=0x%llx BCN=0x%llx diff=%lld @%lu\n",
1610 print_mac(mac, mgmt->sa), 1595 mgmt->sa, mgmt->bssid,
1611 print_mac(mac2, mgmt->bssid),
1612 (unsigned long long)rx_timestamp, 1596 (unsigned long long)rx_timestamp,
1613 (unsigned long long)beacon_timestamp, 1597 (unsigned long long)beacon_timestamp,
1614 (unsigned long long)(rx_timestamp - beacon_timestamp), 1598 (unsigned long long)(rx_timestamp - beacon_timestamp),
@@ -1617,8 +1601,8 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
1617 if (beacon_timestamp > rx_timestamp) { 1601 if (beacon_timestamp > rx_timestamp) {
1618#ifdef CONFIG_MAC80211_IBSS_DEBUG 1602#ifdef CONFIG_MAC80211_IBSS_DEBUG
1619 printk(KERN_DEBUG "%s: beacon TSF higher than " 1603 printk(KERN_DEBUG "%s: beacon TSF higher than "
1620 "local TSF - IBSS merge with BSSID %s\n", 1604 "local TSF - IBSS merge with BSSID %pM\n",
1621 sdata->dev->name, print_mac(mac, mgmt->bssid)); 1605 sdata->dev->name, mgmt->bssid);
1622#endif 1606#endif
1623 ieee80211_sta_join_ibss(sdata, &sdata->u.sta, bss); 1607 ieee80211_sta_join_ibss(sdata, &sdata->u.sta, bss);
1624 ieee80211_ibss_add_sta(sdata, NULL, 1608 ieee80211_ibss_add_sta(sdata, NULL,
@@ -1727,11 +1711,6 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata,
1727 struct sk_buff *skb; 1711 struct sk_buff *skb;
1728 struct ieee80211_mgmt *resp; 1712 struct ieee80211_mgmt *resp;
1729 u8 *pos, *end; 1713 u8 *pos, *end;
1730 DECLARE_MAC_BUF(mac);
1731#ifdef CONFIG_MAC80211_IBSS_DEBUG
1732 DECLARE_MAC_BUF(mac2);
1733 DECLARE_MAC_BUF(mac3);
1734#endif
1735 1714
1736 if (sdata->vif.type != NL80211_IFTYPE_ADHOC || 1715 if (sdata->vif.type != NL80211_IFTYPE_ADHOC ||
1737 ifsta->state != IEEE80211_STA_MLME_IBSS_JOINED || 1716 ifsta->state != IEEE80211_STA_MLME_IBSS_JOINED ||
@@ -1744,10 +1723,10 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata,
1744 tx_last_beacon = 1; 1723 tx_last_beacon = 1;
1745 1724
1746#ifdef CONFIG_MAC80211_IBSS_DEBUG 1725#ifdef CONFIG_MAC80211_IBSS_DEBUG
1747 printk(KERN_DEBUG "%s: RX ProbeReq SA=%s DA=%s BSSID=" 1726 printk(KERN_DEBUG "%s: RX ProbeReq SA=%pM DA=%pM BSSID=%pM"
1748 "%s (tx_last_beacon=%d)\n", 1727 " (tx_last_beacon=%d)\n",
1749 sdata->dev->name, print_mac(mac, mgmt->sa), print_mac(mac2, mgmt->da), 1728 sdata->dev->name, mgmt->sa, mgmt->da,
1750 print_mac(mac3, mgmt->bssid), tx_last_beacon); 1729 mgmt->bssid, tx_last_beacon);
1751#endif /* CONFIG_MAC80211_IBSS_DEBUG */ 1730#endif /* CONFIG_MAC80211_IBSS_DEBUG */
1752 1731
1753 if (!tx_last_beacon) 1732 if (!tx_last_beacon)
@@ -1763,8 +1742,8 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata,
1763 pos + 2 + pos[1] > end) { 1742 pos + 2 + pos[1] > end) {
1764#ifdef CONFIG_MAC80211_IBSS_DEBUG 1743#ifdef CONFIG_MAC80211_IBSS_DEBUG
1765 printk(KERN_DEBUG "%s: Invalid SSID IE in ProbeReq " 1744 printk(KERN_DEBUG "%s: Invalid SSID IE in ProbeReq "
1766 "from %s\n", 1745 "from %pM\n",
1767 sdata->dev->name, print_mac(mac, mgmt->sa)); 1746 sdata->dev->name, mgmt->sa);
1768#endif 1747#endif
1769 return; 1748 return;
1770 } 1749 }
@@ -1783,8 +1762,8 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata,
1783 resp = (struct ieee80211_mgmt *) skb->data; 1762 resp = (struct ieee80211_mgmt *) skb->data;
1784 memcpy(resp->da, mgmt->sa, ETH_ALEN); 1763 memcpy(resp->da, mgmt->sa, ETH_ALEN);
1785#ifdef CONFIG_MAC80211_IBSS_DEBUG 1764#ifdef CONFIG_MAC80211_IBSS_DEBUG
1786 printk(KERN_DEBUG "%s: Sending ProbeResp to %s\n", 1765 printk(KERN_DEBUG "%s: Sending ProbeResp to %pM\n",
1787 sdata->dev->name, print_mac(mac, resp->da)); 1766 sdata->dev->name, resp->da);
1788#endif /* CONFIG_MAC80211_IBSS_DEBUG */ 1767#endif /* CONFIG_MAC80211_IBSS_DEBUG */
1789 ieee80211_tx_skb(sdata, skb, 0); 1768 ieee80211_tx_skb(sdata, skb, 0);
1790} 1769}
@@ -1990,7 +1969,6 @@ static int ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata,
1990 u8 bssid[ETH_ALEN], *pos; 1969 u8 bssid[ETH_ALEN], *pos;
1991 int i; 1970 int i;
1992 int ret; 1971 int ret;
1993 DECLARE_MAC_BUF(mac);
1994 1972
1995#if 0 1973#if 0
1996 /* Easier testing, use fixed BSSID. */ 1974 /* Easier testing, use fixed BSSID. */
@@ -2006,8 +1984,8 @@ static int ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata,
2006 bssid[0] |= 0x02; 1984 bssid[0] |= 0x02;
2007#endif 1985#endif
2008 1986
2009 printk(KERN_DEBUG "%s: Creating new IBSS network, BSSID %s\n", 1987 printk(KERN_DEBUG "%s: Creating new IBSS network, BSSID %pM\n",
2010 sdata->dev->name, print_mac(mac, bssid)); 1988 sdata->dev->name, bssid);
2011 1989
2012 bss = ieee80211_rx_bss_add(local, bssid, 1990 bss = ieee80211_rx_bss_add(local, bssid,
2013 local->hw.conf.channel->center_freq, 1991 local->hw.conf.channel->center_freq,
@@ -2050,8 +2028,6 @@ static int ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata,
2050 int found = 0; 2028 int found = 0;
2051 u8 bssid[ETH_ALEN]; 2029 u8 bssid[ETH_ALEN];
2052 int active_ibss; 2030 int active_ibss;
2053 DECLARE_MAC_BUF(mac);
2054 DECLARE_MAC_BUF(mac2);
2055 2031
2056 if (ifsta->ssid_len == 0) 2032 if (ifsta->ssid_len == 0)
2057 return -EINVAL; 2033 return -EINVAL;
@@ -2068,8 +2044,7 @@ static int ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata,
2068 || !(bss->capability & WLAN_CAPABILITY_IBSS)) 2044 || !(bss->capability & WLAN_CAPABILITY_IBSS))
2069 continue; 2045 continue;
2070#ifdef CONFIG_MAC80211_IBSS_DEBUG 2046#ifdef CONFIG_MAC80211_IBSS_DEBUG
2071 printk(KERN_DEBUG " bssid=%s found\n", 2047 printk(KERN_DEBUG " bssid=%pM found\n", bss->bssid);
2072 print_mac(mac, bss->bssid));
2073#endif /* CONFIG_MAC80211_IBSS_DEBUG */ 2048#endif /* CONFIG_MAC80211_IBSS_DEBUG */
2074 memcpy(bssid, bss->bssid, ETH_ALEN); 2049 memcpy(bssid, bss->bssid, ETH_ALEN);
2075 found = 1; 2050 found = 1;
@@ -2080,9 +2055,8 @@ static int ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata,
2080 2055
2081#ifdef CONFIG_MAC80211_IBSS_DEBUG 2056#ifdef CONFIG_MAC80211_IBSS_DEBUG
2082 if (found) 2057 if (found)
2083 printk(KERN_DEBUG " sta_find_ibss: selected %s current " 2058 printk(KERN_DEBUG " sta_find_ibss: selected %pM current "
2084 "%s\n", print_mac(mac, bssid), 2059 "%pM\n", bssid, ifsta->bssid);
2085 print_mac(mac2, ifsta->bssid));
2086#endif /* CONFIG_MAC80211_IBSS_DEBUG */ 2060#endif /* CONFIG_MAC80211_IBSS_DEBUG */
2087 2061
2088 if (found && memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0) { 2062 if (found && memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0) {
@@ -2099,9 +2073,9 @@ static int ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata,
2099 if (!bss) 2073 if (!bss)
2100 goto dont_join; 2074 goto dont_join;
2101 2075
2102 printk(KERN_DEBUG "%s: Selected IBSS BSSID %s" 2076 printk(KERN_DEBUG "%s: Selected IBSS BSSID %pM"
2103 " based on configured SSID\n", 2077 " based on configured SSID\n",
2104 sdata->dev->name, print_mac(mac, bssid)); 2078 sdata->dev->name, bssid);
2105 ret = ieee80211_sta_join_ibss(sdata, ifsta, bss); 2079 ret = ieee80211_sta_join_ibss(sdata, ifsta, bss);
2106 ieee80211_rx_bss_put(local, bss); 2080 ieee80211_rx_bss_put(local, bss);
2107 return ret; 2081 return ret;
@@ -2343,7 +2317,6 @@ struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata,
2343{ 2317{
2344 struct ieee80211_local *local = sdata->local; 2318 struct ieee80211_local *local = sdata->local;
2345 struct sta_info *sta; 2319 struct sta_info *sta;
2346 DECLARE_MAC_BUF(mac);
2347 int band = local->hw.conf.channel->band; 2320 int band = local->hw.conf.channel->band;
2348 2321
2349 /* TODO: Could consider removing the least recently used entry and 2322 /* TODO: Could consider removing the least recently used entry and
@@ -2351,7 +2324,7 @@ struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata,
2351 if (local->num_sta >= IEEE80211_IBSS_MAX_STA_ENTRIES) { 2324 if (local->num_sta >= IEEE80211_IBSS_MAX_STA_ENTRIES) {
2352 if (net_ratelimit()) { 2325 if (net_ratelimit()) {
2353 printk(KERN_DEBUG "%s: No room for a new IBSS STA " 2326 printk(KERN_DEBUG "%s: No room for a new IBSS STA "
2354 "entry %s\n", sdata->dev->name, print_mac(mac, addr)); 2327 "entry %pM\n", sdata->dev->name, addr);
2355 } 2328 }
2356 return NULL; 2329 return NULL;
2357 } 2330 }
@@ -2360,8 +2333,8 @@ struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata,
2360 return NULL; 2333 return NULL;
2361 2334
2362#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 2335#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
2363 printk(KERN_DEBUG "%s: Adding new IBSS station %s (dev=%s)\n", 2336 printk(KERN_DEBUG "%s: Adding new IBSS station %pM (dev=%s)\n",
2364 wiphy_name(local->hw.wiphy), print_mac(mac, addr), sdata->dev->name); 2337 wiphy_name(local->hw.wiphy), addr, sdata->dev->name);
2365#endif 2338#endif
2366 2339
2367 sta = sta_info_alloc(sdata, addr, GFP_ATOMIC); 2340 sta = sta_info_alloc(sdata, addr, GFP_ATOMIC);
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index cf6b121e1bbf..39aaf210e9f5 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -653,13 +653,12 @@ ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx)
653static void ap_sta_ps_start(struct sta_info *sta) 653static void ap_sta_ps_start(struct sta_info *sta)
654{ 654{
655 struct ieee80211_sub_if_data *sdata = sta->sdata; 655 struct ieee80211_sub_if_data *sdata = sta->sdata;
656 DECLARE_MAC_BUF(mac);
657 656
658 atomic_inc(&sdata->bss->num_sta_ps); 657 atomic_inc(&sdata->bss->num_sta_ps);
659 set_and_clear_sta_flags(sta, WLAN_STA_PS, WLAN_STA_PSPOLL); 658 set_and_clear_sta_flags(sta, WLAN_STA_PS, WLAN_STA_PSPOLL);
660#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG 659#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
661 printk(KERN_DEBUG "%s: STA %s aid %d enters power save mode\n", 660 printk(KERN_DEBUG "%s: STA %pM aid %d enters power save mode\n",
662 sdata->dev->name, print_mac(mac, sta->sta.addr), sta->sta.aid); 661 sdata->dev->name, sta->sta.addr, sta->sta.aid);
663#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ 662#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
664} 663}
665 664
@@ -670,7 +669,6 @@ static int ap_sta_ps_end(struct sta_info *sta)
670 struct sk_buff *skb; 669 struct sk_buff *skb;
671 int sent = 0; 670 int sent = 0;
672 struct ieee80211_tx_info *info; 671 struct ieee80211_tx_info *info;
673 DECLARE_MAC_BUF(mac);
674 672
675 atomic_dec(&sdata->bss->num_sta_ps); 673 atomic_dec(&sdata->bss->num_sta_ps);
676 674
@@ -680,8 +678,8 @@ static int ap_sta_ps_end(struct sta_info *sta)
680 sta_info_clear_tim_bit(sta); 678 sta_info_clear_tim_bit(sta);
681 679
682#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG 680#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
683 printk(KERN_DEBUG "%s: STA %s aid %d exits power save mode\n", 681 printk(KERN_DEBUG "%s: STA %pM aid %d exits power save mode\n",
684 sdata->dev->name, print_mac(mac, sta->sta.addr), sta->sta.aid); 682 sdata->dev->name, sta->sta.addr, sta->sta.aid);
685#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ 683#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
686 684
687 /* Send all buffered frames to the station */ 685 /* Send all buffered frames to the station */
@@ -696,9 +694,9 @@ static int ap_sta_ps_end(struct sta_info *sta)
696 local->total_ps_buffered--; 694 local->total_ps_buffered--;
697 sent++; 695 sent++;
698#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG 696#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
699 printk(KERN_DEBUG "%s: STA %s aid %d send PS frame " 697 printk(KERN_DEBUG "%s: STA %pM aid %d send PS frame "
700 "since STA not sleeping anymore\n", sdata->dev->name, 698 "since STA not sleeping anymore\n", sdata->dev->name,
701 print_mac(mac, sta->sta.addr), sta->sta.aid); 699 sta->sta.addr, sta->sta.aid);
702#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ 700#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
703 info->flags |= IEEE80211_TX_CTL_REQUEUE; 701 info->flags |= IEEE80211_TX_CTL_REQUEUE;
704 dev_queue_xmit(skb); 702 dev_queue_xmit(skb);
@@ -789,15 +787,12 @@ ieee80211_reassemble_add(struct ieee80211_sub_if_data *sdata,
789#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 787#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
790 struct ieee80211_hdr *hdr = 788 struct ieee80211_hdr *hdr =
791 (struct ieee80211_hdr *) entry->skb_list.next->data; 789 (struct ieee80211_hdr *) entry->skb_list.next->data;
792 DECLARE_MAC_BUF(mac);
793 DECLARE_MAC_BUF(mac2);
794 printk(KERN_DEBUG "%s: RX reassembly removed oldest " 790 printk(KERN_DEBUG "%s: RX reassembly removed oldest "
795 "fragment entry (idx=%d age=%lu seq=%d last_frag=%d " 791 "fragment entry (idx=%d age=%lu seq=%d last_frag=%d "
796 "addr1=%s addr2=%s\n", 792 "addr1=%pM addr2=%pM\n",
797 sdata->dev->name, idx, 793 sdata->dev->name, idx,
798 jiffies - entry->first_frag_time, entry->seq, 794 jiffies - entry->first_frag_time, entry->seq,
799 entry->last_frag, print_mac(mac, hdr->addr1), 795 entry->last_frag, hdr->addr1, hdr->addr2);
800 print_mac(mac2, hdr->addr2));
801#endif 796#endif
802 __skb_queue_purge(&entry->skb_list); 797 __skb_queue_purge(&entry->skb_list);
803 } 798 }
@@ -866,7 +861,6 @@ ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx)
866 unsigned int frag, seq; 861 unsigned int frag, seq;
867 struct ieee80211_fragment_entry *entry; 862 struct ieee80211_fragment_entry *entry;
868 struct sk_buff *skb; 863 struct sk_buff *skb;
869 DECLARE_MAC_BUF(mac);
870 864
871 hdr = (struct ieee80211_hdr *)rx->skb->data; 865 hdr = (struct ieee80211_hdr *)rx->skb->data;
872 fc = hdr->frame_control; 866 fc = hdr->frame_control;
@@ -970,7 +964,6 @@ ieee80211_rx_h_ps_poll(struct ieee80211_rx_data *rx)
970 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev); 964 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev);
971 struct sk_buff *skb; 965 struct sk_buff *skb;
972 int no_pending_pkts; 966 int no_pending_pkts;
973 DECLARE_MAC_BUF(mac);
974 __le16 fc = ((struct ieee80211_hdr *)rx->skb->data)->frame_control; 967 __le16 fc = ((struct ieee80211_hdr *)rx->skb->data)->frame_control;
975 968
976 if (likely(!rx->sta || !ieee80211_is_pspoll(fc) || 969 if (likely(!rx->sta || !ieee80211_is_pspoll(fc) ||
@@ -1001,8 +994,8 @@ ieee80211_rx_h_ps_poll(struct ieee80211_rx_data *rx)
1001 set_sta_flags(rx->sta, WLAN_STA_PSPOLL); 994 set_sta_flags(rx->sta, WLAN_STA_PSPOLL);
1002 995
1003#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG 996#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
1004 printk(KERN_DEBUG "STA %s aid %d: PS Poll (entries after %d)\n", 997 printk(KERN_DEBUG "STA %pM aid %d: PS Poll (entries after %d)\n",
1005 print_mac(mac, rx->sta->sta.addr), rx->sta->sta.aid, 998 rx->sta->sta.addr, rx->sta->sta.aid,
1006 skb_queue_len(&rx->sta->ps_tx_buf)); 999 skb_queue_len(&rx->sta->ps_tx_buf));
1007#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ 1000#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
1008 1001
@@ -1025,9 +1018,9 @@ ieee80211_rx_h_ps_poll(struct ieee80211_rx_data *rx)
1025 * Should we send it a null-func frame indicating we 1018 * Should we send it a null-func frame indicating we
1026 * have nothing buffered for it? 1019 * have nothing buffered for it?
1027 */ 1020 */
1028 printk(KERN_DEBUG "%s: STA %s sent PS Poll even " 1021 printk(KERN_DEBUG "%s: STA %pM sent PS Poll even "
1029 "though there are no buffered frames for it\n", 1022 "though there are no buffered frames for it\n",
1030 rx->dev->name, print_mac(mac, rx->sta->sta.addr)); 1023 rx->dev->name, rx->sta->sta.addr);
1031#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ 1024#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
1032 } 1025 }
1033 1026
@@ -1097,10 +1090,6 @@ ieee80211_data_to_8023(struct ieee80211_rx_data *rx)
1097 u8 src[ETH_ALEN] __aligned(2); 1090 u8 src[ETH_ALEN] __aligned(2);
1098 struct sk_buff *skb = rx->skb; 1091 struct sk_buff *skb = rx->skb;
1099 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 1092 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
1100 DECLARE_MAC_BUF(mac);
1101 DECLARE_MAC_BUF(mac2);
1102 DECLARE_MAC_BUF(mac3);
1103 DECLARE_MAC_BUF(mac4);
1104 1093
1105 if (unlikely(!ieee80211_is_data_present(hdr->frame_control))) 1094 if (unlikely(!ieee80211_is_data_present(hdr->frame_control)))
1106 return -1; 1095 return -1;
@@ -1279,7 +1268,6 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx_data *rx)
1279 int remaining, err; 1268 int remaining, err;
1280 u8 dst[ETH_ALEN]; 1269 u8 dst[ETH_ALEN];
1281 u8 src[ETH_ALEN]; 1270 u8 src[ETH_ALEN];
1282 DECLARE_MAC_BUF(mac);
1283 1271
1284 if (unlikely(!ieee80211_is_data(fc))) 1272 if (unlikely(!ieee80211_is_data(fc)))
1285 return RX_CONTINUE; 1273 return RX_CONTINUE;
@@ -1632,8 +1620,6 @@ static void ieee80211_rx_michael_mic_report(struct net_device *dev,
1632{ 1620{
1633 int keyidx; 1621 int keyidx;
1634 unsigned int hdrlen; 1622 unsigned int hdrlen;
1635 DECLARE_MAC_BUF(mac);
1636 DECLARE_MAC_BUF(mac2);
1637 1623
1638 hdrlen = ieee80211_hdrlen(hdr->frame_control); 1624 hdrlen = ieee80211_hdrlen(hdr->frame_control);
1639 if (rx->skb->len >= hdrlen + 4) 1625 if (rx->skb->len >= hdrlen + 4)
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 7fef8ea1f5ec..ca89a848c41e 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -137,14 +137,12 @@ struct sta_info *sta_info_get_by_idx(struct ieee80211_local *local, int idx,
137static void __sta_info_free(struct ieee80211_local *local, 137static void __sta_info_free(struct ieee80211_local *local,
138 struct sta_info *sta) 138 struct sta_info *sta)
139{ 139{
140 DECLARE_MAC_BUF(mbuf);
141
142 rate_control_free_sta(sta); 140 rate_control_free_sta(sta);
143 rate_control_put(sta->rate_ctrl); 141 rate_control_put(sta->rate_ctrl);
144 142
145#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 143#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
146 printk(KERN_DEBUG "%s: Destroyed STA %s\n", 144 printk(KERN_DEBUG "%s: Destroyed STA %pM\n",
147 wiphy_name(local->hw.wiphy), print_mac(mbuf, sta->sta.addr)); 145 wiphy_name(local->hw.wiphy), sta->sta.addr);
148#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ 146#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */
149 147
150 kfree(sta); 148 kfree(sta);
@@ -222,7 +220,6 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
222 struct ieee80211_local *local = sdata->local; 220 struct ieee80211_local *local = sdata->local;
223 struct sta_info *sta; 221 struct sta_info *sta;
224 int i; 222 int i;
225 DECLARE_MAC_BUF(mbuf);
226 223
227 sta = kzalloc(sizeof(*sta) + local->hw.sta_data_size, gfp); 224 sta = kzalloc(sizeof(*sta) + local->hw.sta_data_size, gfp);
228 if (!sta) 225 if (!sta)
@@ -263,8 +260,8 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
263 skb_queue_head_init(&sta->tx_filtered); 260 skb_queue_head_init(&sta->tx_filtered);
264 261
265#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 262#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
266 printk(KERN_DEBUG "%s: Allocated STA %s\n", 263 printk(KERN_DEBUG "%s: Allocated STA %pM\n",
267 wiphy_name(local->hw.wiphy), print_mac(mbuf, sta->sta.addr)); 264 wiphy_name(local->hw.wiphy), sta->sta.addr);
268#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ 265#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */
269 266
270#ifdef CONFIG_MAC80211_MESH 267#ifdef CONFIG_MAC80211_MESH
@@ -281,7 +278,6 @@ int sta_info_insert(struct sta_info *sta)
281 struct ieee80211_sub_if_data *sdata = sta->sdata; 278 struct ieee80211_sub_if_data *sdata = sta->sdata;
282 unsigned long flags; 279 unsigned long flags;
283 int err = 0; 280 int err = 0;
284 DECLARE_MAC_BUF(mac);
285 281
286 /* 282 /*
287 * Can't be a WARN_ON because it can be triggered through a race: 283 * Can't be a WARN_ON because it can be triggered through a race:
@@ -322,8 +318,8 @@ int sta_info_insert(struct sta_info *sta)
322 } 318 }
323 319
324#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 320#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
325 printk(KERN_DEBUG "%s: Inserted STA %s\n", 321 printk(KERN_DEBUG "%s: Inserted STA %pM\n",
326 wiphy_name(local->hw.wiphy), print_mac(mac, sta->sta.addr)); 322 wiphy_name(local->hw.wiphy), sta->sta.addr);
327#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ 323#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */
328 324
329 spin_unlock_irqrestore(&local->sta_lock, flags); 325 spin_unlock_irqrestore(&local->sta_lock, flags);
@@ -423,9 +419,6 @@ static void __sta_info_unlink(struct sta_info **sta)
423{ 419{
424 struct ieee80211_local *local = (*sta)->local; 420 struct ieee80211_local *local = (*sta)->local;
425 struct ieee80211_sub_if_data *sdata = (*sta)->sdata; 421 struct ieee80211_sub_if_data *sdata = (*sta)->sdata;
426#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
427 DECLARE_MAC_BUF(mbuf);
428#endif
429 /* 422 /*
430 * pull caller's reference if we're already gone. 423 * pull caller's reference if we're already gone.
431 */ 424 */
@@ -468,8 +461,8 @@ static void __sta_info_unlink(struct sta_info **sta)
468 } 461 }
469 462
470#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 463#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
471 printk(KERN_DEBUG "%s: Removed STA %s\n", 464 printk(KERN_DEBUG "%s: Removed STA %pM\n",
472 wiphy_name(local->hw.wiphy), print_mac(mbuf, (*sta)->sta.addr)); 465 wiphy_name(local->hw.wiphy), (*sta)->sta.addr);
473#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ 466#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */
474 467
475 /* 468 /*
@@ -544,7 +537,6 @@ static void sta_info_cleanup_expire_buffered(struct ieee80211_local *local,
544 unsigned long flags; 537 unsigned long flags;
545 struct sk_buff *skb; 538 struct sk_buff *skb;
546 struct ieee80211_sub_if_data *sdata; 539 struct ieee80211_sub_if_data *sdata;
547 DECLARE_MAC_BUF(mac);
548 540
549 if (skb_queue_empty(&sta->ps_tx_buf)) 541 if (skb_queue_empty(&sta->ps_tx_buf))
550 return; 542 return;
@@ -564,8 +556,8 @@ static void sta_info_cleanup_expire_buffered(struct ieee80211_local *local,
564 sdata = sta->sdata; 556 sdata = sta->sdata;
565 local->total_ps_buffered--; 557 local->total_ps_buffered--;
566#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG 558#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
567 printk(KERN_DEBUG "Buffered frame expired (STA " 559 printk(KERN_DEBUG "Buffered frame expired (STA %pM)\n",
568 "%s)\n", print_mac(mac, sta->sta.addr)); 560 sta->sta.addr);
569#endif 561#endif
570 dev_kfree_skb(skb); 562 dev_kfree_skb(skb);
571 563
@@ -809,15 +801,14 @@ void ieee80211_sta_expire(struct ieee80211_sub_if_data *sdata,
809 struct ieee80211_local *local = sdata->local; 801 struct ieee80211_local *local = sdata->local;
810 struct sta_info *sta, *tmp; 802 struct sta_info *sta, *tmp;
811 LIST_HEAD(tmp_list); 803 LIST_HEAD(tmp_list);
812 DECLARE_MAC_BUF(mac);
813 unsigned long flags; 804 unsigned long flags;
814 805
815 spin_lock_irqsave(&local->sta_lock, flags); 806 spin_lock_irqsave(&local->sta_lock, flags);
816 list_for_each_entry_safe(sta, tmp, &local->sta_list, list) 807 list_for_each_entry_safe(sta, tmp, &local->sta_list, list)
817 if (time_after(jiffies, sta->last_rx + exp_time)) { 808 if (time_after(jiffies, sta->last_rx + exp_time)) {
818#ifdef CONFIG_MAC80211_IBSS_DEBUG 809#ifdef CONFIG_MAC80211_IBSS_DEBUG
819 printk(KERN_DEBUG "%s: expiring inactive STA %s\n", 810 printk(KERN_DEBUG "%s: expiring inactive STA %pM\n",
820 sdata->dev->name, print_mac(mac, sta->sta.addr)); 811 sdata->dev->name, sta->sta.addr);
821#endif 812#endif
822 __sta_info_unlink(&sta); 813 __sta_info_unlink(&sta);
823 if (sta) 814 if (sta)
diff --git a/net/mac80211/tkip.c b/net/mac80211/tkip.c
index 34b32bc8f609..38fa111d2dc6 100644
--- a/net/mac80211/tkip.c
+++ b/net/mac80211/tkip.c
@@ -263,10 +263,9 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm,
263 (iv32 == key->u.tkip.rx[queue].iv32 && 263 (iv32 == key->u.tkip.rx[queue].iv32 &&
264 iv16 <= key->u.tkip.rx[queue].iv16))) { 264 iv16 <= key->u.tkip.rx[queue].iv16))) {
265#ifdef CONFIG_MAC80211_TKIP_DEBUG 265#ifdef CONFIG_MAC80211_TKIP_DEBUG
266 DECLARE_MAC_BUF(mac);
267 printk(KERN_DEBUG "TKIP replay detected for RX frame from " 266 printk(KERN_DEBUG "TKIP replay detected for RX frame from "
268 "%s (RX IV (%04x,%02x) <= prev. IV (%04x,%02x)\n", 267 "%pM (RX IV (%04x,%02x) <= prev. IV (%04x,%02x)\n",
269 print_mac(mac, ta), 268 ta,
270 iv32, iv16, key->u.tkip.rx[queue].iv32, 269 iv32, iv16, key->u.tkip.rx[queue].iv32,
271 key->u.tkip.rx[queue].iv16); 270 key->u.tkip.rx[queue].iv16);
272#endif 271#endif
@@ -287,9 +286,8 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm,
287 { 286 {
288 int i; 287 int i;
289 u8 key_offset = NL80211_TKIP_DATA_OFFSET_ENCR_KEY; 288 u8 key_offset = NL80211_TKIP_DATA_OFFSET_ENCR_KEY;
290 DECLARE_MAC_BUF(mac); 289 printk(KERN_DEBUG "TKIP decrypt: Phase1 TA=%pM"
291 printk(KERN_DEBUG "TKIP decrypt: Phase1 TA=%s" 290 " TK=", ta);
292 " TK=", print_mac(mac, ta));
293 for (i = 0; i < 16; i++) 291 for (i = 0; i < 16; i++)
294 printk("%02x ", 292 printk("%02x ",
295 key->conf.key[key_offset + i]); 293 key->conf.key[key_offset + i]);
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 1460537faf33..9191b510bff8 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -201,10 +201,9 @@ ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx)
201 tx->sdata->vif.type != NL80211_IFTYPE_ADHOC && 201 tx->sdata->vif.type != NL80211_IFTYPE_ADHOC &&
202 ieee80211_is_data(hdr->frame_control))) { 202 ieee80211_is_data(hdr->frame_control))) {
203#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 203#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
204 DECLARE_MAC_BUF(mac);
205 printk(KERN_DEBUG "%s: dropped data frame to not " 204 printk(KERN_DEBUG "%s: dropped data frame to not "
206 "associated station %s\n", 205 "associated station %pM\n",
207 tx->dev->name, print_mac(mac, hdr->addr1)); 206 tx->dev->name, hdr->addr1);
208#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ 207#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */
209 I802_DEBUG_INC(tx->local->tx_handlers_drop_not_assoc); 208 I802_DEBUG_INC(tx->local->tx_handlers_drop_not_assoc);
210 return TX_DROP; 209 return TX_DROP;
@@ -331,7 +330,6 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
331 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); 330 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
332 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data; 331 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
333 u32 staflags; 332 u32 staflags;
334 DECLARE_MAC_BUF(mac);
335 333
336 if (unlikely(!sta || ieee80211_is_probe_resp(hdr->frame_control))) 334 if (unlikely(!sta || ieee80211_is_probe_resp(hdr->frame_control)))
337 return TX_CONTINUE; 335 return TX_CONTINUE;
@@ -341,9 +339,9 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
341 if (unlikely((staflags & WLAN_STA_PS) && 339 if (unlikely((staflags & WLAN_STA_PS) &&
342 !(staflags & WLAN_STA_PSPOLL))) { 340 !(staflags & WLAN_STA_PSPOLL))) {
343#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG 341#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
344 printk(KERN_DEBUG "STA %s aid %d: PS buffer (entries " 342 printk(KERN_DEBUG "STA %pM aid %d: PS buffer (entries "
345 "before %d)\n", 343 "before %d)\n",
346 print_mac(mac, sta->sta.addr), sta->sta.aid, 344 sta->sta.addr, sta->sta.aid,
347 skb_queue_len(&sta->ps_tx_buf)); 345 skb_queue_len(&sta->ps_tx_buf));
348#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ 346#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
349 if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER) 347 if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER)
@@ -352,9 +350,9 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
352 struct sk_buff *old = skb_dequeue(&sta->ps_tx_buf); 350 struct sk_buff *old = skb_dequeue(&sta->ps_tx_buf);
353#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG 351#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
354 if (net_ratelimit()) { 352 if (net_ratelimit()) {
355 printk(KERN_DEBUG "%s: STA %s TX " 353 printk(KERN_DEBUG "%s: STA %pM TX "
356 "buffer full - dropping oldest frame\n", 354 "buffer full - dropping oldest frame\n",
357 tx->dev->name, print_mac(mac, sta->sta.addr)); 355 tx->dev->name, sta->sta.addr);
358 } 356 }
359#endif 357#endif
360 dev_kfree_skb(old); 358 dev_kfree_skb(old);
@@ -371,9 +369,9 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
371 } 369 }
372#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG 370#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
373 else if (unlikely(test_sta_flags(sta, WLAN_STA_PS))) { 371 else if (unlikely(test_sta_flags(sta, WLAN_STA_PS))) {
374 printk(KERN_DEBUG "%s: STA %s in PS mode, but pspoll " 372 printk(KERN_DEBUG "%s: STA %pM in PS mode, but pspoll "
375 "set -> send frame\n", tx->dev->name, 373 "set -> send frame\n", tx->dev->name,
376 print_mac(mac, sta->sta.addr)); 374 sta->sta.addr);
377 } 375 }
378#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ 376#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
379 clear_sta_flags(sta, WLAN_STA_PSPOLL); 377 clear_sta_flags(sta, WLAN_STA_PSPOLL);
@@ -1593,12 +1591,10 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
1593 compare_ether_addr(dev->dev_addr, 1591 compare_ether_addr(dev->dev_addr,
1594 skb->data + ETH_ALEN) == 0))) { 1592 skb->data + ETH_ALEN) == 0))) {
1595#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 1593#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
1596 DECLARE_MAC_BUF(mac);
1597
1598 if (net_ratelimit()) 1594 if (net_ratelimit())
1599 printk(KERN_DEBUG "%s: dropped frame to %s" 1595 printk(KERN_DEBUG "%s: dropped frame to %pM"
1600 " (unauthorized port)\n", dev->name, 1596 " (unauthorized port)\n", dev->name,
1601 print_mac(mac, hdr.addr1)); 1597 hdr.addr1);
1602#endif 1598#endif
1603 1599
1604 I802_DEBUG_INC(local->tx_handlers_drop_unauth_port); 1600 I802_DEBUG_INC(local->tx_handlers_drop_unauth_port);
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c
index 139b5f267b34..d27ef7f2d4a7 100644
--- a/net/mac80211/wme.c
+++ b/net/mac80211/wme.c
@@ -206,13 +206,11 @@ int ieee80211_ht_agg_queue_add(struct ieee80211_local *local,
206 * on the previous queue 206 * on the previous queue
207 * since HT is strict in order */ 207 * since HT is strict in order */
208#ifdef CONFIG_MAC80211_HT_DEBUG 208#ifdef CONFIG_MAC80211_HT_DEBUG
209 if (net_ratelimit()) { 209 if (net_ratelimit())
210 DECLARE_MAC_BUF(mac);
211 printk(KERN_DEBUG "allocated aggregation queue" 210 printk(KERN_DEBUG "allocated aggregation queue"
212 " %d tid %d addr %s pool=0x%lX\n", 211 " %d tid %d addr %pM pool=0x%lX\n",
213 i, tid, print_mac(mac, sta->sta.addr), 212 i, tid, sta->sta.addr,
214 local->queue_pool[0]); 213 local->queue_pool[0]);
215 }
216#endif /* CONFIG_MAC80211_HT_DEBUG */ 214#endif /* CONFIG_MAC80211_HT_DEBUG */
217 return 0; 215 return 0;
218 } 216 }
diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c
index 6db649480e8f..3a20b036ef4c 100644
--- a/net/mac80211/wpa.c
+++ b/net/mac80211/wpa.c
@@ -90,7 +90,6 @@ ieee80211_rx_h_michael_mic_verify(struct ieee80211_rx_data *rx)
90 u8 mic[MICHAEL_MIC_LEN]; 90 u8 mic[MICHAEL_MIC_LEN];
91 struct sk_buff *skb = rx->skb; 91 struct sk_buff *skb = rx->skb;
92 int authenticator = 1, wpa_test = 0; 92 int authenticator = 1, wpa_test = 0;
93 DECLARE_MAC_BUF(mac);
94 93
95 /* 94 /*
96 * No way to verify the MIC if the hardware stripped it 95 * No way to verify the MIC if the hardware stripped it
@@ -227,7 +226,6 @@ ieee80211_crypto_tkip_decrypt(struct ieee80211_rx_data *rx)
227 int hdrlen, res, hwaccel = 0, wpa_test = 0; 226 int hdrlen, res, hwaccel = 0, wpa_test = 0;
228 struct ieee80211_key *key = rx->key; 227 struct ieee80211_key *key = rx->key;
229 struct sk_buff *skb = rx->skb; 228 struct sk_buff *skb = rx->skb;
230 DECLARE_MAC_BUF(mac);
231 229
232 hdrlen = ieee80211_hdrlen(hdr->frame_control); 230 hdrlen = ieee80211_hdrlen(hdr->frame_control);
233 231
@@ -453,7 +451,6 @@ ieee80211_crypto_ccmp_decrypt(struct ieee80211_rx_data *rx)
453 struct sk_buff *skb = rx->skb; 451 struct sk_buff *skb = rx->skb;
454 u8 pn[CCMP_PN_LEN]; 452 u8 pn[CCMP_PN_LEN];
455 int data_len; 453 int data_len;
456 DECLARE_MAC_BUF(mac);
457 454
458 hdrlen = ieee80211_hdrlen(hdr->frame_control); 455 hdrlen = ieee80211_hdrlen(hdr->frame_control);
459 456