diff options
author | Joe Perches <joe@perches.com> | 2011-12-15 17:55:53 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-12-19 14:35:31 -0500 |
commit | d2182b69dcb6a68b1ef6070b2efd094e13dea3f1 (patch) | |
tree | 92da8da22d48540d9f28b1e91ba0d1befbac5fe9 /drivers/net/wireless/ath/ath9k/calib.c | |
parent | a85e1d55974646a442d95911e3f7d7a891ea9ac5 (diff) |
ath: Convert ath_dbg(bar, ATH_DBG_<FOO>, to ath_dbg(bar, FOO
Add ATH_DBG_ to macros to shorten the uses and
reduce the line count.
Coalesce ath_dbg formats.
Add missing spaces to coalesced formats.
Add missing newline terminations to ath_dbg formats.
Align ath_dbg arguments where appropriate.
Standardize ath_dbg formats without periods.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/calib.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/calib.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c index 99538810a312..172e33db7f4c 100644 --- a/drivers/net/wireless/ath/ath9k/calib.c +++ b/drivers/net/wireless/ath/ath9k/calib.c | |||
@@ -116,7 +116,7 @@ static void ath9k_hw_update_nfcal_hist_buffer(struct ath_hw *ah, | |||
116 | if (h[i].privNF > limit->max) { | 116 | if (h[i].privNF > limit->max) { |
117 | high_nf_mid = true; | 117 | high_nf_mid = true; |
118 | 118 | ||
119 | ath_dbg(common, ATH_DBG_CALIBRATE, | 119 | ath_dbg(common, CALIBRATE, |
120 | "NFmid[%d] (%d) > MAX (%d), %s\n", | 120 | "NFmid[%d] (%d) > MAX (%d), %s\n", |
121 | i, h[i].privNF, limit->max, | 121 | i, h[i].privNF, limit->max, |
122 | (cal->nfcal_interference ? | 122 | (cal->nfcal_interference ? |
@@ -199,8 +199,7 @@ bool ath9k_hw_reset_calvalid(struct ath_hw *ah) | |||
199 | return true; | 199 | return true; |
200 | 200 | ||
201 | if (currCal->calState != CAL_DONE) { | 201 | if (currCal->calState != CAL_DONE) { |
202 | ath_dbg(common, ATH_DBG_CALIBRATE, | 202 | ath_dbg(common, CALIBRATE, "Calibration state incorrect, %d\n", |
203 | "Calibration state incorrect, %d\n", | ||
204 | currCal->calState); | 203 | currCal->calState); |
205 | return true; | 204 | return true; |
206 | } | 205 | } |
@@ -208,8 +207,7 @@ bool ath9k_hw_reset_calvalid(struct ath_hw *ah) | |||
208 | if (!(ah->supp_cals & currCal->calData->calType)) | 207 | if (!(ah->supp_cals & currCal->calData->calType)) |
209 | return true; | 208 | return true; |
210 | 209 | ||
211 | ath_dbg(common, ATH_DBG_CALIBRATE, | 210 | ath_dbg(common, CALIBRATE, "Resetting Cal %d state for channel %u\n", |
212 | "Resetting Cal %d state for channel %u\n", | ||
213 | currCal->calData->calType, conf->channel->center_freq); | 211 | currCal->calData->calType, conf->channel->center_freq); |
214 | 212 | ||
215 | ah->caldata->CalValid &= ~currCal->calData->calType; | 213 | ah->caldata->CalValid &= ~currCal->calData->calType; |
@@ -302,7 +300,7 @@ void ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan) | |||
302 | * noisefloor until the next calibration timer. | 300 | * noisefloor until the next calibration timer. |
303 | */ | 301 | */ |
304 | if (j == 10000) { | 302 | if (j == 10000) { |
305 | ath_dbg(common, ATH_DBG_ANY, | 303 | ath_dbg(common, ANY, |
306 | "Timeout while waiting for nf to load: AR_PHY_AGC_CONTROL=0x%x\n", | 304 | "Timeout while waiting for nf to load: AR_PHY_AGC_CONTROL=0x%x\n", |
307 | REG_READ(ah, AR_PHY_AGC_CONTROL)); | 305 | REG_READ(ah, AR_PHY_AGC_CONTROL)); |
308 | return; | 306 | return; |
@@ -344,17 +342,17 @@ static void ath9k_hw_nf_sanitize(struct ath_hw *ah, s16 *nf) | |||
344 | if (!nf[i]) | 342 | if (!nf[i]) |
345 | continue; | 343 | continue; |
346 | 344 | ||
347 | ath_dbg(common, ATH_DBG_CALIBRATE, | 345 | ath_dbg(common, CALIBRATE, |
348 | "NF calibrated [%s] [chain %d] is %d\n", | 346 | "NF calibrated [%s] [chain %d] is %d\n", |
349 | (i >= 3 ? "ext" : "ctl"), i % 3, nf[i]); | 347 | (i >= 3 ? "ext" : "ctl"), i % 3, nf[i]); |
350 | 348 | ||
351 | if (nf[i] > ATH9K_NF_TOO_HIGH) { | 349 | if (nf[i] > ATH9K_NF_TOO_HIGH) { |
352 | ath_dbg(common, ATH_DBG_CALIBRATE, | 350 | ath_dbg(common, CALIBRATE, |
353 | "NF[%d] (%d) > MAX (%d), correcting to MAX\n", | 351 | "NF[%d] (%d) > MAX (%d), correcting to MAX\n", |
354 | i, nf[i], ATH9K_NF_TOO_HIGH); | 352 | i, nf[i], ATH9K_NF_TOO_HIGH); |
355 | nf[i] = limit->max; | 353 | nf[i] = limit->max; |
356 | } else if (nf[i] < limit->min) { | 354 | } else if (nf[i] < limit->min) { |
357 | ath_dbg(common, ATH_DBG_CALIBRATE, | 355 | ath_dbg(common, CALIBRATE, |
358 | "NF[%d] (%d) < MIN (%d), correcting to NOM\n", | 356 | "NF[%d] (%d) < MIN (%d), correcting to NOM\n", |
359 | i, nf[i], limit->min); | 357 | i, nf[i], limit->min); |
360 | nf[i] = limit->nominal; | 358 | nf[i] = limit->nominal; |
@@ -373,7 +371,7 @@ bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan) | |||
373 | 371 | ||
374 | chan->channelFlags &= (~CHANNEL_CW_INT); | 372 | chan->channelFlags &= (~CHANNEL_CW_INT); |
375 | if (REG_READ(ah, AR_PHY_AGC_CONTROL) & AR_PHY_AGC_CONTROL_NF) { | 373 | if (REG_READ(ah, AR_PHY_AGC_CONTROL) & AR_PHY_AGC_CONTROL_NF) { |
376 | ath_dbg(common, ATH_DBG_CALIBRATE, | 374 | ath_dbg(common, CALIBRATE, |
377 | "NF did not complete in calibration window\n"); | 375 | "NF did not complete in calibration window\n"); |
378 | return false; | 376 | return false; |
379 | } | 377 | } |
@@ -383,7 +381,7 @@ bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan) | |||
383 | nf = nfarray[0]; | 381 | nf = nfarray[0]; |
384 | if (ath9k_hw_get_nf_thresh(ah, c->band, &nfThresh) | 382 | if (ath9k_hw_get_nf_thresh(ah, c->band, &nfThresh) |
385 | && nf > nfThresh) { | 383 | && nf > nfThresh) { |
386 | ath_dbg(common, ATH_DBG_CALIBRATE, | 384 | ath_dbg(common, CALIBRATE, |
387 | "noise floor failed detected; detected %d, threshold %d\n", | 385 | "noise floor failed detected; detected %d, threshold %d\n", |
388 | nf, nfThresh); | 386 | nf, nfThresh); |
389 | chan->channelFlags |= CHANNEL_CW_INT; | 387 | chan->channelFlags |= CHANNEL_CW_INT; |