diff options
author | Joe Perches <joe@perches.com> | 2012-05-15 17:20:31 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-06-05 15:32:10 -0400 |
commit | d63e9ae3b12fd0c6a3795c9b08de6b476f80b8c3 (patch) | |
tree | 7d7e89004303daafb4d03e607d6863cd1fdce442 /net/mac80211/agg-rx.c | |
parent | f0d232080fa5d040aaf73a39d127b003cdd2d0ae (diff) |
net: mac80211: Add and use ht_vdbg debugging macro
Simplify the use of #ifdef CONFIG_MAC80211_HT_DEBUG/#endif
by adding a logging macro to encapsulate the test.
Convert the appropriate uses too.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/agg-rx.c')
-rw-r--r-- | net/mac80211/agg-rx.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c index ec55f42705b7..a096b0dae37d 100644 --- a/net/mac80211/agg-rx.c +++ b/net/mac80211/agg-rx.c | |||
@@ -74,12 +74,10 @@ 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 | #ifdef CONFIG_MAC80211_HT_DEBUG | 77 | ht_vdbg("Rx BA session stop requested for %pM tid %u %s reason: %d\n", |
78 | pr_debug("Rx BA session stop requested for %pM tid %u %s reason: %d\n", | 78 | sta->sta.addr, tid, |
79 | sta->sta.addr, tid, | 79 | initiator == WLAN_BACK_RECIPIENT ? "recipient" : "inititator", |
80 | initiator == WLAN_BACK_RECIPIENT ? "recipient" : "inititator", | 80 | (int)reason); |
81 | (int)reason); | ||
82 | #endif /* CONFIG_MAC80211_HT_DEBUG */ | ||
83 | 81 | ||
84 | if (drv_ampdu_action(local, sta->sdata, IEEE80211_AMPDU_RX_STOP, | 82 | if (drv_ampdu_action(local, sta->sdata, IEEE80211_AMPDU_RX_STOP, |
85 | &sta->sta, tid, NULL, 0)) | 83 | &sta->sta, tid, NULL, 0)) |
@@ -154,9 +152,8 @@ static void sta_rx_agg_session_timer_expired(unsigned long data) | |||
154 | return; | 152 | return; |
155 | } | 153 | } |
156 | 154 | ||
157 | #ifdef CONFIG_MAC80211_HT_DEBUG | 155 | ht_vdbg("rx session timer expired on tid %d\n", (u16)*ptid); |
158 | pr_debug("rx session timer expired on tid %d\n", (u16)*ptid); | 156 | |
159 | #endif | ||
160 | set_bit(*ptid, sta->ampdu_mlme.tid_rx_timer_expired); | 157 | set_bit(*ptid, sta->ampdu_mlme.tid_rx_timer_expired); |
161 | ieee80211_queue_work(&sta->local->hw, &sta->ampdu_mlme.work); | 158 | ieee80211_queue_work(&sta->local->hw, &sta->ampdu_mlme.work); |
162 | } | 159 | } |
@@ -243,9 +240,7 @@ void ieee80211_process_addba_request(struct ieee80211_local *local, | |||
243 | status = WLAN_STATUS_REQUEST_DECLINED; | 240 | status = WLAN_STATUS_REQUEST_DECLINED; |
244 | 241 | ||
245 | if (test_sta_flag(sta, WLAN_STA_BLOCK_BA)) { | 242 | if (test_sta_flag(sta, WLAN_STA_BLOCK_BA)) { |
246 | #ifdef CONFIG_MAC80211_HT_DEBUG | 243 | ht_vdbg("Suspend in progress - Denying ADDBA request\n"); |
247 | pr_debug("Suspend in progress - Denying ADDBA request\n"); | ||
248 | #endif | ||
249 | goto end_no_lock; | 244 | goto end_no_lock; |
250 | } | 245 | } |
251 | 246 | ||
@@ -317,10 +312,7 @@ void ieee80211_process_addba_request(struct ieee80211_local *local, | |||
317 | 312 | ||
318 | ret = drv_ampdu_action(local, sta->sdata, IEEE80211_AMPDU_RX_START, | 313 | ret = drv_ampdu_action(local, sta->sdata, IEEE80211_AMPDU_RX_START, |
319 | &sta->sta, tid, &start_seq_num, 0); | 314 | &sta->sta, tid, &start_seq_num, 0); |
320 | #ifdef CONFIG_MAC80211_HT_DEBUG | 315 | ht_vdbg("Rx A-MPDU request on tid %d result %d\n", tid, ret); |
321 | pr_debug("Rx A-MPDU request on tid %d result %d\n", tid, ret); | ||
322 | #endif /* CONFIG_MAC80211_HT_DEBUG */ | ||
323 | |||
324 | if (ret) { | 316 | if (ret) { |
325 | kfree(tid_agg_rx->reorder_buf); | 317 | kfree(tid_agg_rx->reorder_buf); |
326 | kfree(tid_agg_rx->reorder_time); | 318 | kfree(tid_agg_rx->reorder_time); |