aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-08-20 19:25:38 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-08-25 14:33:17 -0400
commit0fb9a9ec27718fbf7fa3153bc94becefb716ceeb (patch)
tree8f5d6a5fa9f2c6b8b08273dc198d6187d0a70361 /net
parentb62177a0aa0521fd07cd7501534c0c3b256ebce6 (diff)
net/mac80211: Use wiphy_<level>
Standardize logging messages from printk(KERN_<level> "%s: " fmt , wiphy_name(foo), args); to wiphy_<level>(foo, fmt, args); Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/cfg.c6
-rw-r--r--net/mac80211/debugfs.c6
-rw-r--r--net/mac80211/ibss.c4
-rw-r--r--net/mac80211/iface.c6
-rw-r--r--net/mac80211/key.c14
-rw-r--r--net/mac80211/main.c15
-rw-r--r--net/mac80211/mlme.c17
-rw-r--r--net/mac80211/rate.c9
-rw-r--r--net/mac80211/rx.c13
-rw-r--r--net/mac80211/sta_info.c21
-rw-r--r--net/mac80211/status.c9
-rw-r--r--net/mac80211/tx.c8
12 files changed, 59 insertions, 69 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 94787d21282c..7693ebc77596 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1123,9 +1123,9 @@ static int ieee80211_set_txq_params(struct wiphy *wiphy,
1123 p.uapsd = false; 1123 p.uapsd = false;
1124 1124
1125 if (drv_conf_tx(local, params->queue, &p)) { 1125 if (drv_conf_tx(local, params->queue, &p)) {
1126 printk(KERN_DEBUG "%s: failed to set TX queue " 1126 wiphy_debug(local->hw.wiphy,
1127 "parameters for queue %d\n", 1127 "failed to set TX queue parameters for queue %d\n",
1128 wiphy_name(local->hw.wiphy), params->queue); 1128 params->queue);
1129 return -EINVAL; 1129 return -EINVAL;
1130 } 1130 }
1131 1131
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index a694c593ff6a..e81ef4e8cb32 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -85,13 +85,15 @@ static ssize_t tsf_write(struct file *file,
85 if (strncmp(buf, "reset", 5) == 0) { 85 if (strncmp(buf, "reset", 5) == 0) {
86 if (local->ops->reset_tsf) { 86 if (local->ops->reset_tsf) {
87 drv_reset_tsf(local); 87 drv_reset_tsf(local);
88 printk(KERN_INFO "%s: debugfs reset TSF\n", wiphy_name(local->hw.wiphy)); 88 wiphy_info(local->hw.wiphy, "debugfs reset TSF\n");
89 } 89 }
90 } else { 90 } else {
91 tsf = simple_strtoul(buf, NULL, 0); 91 tsf = simple_strtoul(buf, NULL, 0);
92 if (local->ops->set_tsf) { 92 if (local->ops->set_tsf) {
93 drv_set_tsf(local, tsf); 93 drv_set_tsf(local, tsf);
94 printk(KERN_INFO "%s: debugfs set TSF to %#018llx\n", wiphy_name(local->hw.wiphy), tsf); 94 wiphy_info(local->hw.wiphy,
95 "debugfs set TSF to %#018llx\n", tsf);
96
95 } 97 }
96 } 98 }
97 99
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 32af97108425..1a3aae54f0cf 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -427,8 +427,8 @@ struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata,
427 return NULL; 427 return NULL;
428 428
429#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 429#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
430 printk(KERN_DEBUG "%s: Adding new IBSS station %pM (dev=%s)\n", 430 wiphy_debug(local->hw.wiphy, "Adding new IBSS station %pM (dev=%s)\n",
431 wiphy_name(local->hw.wiphy), addr, sdata->name); 431 addr, sdata->name);
432#endif 432#endif
433 433
434 sta = sta_info_alloc(sdata, addr, gfp); 434 sta = sta_info_alloc(sdata, addr, gfp);
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 86f434f234ae..9369710cc65b 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1175,8 +1175,7 @@ static u32 ieee80211_idle_off(struct ieee80211_local *local,
1175 return 0; 1175 return 0;
1176 1176
1177#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 1177#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
1178 printk(KERN_DEBUG "%s: device no longer idle - %s\n", 1178 wiphy_debug(local->hw.wiphy, "device no longer idle - %s\n", reason);
1179 wiphy_name(local->hw.wiphy), reason);
1180#endif 1179#endif
1181 1180
1182 local->hw.conf.flags &= ~IEEE80211_CONF_IDLE; 1181 local->hw.conf.flags &= ~IEEE80211_CONF_IDLE;
@@ -1189,8 +1188,7 @@ static u32 ieee80211_idle_on(struct ieee80211_local *local)
1189 return 0; 1188 return 0;
1190 1189
1191#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 1190#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
1192 printk(KERN_DEBUG "%s: device now idle\n", 1191 wiphy_debug(local->hw.wiphy, "device now idle\n");
1193 wiphy_name(local->hw.wiphy));
1194#endif 1192#endif
1195 1193
1196 drv_flush(local, false); 1194 drv_flush(local, false);
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index 9c27c53cfae5..2ce2dbbf6309 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -87,10 +87,9 @@ static void ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
87 key->flags |= KEY_FLAG_UPLOADED_TO_HARDWARE; 87 key->flags |= KEY_FLAG_UPLOADED_TO_HARDWARE;
88 88
89 if (ret && ret != -ENOSPC && ret != -EOPNOTSUPP) 89 if (ret && ret != -ENOSPC && ret != -EOPNOTSUPP)
90 printk(KERN_ERR "mac80211-%s: failed to set key " 90 wiphy_err(key->local->hw.wiphy,
91 "(%d, %pM) to hardware (%d)\n", 91 "failed to set key (%d, %pM) to hardware (%d)\n",
92 wiphy_name(key->local->hw.wiphy), 92 key->conf.keyidx, sta ? sta->addr : bcast_addr, ret);
93 key->conf.keyidx, sta ? sta->addr : bcast_addr, ret);
94} 93}
95 94
96static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key) 95static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key)
@@ -121,10 +120,9 @@ static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key)
121 sta, &key->conf); 120 sta, &key->conf);
122 121
123 if (ret) 122 if (ret)
124 printk(KERN_ERR "mac80211-%s: failed to remove key " 123 wiphy_err(key->local->hw.wiphy,
125 "(%d, %pM) from hardware (%d)\n", 124 "failed to remove key (%d, %pM) from hardware (%d)\n",
126 wiphy_name(key->local->hw.wiphy), 125 key->conf.keyidx, sta ? sta->addr : bcast_addr, ret);
127 key->conf.keyidx, sta ? sta->addr : bcast_addr, ret);
128 126
129 key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE; 127 key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE;
130} 128}
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index a53feac4618c..5756fba63d48 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -713,16 +713,16 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
713 713
714 result = ieee80211_wep_init(local); 714 result = ieee80211_wep_init(local);
715 if (result < 0) 715 if (result < 0)
716 printk(KERN_DEBUG "%s: Failed to initialize wep: %d\n", 716 wiphy_debug(local->hw.wiphy, "Failed to initialize wep: %d\n",
717 wiphy_name(local->hw.wiphy), result); 717 result);
718 718
719 rtnl_lock(); 719 rtnl_lock();
720 720
721 result = ieee80211_init_rate_ctrl_alg(local, 721 result = ieee80211_init_rate_ctrl_alg(local,
722 hw->rate_control_algorithm); 722 hw->rate_control_algorithm);
723 if (result < 0) { 723 if (result < 0) {
724 printk(KERN_DEBUG "%s: Failed to initialize rate control " 724 wiphy_debug(local->hw.wiphy,
725 "algorithm\n", wiphy_name(local->hw.wiphy)); 725 "Failed to initialize rate control algorithm\n");
726 goto fail_rate; 726 goto fail_rate;
727 } 727 }
728 728
@@ -731,8 +731,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
731 result = ieee80211_if_add(local, "wlan%d", NULL, 731 result = ieee80211_if_add(local, "wlan%d", NULL,
732 NL80211_IFTYPE_STATION, NULL); 732 NL80211_IFTYPE_STATION, NULL);
733 if (result) 733 if (result)
734 printk(KERN_WARNING "%s: Failed to add default virtual iface\n", 734 wiphy_warn(local->hw.wiphy,
735 wiphy_name(local->hw.wiphy)); 735 "Failed to add default virtual iface\n");
736 } 736 }
737 737
738 rtnl_unlock(); 738 rtnl_unlock();
@@ -815,8 +815,7 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw)
815 815
816 if (skb_queue_len(&local->skb_queue) || 816 if (skb_queue_len(&local->skb_queue) ||
817 skb_queue_len(&local->skb_queue_unreliable)) 817 skb_queue_len(&local->skb_queue_unreliable))
818 printk(KERN_WARNING "%s: skb_queue not empty\n", 818 wiphy_warn(local->hw.wiphy, "skb_queue not empty\n");
819 wiphy_name(local->hw.wiphy));
820 skb_queue_purge(&local->skb_queue); 819 skb_queue_purge(&local->skb_queue);
821 skb_queue_purge(&local->skb_queue_unreliable); 820 skb_queue_purge(&local->skb_queue_unreliable);
822 821
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 38996a44aa8e..5282ac18d2cf 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -778,16 +778,17 @@ static void ieee80211_sta_wmm_params(struct ieee80211_local *local,
778 params.uapsd = uapsd; 778 params.uapsd = uapsd;
779 779
780#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 780#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
781 printk(KERN_DEBUG "%s: WMM queue=%d aci=%d acm=%d aifs=%d " 781 wiphy_debug(local->hw.wiphy,
782 "cWmin=%d cWmax=%d txop=%d uapsd=%d\n", 782 "WMM queue=%d aci=%d acm=%d aifs=%d "
783 wiphy_name(local->hw.wiphy), queue, aci, acm, 783 "cWmin=%d cWmax=%d txop=%d uapsd=%d\n",
784 params.aifs, params.cw_min, params.cw_max, params.txop, 784 queue, aci, acm,
785 params.uapsd); 785 params.aifs, params.cw_min, params.cw_max,
786 params.txop, params.uapsd);
786#endif 787#endif
787 if (drv_conf_tx(local, queue, &params)) 788 if (drv_conf_tx(local, queue, &params))
788 printk(KERN_DEBUG "%s: failed to set TX queue " 789 wiphy_debug(local->hw.wiphy,
789 "parameters for queue %d\n", 790 "failed to set TX queue parameters for queue %d\n",
790 wiphy_name(local->hw.wiphy), queue); 791 queue);
791 } 792 }
792 793
793 /* enable WMM or activate new settings */ 794 /* enable WMM or activate new settings */
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index 6d0bd198af19..f77a45625c0b 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -366,8 +366,8 @@ int ieee80211_init_rate_ctrl_alg(struct ieee80211_local *local,
366 366
367 ref = rate_control_alloc(name, local); 367 ref = rate_control_alloc(name, local);
368 if (!ref) { 368 if (!ref) {
369 printk(KERN_WARNING "%s: Failed to select rate control " 369 wiphy_warn(local->hw.wiphy,
370 "algorithm\n", wiphy_name(local->hw.wiphy)); 370 "Failed to select rate control algorithm\n");
371 return -ENOENT; 371 return -ENOENT;
372 } 372 }
373 373
@@ -378,9 +378,8 @@ int ieee80211_init_rate_ctrl_alg(struct ieee80211_local *local,
378 sta_info_flush(local, NULL); 378 sta_info_flush(local, NULL);
379 } 379 }
380 380
381 printk(KERN_DEBUG "%s: Selected rate control " 381 wiphy_debug(local->hw.wiphy, "Selected rate control algorithm '%s'\n",
382 "algorithm '%s'\n", wiphy_name(local->hw.wiphy), 382 ref->ops->name);
383 ref->ops->name);
384 383
385 return 0; 384 return 0;
386} 385}
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index aa41e382bbb3..e1844f7085de 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -605,10 +605,8 @@ static void ieee80211_sta_reorder_release(struct ieee80211_hw *hw,
605 605
606#ifdef CONFIG_MAC80211_HT_DEBUG 606#ifdef CONFIG_MAC80211_HT_DEBUG
607 if (net_ratelimit()) 607 if (net_ratelimit())
608 printk(KERN_DEBUG "%s: release an RX reorder " 608 wiphy_debug(hw->wiphy,
609 "frame due to timeout on earlier " 609 "release an RX reorder frame due to timeout on earlier frames\n");
610 "frames\n",
611 wiphy_name(hw->wiphy));
612#endif 610#endif
613 ieee80211_release_reorder_frame(hw, tid_agg_rx, 611 ieee80211_release_reorder_frame(hw, tid_agg_rx,
614 j, frames); 612 j, frames);
@@ -2698,10 +2696,9 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
2698 skb_new = skb_copy(skb, GFP_ATOMIC); 2696 skb_new = skb_copy(skb, GFP_ATOMIC);
2699 if (!skb_new) { 2697 if (!skb_new) {
2700 if (net_ratelimit()) 2698 if (net_ratelimit())
2701 printk(KERN_DEBUG "%s: failed to copy " 2699 wiphy_debug(local->hw.wiphy,
2702 "multicast frame for %s\n", 2700 "failed to copy multicast frame for %s\n",
2703 wiphy_name(local->hw.wiphy), 2701 prev->name);
2704 prev->name);
2705 goto next; 2702 goto next;
2706 } 2703 }
2707 ieee80211_invoke_rx_handlers(prev, &rx, skb_new); 2704 ieee80211_invoke_rx_handlers(prev, &rx, skb_new);
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 6d86f0c1ad04..687077e49dc6 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -174,8 +174,7 @@ static void __sta_info_free(struct ieee80211_local *local,
174 } 174 }
175 175
176#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 176#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
177 printk(KERN_DEBUG "%s: Destroyed STA %pM\n", 177 wiphy_debug(local->hw.wiphy, "Destroyed STA %pM\n", sta->sta.addr);
178 wiphy_name(local->hw.wiphy), sta->sta.addr);
179#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ 178#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */
180 179
181 kfree(sta); 180 kfree(sta);
@@ -262,8 +261,7 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
262 sta->last_seq_ctrl[i] = cpu_to_le16(USHRT_MAX); 261 sta->last_seq_ctrl[i] = cpu_to_le16(USHRT_MAX);
263 262
264#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 263#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
265 printk(KERN_DEBUG "%s: Allocated STA %pM\n", 264 wiphy_debug(local->hw.wiphy, "Allocated STA %pM\n", sta->sta.addr);
266 wiphy_name(local->hw.wiphy), sta->sta.addr);
267#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ 265#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */
268 266
269#ifdef CONFIG_MAC80211_MESH 267#ifdef CONFIG_MAC80211_MESH
@@ -300,8 +298,9 @@ static int sta_info_finish_insert(struct sta_info *sta, bool async)
300 sta->uploaded = true; 298 sta->uploaded = true;
301#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 299#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
302 if (async) 300 if (async)
303 printk(KERN_DEBUG "%s: Finished adding IBSS STA %pM\n", 301 wiphy_debug(local->hw.wiphy,
304 wiphy_name(local->hw.wiphy), sta->sta.addr); 302 "Finished adding IBSS STA %pM\n",
303 sta->sta.addr);
305#endif 304#endif
306 } 305 }
307 306
@@ -411,8 +410,8 @@ int sta_info_insert_rcu(struct sta_info *sta) __acquires(RCU)
411 spin_unlock_irqrestore(&local->sta_lock, flags); 410 spin_unlock_irqrestore(&local->sta_lock, flags);
412 411
413#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 412#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
414 printk(KERN_DEBUG "%s: Added IBSS STA %pM\n", 413 wiphy_debug(local->hw.wiphy, "Added IBSS STA %pM\n",
415 wiphy_name(local->hw.wiphy), sta->sta.addr); 414 sta->sta.addr);
416#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ 415#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */
417 416
418 ieee80211_queue_work(&local->hw, &local->sta_finish_work); 417 ieee80211_queue_work(&local->hw, &local->sta_finish_work);
@@ -459,8 +458,7 @@ int sta_info_insert_rcu(struct sta_info *sta) __acquires(RCU)
459 } 458 }
460 459
461#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 460#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
462 printk(KERN_DEBUG "%s: Inserted STA %pM\n", 461 wiphy_debug(local->hw.wiphy, "Inserted STA %pM\n", sta->sta.addr);
463 wiphy_name(local->hw.wiphy), sta->sta.addr);
464#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ 462#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */
465 463
466 /* move reference to rcu-protected */ 464 /* move reference to rcu-protected */
@@ -690,8 +688,7 @@ static int __must_check __sta_info_destroy(struct sta_info *sta)
690#endif 688#endif
691 689
692#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 690#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
693 printk(KERN_DEBUG "%s: Removed STA %pM\n", 691 wiphy_debug(local->hw.wiphy, "Removed STA %pM\n", sta->sta.addr);
694 wiphy_name(local->hw.wiphy), sta->sta.addr);
695#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ 692#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */
696 cancel_work_sync(&sta->drv_unblock_wk); 693 cancel_work_sync(&sta->drv_unblock_wk);
697 694
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 67a35841bef0..571b32bfc54c 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -114,11 +114,10 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local,
114 114
115#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 115#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
116 if (net_ratelimit()) 116 if (net_ratelimit())
117 printk(KERN_DEBUG "%s: dropped TX filtered frame, " 117 wiphy_debug(local->hw.wiphy,
118 "queue_len=%d PS=%d @%lu\n", 118 "dropped TX filtered frame, queue_len=%d PS=%d @%lu\n",
119 wiphy_name(local->hw.wiphy), 119 skb_queue_len(&sta->tx_filtered),
120 skb_queue_len(&sta->tx_filtered), 120 !!test_sta_flags(sta, WLAN_STA_PS_STA), jiffies);
121 !!test_sta_flags(sta, WLAN_STA_PS_STA), jiffies);
122#endif 121#endif
123 dev_kfree_skb(skb); 122 dev_kfree_skb(skb);
124} 123}
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index bc4fefc91663..d51ec74cfb62 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -351,8 +351,8 @@ static void purge_old_ps_buffers(struct ieee80211_local *local)
351 351
352 local->total_ps_buffered = total; 352 local->total_ps_buffered = total;
353#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG 353#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
354 printk(KERN_DEBUG "%s: PS buffers full - purged %d frames\n", 354 wiphy_debug(local->hw.wiphy, "PS buffers full - purged %d frames\n",
355 wiphy_name(local->hw.wiphy), purged); 355 purged);
356#endif 356#endif
357} 357}
358 358
@@ -1513,8 +1513,8 @@ static int ieee80211_skb_resize(struct ieee80211_local *local,
1513 I802_DEBUG_INC(local->tx_expand_skb_head); 1513 I802_DEBUG_INC(local->tx_expand_skb_head);
1514 1514
1515 if (pskb_expand_head(skb, head_need, tail_need, GFP_ATOMIC)) { 1515 if (pskb_expand_head(skb, head_need, tail_need, GFP_ATOMIC)) {
1516 printk(KERN_DEBUG "%s: failed to reallocate TX buffer\n", 1516 wiphy_debug(local->hw.wiphy,
1517 wiphy_name(local->hw.wiphy)); 1517 "failed to reallocate TX buffer\n");
1518 return -ENOMEM; 1518 return -ENOMEM;
1519 } 1519 }
1520 1520