diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-06-22 05:29:50 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-06-24 05:32:29 -0400 |
commit | bdcbd8e0e3ffdad32b14b6373e67bfcf5fd3f002 (patch) | |
tree | b636f2229570dc95edef997272bd0656cf19224d /net/mac80211/agg-rx.c | |
parent | d3b2fb53c7f82903880769d406c11c7e619b11a4 (diff) |
mac80211: clean up debugging
There are a few things that make the logging and
debugging in mac80211 less useful than it should
be right now:
* a lot of messages should be pr_info, not pr_debug
* wholesale use of pr_debug makes it require *both*
Kconfig and dynamic configuration
* there are still a lot of ifdefs
* the style is very inconsistent, sometimes the
sdata->name is printed in front
Clean up everything, introducing new macros and
separating out the station MLME debugging into
a new Kconfig symbol.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/agg-rx.c')
-rw-r--r-- | net/mac80211/agg-rx.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c index 32ef11d69798..186d9919b043 100644 --- a/net/mac80211/agg-rx.c +++ b/net/mac80211/agg-rx.c | |||
@@ -74,15 +74,17 @@ void ___ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, | |||
74 | 74 | ||
75 | RCU_INIT_POINTER(sta->ampdu_mlme.tid_rx[tid], NULL); | 75 | RCU_INIT_POINTER(sta->ampdu_mlme.tid_rx[tid], NULL); |
76 | 76 | ||
77 | ht_vdbg("Rx BA session stop requested for %pM tid %u %s reason: %d\n", | 77 | ht_dbg(sta->sdata, |
78 | sta->sta.addr, tid, | 78 | "Rx BA session stop requested for %pM tid %u %s reason: %d\n", |
79 | initiator == WLAN_BACK_RECIPIENT ? "recipient" : "inititator", | 79 | sta->sta.addr, tid, |
80 | (int)reason); | 80 | initiator == WLAN_BACK_RECIPIENT ? "recipient" : "inititator", |
81 | (int)reason); | ||
81 | 82 | ||
82 | if (drv_ampdu_action(local, sta->sdata, IEEE80211_AMPDU_RX_STOP, | 83 | if (drv_ampdu_action(local, sta->sdata, IEEE80211_AMPDU_RX_STOP, |
83 | &sta->sta, tid, NULL, 0)) | 84 | &sta->sta, tid, NULL, 0)) |
84 | pr_debug("HW problem - can not stop rx aggregation for tid %d\n", | 85 | sdata_info(sta->sdata, |
85 | tid); | 86 | "HW problem - can not stop rx aggregation for tid %d\n", |
87 | tid); | ||
86 | 88 | ||
87 | /* check if this is a self generated aggregation halt */ | 89 | /* check if this is a self generated aggregation halt */ |
88 | if (initiator == WLAN_BACK_RECIPIENT && tx) | 90 | if (initiator == WLAN_BACK_RECIPIENT && tx) |
@@ -157,7 +159,7 @@ static void sta_rx_agg_session_timer_expired(unsigned long data) | |||
157 | } | 159 | } |
158 | rcu_read_unlock(); | 160 | rcu_read_unlock(); |
159 | 161 | ||
160 | ht_vdbg("rx session timer expired on tid %d\n", (u16)*ptid); | 162 | ht_dbg(sta->sdata, "rx session timer expired on tid %d\n", (u16)*ptid); |
161 | 163 | ||
162 | set_bit(*ptid, sta->ampdu_mlme.tid_rx_timer_expired); | 164 | set_bit(*ptid, sta->ampdu_mlme.tid_rx_timer_expired); |
163 | ieee80211_queue_work(&sta->local->hw, &sta->ampdu_mlme.work); | 165 | ieee80211_queue_work(&sta->local->hw, &sta->ampdu_mlme.work); |
@@ -245,7 +247,7 @@ void ieee80211_process_addba_request(struct ieee80211_local *local, | |||
245 | status = WLAN_STATUS_REQUEST_DECLINED; | 247 | status = WLAN_STATUS_REQUEST_DECLINED; |
246 | 248 | ||
247 | if (test_sta_flag(sta, WLAN_STA_BLOCK_BA)) { | 249 | if (test_sta_flag(sta, WLAN_STA_BLOCK_BA)) { |
248 | ht_vdbg("Suspend in progress - Denying ADDBA request\n"); | 250 | ht_dbg(sta->sdata, "Suspend in progress - Denying ADDBA request\n"); |
249 | goto end_no_lock; | 251 | goto end_no_lock; |
250 | } | 252 | } |
251 | 253 | ||
@@ -257,10 +259,9 @@ void ieee80211_process_addba_request(struct ieee80211_local *local, | |||
257 | (!(sta->sta.ht_cap.cap & IEEE80211_HT_CAP_DELAY_BA))) || | 259 | (!(sta->sta.ht_cap.cap & IEEE80211_HT_CAP_DELAY_BA))) || |
258 | (buf_size > IEEE80211_MAX_AMPDU_BUF)) { | 260 | (buf_size > IEEE80211_MAX_AMPDU_BUF)) { |
259 | status = WLAN_STATUS_INVALID_QOS_PARAM; | 261 | status = WLAN_STATUS_INVALID_QOS_PARAM; |
260 | #ifdef CONFIG_MAC80211_HT_DEBUG | 262 | ht_dbg_ratelimited(sta->sdata, |
261 | net_dbg_ratelimited("AddBA Req with bad params from %pM on tid %u. policy %d, buffer size %d\n", | 263 | "AddBA Req with bad params from %pM on tid %u. policy %d, buffer size %d\n", |
262 | mgmt->sa, tid, ba_policy, buf_size); | 264 | mgmt->sa, tid, ba_policy, buf_size); |
263 | #endif /* CONFIG_MAC80211_HT_DEBUG */ | ||
264 | goto end_no_lock; | 265 | goto end_no_lock; |
265 | } | 266 | } |
266 | /* determine default buffer size */ | 267 | /* determine default buffer size */ |
@@ -275,10 +276,9 @@ void ieee80211_process_addba_request(struct ieee80211_local *local, | |||
275 | mutex_lock(&sta->ampdu_mlme.mtx); | 276 | mutex_lock(&sta->ampdu_mlme.mtx); |
276 | 277 | ||
277 | if (sta->ampdu_mlme.tid_rx[tid]) { | 278 | if (sta->ampdu_mlme.tid_rx[tid]) { |
278 | #ifdef CONFIG_MAC80211_HT_DEBUG | 279 | ht_dbg_ratelimited(sta->sdata, |
279 | net_dbg_ratelimited("unexpected AddBA Req from %pM on tid %u\n", | 280 | "unexpected AddBA Req from %pM on tid %u\n", |
280 | mgmt->sa, tid); | 281 | mgmt->sa, tid); |
281 | #endif /* CONFIG_MAC80211_HT_DEBUG */ | ||
282 | 282 | ||
283 | /* delete existing Rx BA session on the same tid */ | 283 | /* delete existing Rx BA session on the same tid */ |
284 | ___ieee80211_stop_rx_ba_session(sta, tid, WLAN_BACK_RECIPIENT, | 284 | ___ieee80211_stop_rx_ba_session(sta, tid, WLAN_BACK_RECIPIENT, |
@@ -317,7 +317,7 @@ void ieee80211_process_addba_request(struct ieee80211_local *local, | |||
317 | 317 | ||
318 | ret = drv_ampdu_action(local, sta->sdata, IEEE80211_AMPDU_RX_START, | 318 | ret = drv_ampdu_action(local, sta->sdata, IEEE80211_AMPDU_RX_START, |
319 | &sta->sta, tid, &start_seq_num, 0); | 319 | &sta->sta, tid, &start_seq_num, 0); |
320 | ht_vdbg("Rx A-MPDU request on tid %d result %d\n", tid, ret); | 320 | ht_dbg(sta->sdata, "Rx A-MPDU request on tid %d result %d\n", tid, ret); |
321 | if (ret) { | 321 | if (ret) { |
322 | kfree(tid_agg_rx->reorder_buf); | 322 | kfree(tid_agg_rx->reorder_buf); |
323 | kfree(tid_agg_rx->reorder_time); | 323 | kfree(tid_agg_rx->reorder_time); |