aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh_plink.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-10-27 18:56:10 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-27 20:06:16 -0400
commit0c68ae2605dbcf67414d8d1f19af93be44b355fb (patch)
tree19175d53668f5358d346929e5db01d8fe41cb2aa /net/mac80211/mesh_plink.c
parentdd45c9cf687682c9ce256ab14bd8914db77410bb (diff)
mac80211: convert to %pM away from print_mac
Also remove a few stray DECLARE_MAC_BUF that were no longer used at all. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/mesh_plink.c')
-rw-r--r--net/mac80211/mesh_plink.c49
1 files changed, 16 insertions, 33 deletions
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;