diff options
author | Joe Perches <joe@perches.com> | 2010-12-02 22:12:37 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-07 16:34:48 -0500 |
commit | 226afe68fdbd1aa3680158aca0a3631cbd019626 (patch) | |
tree | 89e31323c0798493b9d0b3ec32df33fc21d82bf6 /drivers/net/wireless/ath/ath9k/calib.c | |
parent | 3800276a40751539a920ef8e0537ef2e19126799 (diff) |
ath: Convert ath_print to ath_dbg
Remove ath/debug.h and the includes of these files.
Coalesce long formats.
Correct a few misspellings and missing "\n"s from these logging messages.
Remove unnecessary trailing space before a newline.
Remove ARRAY_SIZE casts, use printf type %zu
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 | 59 |
1 files changed, 29 insertions, 30 deletions
diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c index 6d509484b5f6..b68a1acbddd0 100644 --- a/drivers/net/wireless/ath/ath9k/calib.c +++ b/drivers/net/wireless/ath/ath9k/calib.c | |||
@@ -97,12 +97,12 @@ static void ath9k_hw_update_nfcal_hist_buffer(struct ath_hw *ah, | |||
97 | if (h[i].privNF > limit->max) { | 97 | if (h[i].privNF > limit->max) { |
98 | high_nf_mid = true; | 98 | high_nf_mid = true; |
99 | 99 | ||
100 | ath_print(common, ATH_DBG_CALIBRATE, | 100 | ath_dbg(common, ATH_DBG_CALIBRATE, |
101 | "NFmid[%d] (%d) > MAX (%d), %s\n", | 101 | "NFmid[%d] (%d) > MAX (%d), %s\n", |
102 | i, h[i].privNF, limit->max, | 102 | i, h[i].privNF, limit->max, |
103 | (cal->nfcal_interference ? | 103 | (cal->nfcal_interference ? |
104 | "not corrected (due to interference)" : | 104 | "not corrected (due to interference)" : |
105 | "correcting to MAX")); | 105 | "correcting to MAX")); |
106 | 106 | ||
107 | /* | 107 | /* |
108 | * Normally we limit the average noise floor by the | 108 | * Normally we limit the average noise floor by the |
@@ -180,18 +180,18 @@ bool ath9k_hw_reset_calvalid(struct ath_hw *ah) | |||
180 | return true; | 180 | return true; |
181 | 181 | ||
182 | if (currCal->calState != CAL_DONE) { | 182 | if (currCal->calState != CAL_DONE) { |
183 | ath_print(common, ATH_DBG_CALIBRATE, | 183 | ath_dbg(common, ATH_DBG_CALIBRATE, |
184 | "Calibration state incorrect, %d\n", | 184 | "Calibration state incorrect, %d\n", |
185 | currCal->calState); | 185 | currCal->calState); |
186 | return true; | 186 | return true; |
187 | } | 187 | } |
188 | 188 | ||
189 | if (!(ah->supp_cals & currCal->calData->calType)) | 189 | if (!(ah->supp_cals & currCal->calData->calType)) |
190 | return true; | 190 | return true; |
191 | 191 | ||
192 | ath_print(common, ATH_DBG_CALIBRATE, | 192 | ath_dbg(common, ATH_DBG_CALIBRATE, |
193 | "Resetting Cal %d state for channel %u\n", | 193 | "Resetting Cal %d state for channel %u\n", |
194 | currCal->calData->calType, conf->channel->center_freq); | 194 | currCal->calData->calType, conf->channel->center_freq); |
195 | 195 | ||
196 | ah->caldata->CalValid &= ~currCal->calData->calType; | 196 | ah->caldata->CalValid &= ~currCal->calData->calType; |
197 | currCal->calState = CAL_WAITING; | 197 | currCal->calState = CAL_WAITING; |
@@ -279,9 +279,9 @@ void ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan) | |||
279 | * noisefloor until the next calibration timer. | 279 | * noisefloor until the next calibration timer. |
280 | */ | 280 | */ |
281 | if (j == 1000) { | 281 | if (j == 1000) { |
282 | ath_print(common, ATH_DBG_ANY, "Timeout while waiting for nf " | 282 | ath_dbg(common, ATH_DBG_ANY, |
283 | "to load: AR_PHY_AGC_CONTROL=0x%x\n", | 283 | "Timeout while waiting for nf to load: AR_PHY_AGC_CONTROL=0x%x\n", |
284 | REG_READ(ah, AR_PHY_AGC_CONTROL)); | 284 | REG_READ(ah, AR_PHY_AGC_CONTROL)); |
285 | return; | 285 | return; |
286 | } | 286 | } |
287 | 287 | ||
@@ -318,19 +318,19 @@ static void ath9k_hw_nf_sanitize(struct ath_hw *ah, s16 *nf) | |||
318 | if (!nf[i]) | 318 | if (!nf[i]) |
319 | continue; | 319 | continue; |
320 | 320 | ||
321 | ath_print(common, ATH_DBG_CALIBRATE, | 321 | ath_dbg(common, ATH_DBG_CALIBRATE, |
322 | "NF calibrated [%s] [chain %d] is %d\n", | 322 | "NF calibrated [%s] [chain %d] is %d\n", |
323 | (i >= 3 ? "ext" : "ctl"), i % 3, nf[i]); | 323 | (i >= 3 ? "ext" : "ctl"), i % 3, nf[i]); |
324 | 324 | ||
325 | if (nf[i] > ATH9K_NF_TOO_HIGH) { | 325 | if (nf[i] > ATH9K_NF_TOO_HIGH) { |
326 | ath_print(common, ATH_DBG_CALIBRATE, | 326 | ath_dbg(common, ATH_DBG_CALIBRATE, |
327 | "NF[%d] (%d) > MAX (%d), correcting to MAX", | 327 | "NF[%d] (%d) > MAX (%d), correcting to MAX\n", |
328 | i, nf[i], ATH9K_NF_TOO_HIGH); | 328 | i, nf[i], ATH9K_NF_TOO_HIGH); |
329 | nf[i] = limit->max; | 329 | nf[i] = limit->max; |
330 | } else if (nf[i] < limit->min) { | 330 | } else if (nf[i] < limit->min) { |
331 | ath_print(common, ATH_DBG_CALIBRATE, | 331 | ath_dbg(common, ATH_DBG_CALIBRATE, |
332 | "NF[%d] (%d) < MIN (%d), correcting to NOM", | 332 | "NF[%d] (%d) < MIN (%d), correcting to NOM\n", |
333 | i, nf[i], limit->min); | 333 | i, nf[i], limit->min); |
334 | nf[i] = limit->nominal; | 334 | nf[i] = limit->nominal; |
335 | } | 335 | } |
336 | } | 336 | } |
@@ -347,8 +347,8 @@ bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan) | |||
347 | 347 | ||
348 | chan->channelFlags &= (~CHANNEL_CW_INT); | 348 | chan->channelFlags &= (~CHANNEL_CW_INT); |
349 | if (REG_READ(ah, AR_PHY_AGC_CONTROL) & AR_PHY_AGC_CONTROL_NF) { | 349 | if (REG_READ(ah, AR_PHY_AGC_CONTROL) & AR_PHY_AGC_CONTROL_NF) { |
350 | ath_print(common, ATH_DBG_CALIBRATE, | 350 | ath_dbg(common, ATH_DBG_CALIBRATE, |
351 | "NF did not complete in calibration window\n"); | 351 | "NF did not complete in calibration window\n"); |
352 | return false; | 352 | return false; |
353 | } | 353 | } |
354 | 354 | ||
@@ -357,10 +357,9 @@ bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan) | |||
357 | nf = nfarray[0]; | 357 | nf = nfarray[0]; |
358 | if (ath9k_hw_get_nf_thresh(ah, c->band, &nfThresh) | 358 | if (ath9k_hw_get_nf_thresh(ah, c->band, &nfThresh) |
359 | && nf > nfThresh) { | 359 | && nf > nfThresh) { |
360 | ath_print(common, ATH_DBG_CALIBRATE, | 360 | ath_dbg(common, ATH_DBG_CALIBRATE, |
361 | "noise floor failed detected; " | 361 | "noise floor failed detected; detected %d, threshold %d\n", |
362 | "detected %d, threshold %d\n", | 362 | nf, nfThresh); |
363 | nf, nfThresh); | ||
364 | chan->channelFlags |= CHANNEL_CW_INT; | 363 | chan->channelFlags |= CHANNEL_CW_INT; |
365 | } | 364 | } |
366 | 365 | ||