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/ar9002_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/ar9002_calib.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9002_calib.c | 134 |
1 files changed, 61 insertions, 73 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_calib.c b/drivers/net/wireless/ath/ath9k/ar9002_calib.c index 157337febc2..c55e5bbafc4 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c | |||
@@ -61,18 +61,16 @@ static void ar9002_hw_setup_calibration(struct ath_hw *ah, | |||
61 | switch (currCal->calData->calType) { | 61 | switch (currCal->calData->calType) { |
62 | case IQ_MISMATCH_CAL: | 62 | case IQ_MISMATCH_CAL: |
63 | REG_WRITE(ah, AR_PHY_CALMODE, AR_PHY_CALMODE_IQ); | 63 | REG_WRITE(ah, AR_PHY_CALMODE, AR_PHY_CALMODE_IQ); |
64 | ath_dbg(common, ATH_DBG_CALIBRATE, | 64 | ath_dbg(common, CALIBRATE, |
65 | "starting IQ Mismatch Calibration\n"); | 65 | "starting IQ Mismatch Calibration\n"); |
66 | break; | 66 | break; |
67 | case ADC_GAIN_CAL: | 67 | case ADC_GAIN_CAL: |
68 | REG_WRITE(ah, AR_PHY_CALMODE, AR_PHY_CALMODE_ADC_GAIN); | 68 | REG_WRITE(ah, AR_PHY_CALMODE, AR_PHY_CALMODE_ADC_GAIN); |
69 | ath_dbg(common, ATH_DBG_CALIBRATE, | 69 | ath_dbg(common, CALIBRATE, "starting ADC Gain Calibration\n"); |
70 | "starting ADC Gain Calibration\n"); | ||
71 | break; | 70 | break; |
72 | case ADC_DC_CAL: | 71 | case ADC_DC_CAL: |
73 | REG_WRITE(ah, AR_PHY_CALMODE, AR_PHY_CALMODE_ADC_DC_PER); | 72 | REG_WRITE(ah, AR_PHY_CALMODE, AR_PHY_CALMODE_ADC_DC_PER); |
74 | ath_dbg(common, ATH_DBG_CALIBRATE, | 73 | ath_dbg(common, CALIBRATE, "starting ADC DC Calibration\n"); |
75 | "starting ADC DC Calibration\n"); | ||
76 | break; | 74 | break; |
77 | } | 75 | } |
78 | 76 | ||
@@ -129,7 +127,7 @@ static void ar9002_hw_iqcal_collect(struct ath_hw *ah) | |||
129 | REG_READ(ah, AR_PHY_CAL_MEAS_1(i)); | 127 | REG_READ(ah, AR_PHY_CAL_MEAS_1(i)); |
130 | ah->totalIqCorrMeas[i] += | 128 | ah->totalIqCorrMeas[i] += |
131 | (int32_t) REG_READ(ah, AR_PHY_CAL_MEAS_2(i)); | 129 | (int32_t) REG_READ(ah, AR_PHY_CAL_MEAS_2(i)); |
132 | ath_dbg(ath9k_hw_common(ah), ATH_DBG_CALIBRATE, | 130 | ath_dbg(ath9k_hw_common(ah), CALIBRATE, |
133 | "%d: Chn %d pmi=0x%08x;pmq=0x%08x;iqcm=0x%08x;\n", | 131 | "%d: Chn %d pmi=0x%08x;pmq=0x%08x;iqcm=0x%08x;\n", |
134 | ah->cal_samples, i, ah->totalPowerMeasI[i], | 132 | ah->cal_samples, i, ah->totalPowerMeasI[i], |
135 | ah->totalPowerMeasQ[i], | 133 | ah->totalPowerMeasQ[i], |
@@ -151,7 +149,7 @@ static void ar9002_hw_adc_gaincal_collect(struct ath_hw *ah) | |||
151 | ah->totalAdcQEvenPhase[i] += | 149 | ah->totalAdcQEvenPhase[i] += |
152 | REG_READ(ah, AR_PHY_CAL_MEAS_3(i)); | 150 | REG_READ(ah, AR_PHY_CAL_MEAS_3(i)); |
153 | 151 | ||
154 | ath_dbg(ath9k_hw_common(ah), ATH_DBG_CALIBRATE, | 152 | ath_dbg(ath9k_hw_common(ah), CALIBRATE, |
155 | "%d: Chn %d oddi=0x%08x; eveni=0x%08x; oddq=0x%08x; evenq=0x%08x;\n", | 153 | "%d: Chn %d oddi=0x%08x; eveni=0x%08x; oddq=0x%08x; evenq=0x%08x;\n", |
156 | ah->cal_samples, i, | 154 | ah->cal_samples, i, |
157 | ah->totalAdcIOddPhase[i], | 155 | ah->totalAdcIOddPhase[i], |
@@ -175,7 +173,7 @@ static void ar9002_hw_adc_dccal_collect(struct ath_hw *ah) | |||
175 | ah->totalAdcDcOffsetQEvenPhase[i] += | 173 | ah->totalAdcDcOffsetQEvenPhase[i] += |
176 | (int32_t) REG_READ(ah, AR_PHY_CAL_MEAS_3(i)); | 174 | (int32_t) REG_READ(ah, AR_PHY_CAL_MEAS_3(i)); |
177 | 175 | ||
178 | ath_dbg(ath9k_hw_common(ah), ATH_DBG_CALIBRATE, | 176 | ath_dbg(ath9k_hw_common(ah), CALIBRATE, |
179 | "%d: Chn %d oddi=0x%08x; eveni=0x%08x; oddq=0x%08x; evenq=0x%08x;\n", | 177 | "%d: Chn %d oddi=0x%08x; eveni=0x%08x; oddq=0x%08x; evenq=0x%08x;\n", |
180 | ah->cal_samples, i, | 178 | ah->cal_samples, i, |
181 | ah->totalAdcDcOffsetIOddPhase[i], | 179 | ah->totalAdcDcOffsetIOddPhase[i], |
@@ -198,11 +196,11 @@ static void ar9002_hw_iqcalibrate(struct ath_hw *ah, u8 numChains) | |||
198 | powerMeasQ = ah->totalPowerMeasQ[i]; | 196 | powerMeasQ = ah->totalPowerMeasQ[i]; |
199 | iqCorrMeas = ah->totalIqCorrMeas[i]; | 197 | iqCorrMeas = ah->totalIqCorrMeas[i]; |
200 | 198 | ||
201 | ath_dbg(common, ATH_DBG_CALIBRATE, | 199 | ath_dbg(common, CALIBRATE, |
202 | "Starting IQ Cal and Correction for Chain %d\n", | 200 | "Starting IQ Cal and Correction for Chain %d\n", |
203 | i); | 201 | i); |
204 | 202 | ||
205 | ath_dbg(common, ATH_DBG_CALIBRATE, | 203 | ath_dbg(common, CALIBRATE, |
206 | "Original: Chn %d iq_corr_meas = 0x%08x\n", | 204 | "Original: Chn %d iq_corr_meas = 0x%08x\n", |
207 | i, ah->totalIqCorrMeas[i]); | 205 | i, ah->totalIqCorrMeas[i]); |
208 | 206 | ||
@@ -213,12 +211,11 @@ static void ar9002_hw_iqcalibrate(struct ath_hw *ah, u8 numChains) | |||
213 | iqCorrNeg = 1; | 211 | iqCorrNeg = 1; |
214 | } | 212 | } |
215 | 213 | ||
216 | ath_dbg(common, ATH_DBG_CALIBRATE, | 214 | ath_dbg(common, CALIBRATE, "Chn %d pwr_meas_i = 0x%08x\n", |
217 | "Chn %d pwr_meas_i = 0x%08x\n", i, powerMeasI); | 215 | i, powerMeasI); |
218 | ath_dbg(common, ATH_DBG_CALIBRATE, | 216 | ath_dbg(common, CALIBRATE, "Chn %d pwr_meas_q = 0x%08x\n", |
219 | "Chn %d pwr_meas_q = 0x%08x\n", i, powerMeasQ); | 217 | i, powerMeasQ); |
220 | ath_dbg(common, ATH_DBG_CALIBRATE, "iqCorrNeg is 0x%08x\n", | 218 | ath_dbg(common, CALIBRATE, "iqCorrNeg is 0x%08x\n", iqCorrNeg); |
221 | iqCorrNeg); | ||
222 | 219 | ||
223 | iCoffDenom = (powerMeasI / 2 + powerMeasQ / 2) / 128; | 220 | iCoffDenom = (powerMeasI / 2 + powerMeasQ / 2) / 128; |
224 | qCoffDenom = powerMeasQ / 64; | 221 | qCoffDenom = powerMeasQ / 64; |
@@ -227,13 +224,13 @@ static void ar9002_hw_iqcalibrate(struct ath_hw *ah, u8 numChains) | |||
227 | (qCoffDenom != 0)) { | 224 | (qCoffDenom != 0)) { |
228 | iCoff = iqCorrMeas / iCoffDenom; | 225 | iCoff = iqCorrMeas / iCoffDenom; |
229 | qCoff = powerMeasI / qCoffDenom - 64; | 226 | qCoff = powerMeasI / qCoffDenom - 64; |
230 | ath_dbg(common, ATH_DBG_CALIBRATE, | 227 | ath_dbg(common, CALIBRATE, "Chn %d iCoff = 0x%08x\n", |
231 | "Chn %d iCoff = 0x%08x\n", i, iCoff); | 228 | i, iCoff); |
232 | ath_dbg(common, ATH_DBG_CALIBRATE, | 229 | ath_dbg(common, CALIBRATE, "Chn %d qCoff = 0x%08x\n", |
233 | "Chn %d qCoff = 0x%08x\n", i, qCoff); | 230 | i, qCoff); |
234 | 231 | ||
235 | iCoff = iCoff & 0x3f; | 232 | iCoff = iCoff & 0x3f; |
236 | ath_dbg(common, ATH_DBG_CALIBRATE, | 233 | ath_dbg(common, CALIBRATE, |
237 | "New: Chn %d iCoff = 0x%08x\n", i, iCoff); | 234 | "New: Chn %d iCoff = 0x%08x\n", i, iCoff); |
238 | if (iqCorrNeg == 0x0) | 235 | if (iqCorrNeg == 0x0) |
239 | iCoff = 0x40 - iCoff; | 236 | iCoff = 0x40 - iCoff; |
@@ -243,7 +240,7 @@ static void ar9002_hw_iqcalibrate(struct ath_hw *ah, u8 numChains) | |||
243 | else if (qCoff <= -16) | 240 | else if (qCoff <= -16) |
244 | qCoff = -16; | 241 | qCoff = -16; |
245 | 242 | ||
246 | ath_dbg(common, ATH_DBG_CALIBRATE, | 243 | ath_dbg(common, CALIBRATE, |
247 | "Chn %d : iCoff = 0x%x qCoff = 0x%x\n", | 244 | "Chn %d : iCoff = 0x%x qCoff = 0x%x\n", |
248 | i, iCoff, qCoff); | 245 | i, iCoff, qCoff); |
249 | 246 | ||
@@ -253,7 +250,7 @@ static void ar9002_hw_iqcalibrate(struct ath_hw *ah, u8 numChains) | |||
253 | REG_RMW_FIELD(ah, AR_PHY_TIMING_CTRL4(i), | 250 | REG_RMW_FIELD(ah, AR_PHY_TIMING_CTRL4(i), |
254 | AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF, | 251 | AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF, |
255 | qCoff); | 252 | qCoff); |
256 | ath_dbg(common, ATH_DBG_CALIBRATE, | 253 | ath_dbg(common, CALIBRATE, |
257 | "IQ Cal and Correction done for Chain %d\n", | 254 | "IQ Cal and Correction done for Chain %d\n", |
258 | i); | 255 | i); |
259 | } | 256 | } |
@@ -275,21 +272,17 @@ static void ar9002_hw_adc_gaincal_calibrate(struct ath_hw *ah, u8 numChains) | |||
275 | qOddMeasOffset = ah->totalAdcQOddPhase[i]; | 272 | qOddMeasOffset = ah->totalAdcQOddPhase[i]; |
276 | qEvenMeasOffset = ah->totalAdcQEvenPhase[i]; | 273 | qEvenMeasOffset = ah->totalAdcQEvenPhase[i]; |
277 | 274 | ||
278 | ath_dbg(common, ATH_DBG_CALIBRATE, | 275 | ath_dbg(common, CALIBRATE, |
279 | "Starting ADC Gain Cal for Chain %d\n", i); | 276 | "Starting ADC Gain Cal for Chain %d\n", i); |
280 | 277 | ||
281 | ath_dbg(common, ATH_DBG_CALIBRATE, | 278 | ath_dbg(common, CALIBRATE, "Chn %d pwr_meas_odd_i = 0x%08x\n", |
282 | "Chn %d pwr_meas_odd_i = 0x%08x\n", i, | 279 | i, iOddMeasOffset); |
283 | iOddMeasOffset); | 280 | ath_dbg(common, CALIBRATE, "Chn %d pwr_meas_even_i = 0x%08x\n", |
284 | ath_dbg(common, ATH_DBG_CALIBRATE, | 281 | i, iEvenMeasOffset); |
285 | "Chn %d pwr_meas_even_i = 0x%08x\n", i, | 282 | ath_dbg(common, CALIBRATE, "Chn %d pwr_meas_odd_q = 0x%08x\n", |
286 | iEvenMeasOffset); | 283 | i, qOddMeasOffset); |
287 | ath_dbg(common, ATH_DBG_CALIBRATE, | 284 | ath_dbg(common, CALIBRATE, "Chn %d pwr_meas_even_q = 0x%08x\n", |
288 | "Chn %d pwr_meas_odd_q = 0x%08x\n", i, | 285 | i, qEvenMeasOffset); |
289 | qOddMeasOffset); | ||
290 | ath_dbg(common, ATH_DBG_CALIBRATE, | ||
291 | "Chn %d pwr_meas_even_q = 0x%08x\n", i, | ||
292 | qEvenMeasOffset); | ||
293 | 286 | ||
294 | if (iOddMeasOffset != 0 && qEvenMeasOffset != 0) { | 287 | if (iOddMeasOffset != 0 && qEvenMeasOffset != 0) { |
295 | iGainMismatch = | 288 | iGainMismatch = |
@@ -299,19 +292,19 @@ static void ar9002_hw_adc_gaincal_calibrate(struct ath_hw *ah, u8 numChains) | |||
299 | ((qOddMeasOffset * 32) / | 292 | ((qOddMeasOffset * 32) / |
300 | qEvenMeasOffset) & 0x3f; | 293 | qEvenMeasOffset) & 0x3f; |
301 | 294 | ||
302 | ath_dbg(common, ATH_DBG_CALIBRATE, | 295 | ath_dbg(common, CALIBRATE, |
303 | "Chn %d gain_mismatch_i = 0x%08x\n", i, | 296 | "Chn %d gain_mismatch_i = 0x%08x\n", |
304 | iGainMismatch); | 297 | i, iGainMismatch); |
305 | ath_dbg(common, ATH_DBG_CALIBRATE, | 298 | ath_dbg(common, CALIBRATE, |
306 | "Chn %d gain_mismatch_q = 0x%08x\n", i, | 299 | "Chn %d gain_mismatch_q = 0x%08x\n", |
307 | qGainMismatch); | 300 | i, qGainMismatch); |
308 | 301 | ||
309 | val = REG_READ(ah, AR_PHY_NEW_ADC_DC_GAIN_CORR(i)); | 302 | val = REG_READ(ah, AR_PHY_NEW_ADC_DC_GAIN_CORR(i)); |
310 | val &= 0xfffff000; | 303 | val &= 0xfffff000; |
311 | val |= (qGainMismatch) | (iGainMismatch << 6); | 304 | val |= (qGainMismatch) | (iGainMismatch << 6); |
312 | REG_WRITE(ah, AR_PHY_NEW_ADC_DC_GAIN_CORR(i), val); | 305 | REG_WRITE(ah, AR_PHY_NEW_ADC_DC_GAIN_CORR(i), val); |
313 | 306 | ||
314 | ath_dbg(common, ATH_DBG_CALIBRATE, | 307 | ath_dbg(common, CALIBRATE, |
315 | "ADC Gain Cal done for Chain %d\n", i); | 308 | "ADC Gain Cal done for Chain %d\n", i); |
316 | } | 309 | } |
317 | } | 310 | } |
@@ -337,40 +330,36 @@ static void ar9002_hw_adc_dccal_calibrate(struct ath_hw *ah, u8 numChains) | |||
337 | qOddMeasOffset = ah->totalAdcDcOffsetQOddPhase[i]; | 330 | qOddMeasOffset = ah->totalAdcDcOffsetQOddPhase[i]; |
338 | qEvenMeasOffset = ah->totalAdcDcOffsetQEvenPhase[i]; | 331 | qEvenMeasOffset = ah->totalAdcDcOffsetQEvenPhase[i]; |
339 | 332 | ||
340 | ath_dbg(common, ATH_DBG_CALIBRATE, | 333 | ath_dbg(common, CALIBRATE, |
341 | "Starting ADC DC Offset Cal for Chain %d\n", i); | 334 | "Starting ADC DC Offset Cal for Chain %d\n", i); |
342 | 335 | ||
343 | ath_dbg(common, ATH_DBG_CALIBRATE, | 336 | ath_dbg(common, CALIBRATE, "Chn %d pwr_meas_odd_i = %d\n", |
344 | "Chn %d pwr_meas_odd_i = %d\n", i, | 337 | i, iOddMeasOffset); |
345 | iOddMeasOffset); | 338 | ath_dbg(common, CALIBRATE, "Chn %d pwr_meas_even_i = %d\n", |
346 | ath_dbg(common, ATH_DBG_CALIBRATE, | 339 | i, iEvenMeasOffset); |
347 | "Chn %d pwr_meas_even_i = %d\n", i, | 340 | ath_dbg(common, CALIBRATE, "Chn %d pwr_meas_odd_q = %d\n", |
348 | iEvenMeasOffset); | 341 | i, qOddMeasOffset); |
349 | ath_dbg(common, ATH_DBG_CALIBRATE, | 342 | ath_dbg(common, CALIBRATE, "Chn %d pwr_meas_even_q = %d\n", |
350 | "Chn %d pwr_meas_odd_q = %d\n", i, | 343 | i, qEvenMeasOffset); |
351 | qOddMeasOffset); | ||
352 | ath_dbg(common, ATH_DBG_CALIBRATE, | ||
353 | "Chn %d pwr_meas_even_q = %d\n", i, | ||
354 | qEvenMeasOffset); | ||
355 | 344 | ||
356 | iDcMismatch = (((iEvenMeasOffset - iOddMeasOffset) * 2) / | 345 | iDcMismatch = (((iEvenMeasOffset - iOddMeasOffset) * 2) / |
357 | numSamples) & 0x1ff; | 346 | numSamples) & 0x1ff; |
358 | qDcMismatch = (((qOddMeasOffset - qEvenMeasOffset) * 2) / | 347 | qDcMismatch = (((qOddMeasOffset - qEvenMeasOffset) * 2) / |
359 | numSamples) & 0x1ff; | 348 | numSamples) & 0x1ff; |
360 | 349 | ||
361 | ath_dbg(common, ATH_DBG_CALIBRATE, | 350 | ath_dbg(common, CALIBRATE, |
362 | "Chn %d dc_offset_mismatch_i = 0x%08x\n", i, | 351 | "Chn %d dc_offset_mismatch_i = 0x%08x\n", |
363 | iDcMismatch); | 352 | i, iDcMismatch); |
364 | ath_dbg(common, ATH_DBG_CALIBRATE, | 353 | ath_dbg(common, CALIBRATE, |
365 | "Chn %d dc_offset_mismatch_q = 0x%08x\n", i, | 354 | "Chn %d dc_offset_mismatch_q = 0x%08x\n", |
366 | qDcMismatch); | 355 | i, qDcMismatch); |
367 | 356 | ||
368 | val = REG_READ(ah, AR_PHY_NEW_ADC_DC_GAIN_CORR(i)); | 357 | val = REG_READ(ah, AR_PHY_NEW_ADC_DC_GAIN_CORR(i)); |
369 | val &= 0xc0000fff; | 358 | val &= 0xc0000fff; |
370 | val |= (qDcMismatch << 12) | (iDcMismatch << 21); | 359 | val |= (qDcMismatch << 12) | (iDcMismatch << 21); |
371 | REG_WRITE(ah, AR_PHY_NEW_ADC_DC_GAIN_CORR(i), val); | 360 | REG_WRITE(ah, AR_PHY_NEW_ADC_DC_GAIN_CORR(i), val); |
372 | 361 | ||
373 | ath_dbg(common, ATH_DBG_CALIBRATE, | 362 | ath_dbg(common, CALIBRATE, |
374 | "ADC DC Offset Cal done for Chain %d\n", i); | 363 | "ADC DC Offset Cal done for Chain %d\n", i); |
375 | } | 364 | } |
376 | 365 | ||
@@ -560,7 +549,7 @@ static inline void ar9285_hw_pa_cal(struct ath_hw *ah, bool is_reset) | |||
560 | { 0x7838, 0 }, | 549 | { 0x7838, 0 }, |
561 | }; | 550 | }; |
562 | 551 | ||
563 | ath_dbg(common, ATH_DBG_CALIBRATE, "Running PA Calibration\n"); | 552 | ath_dbg(common, CALIBRATE, "Running PA Calibration\n"); |
564 | 553 | ||
565 | /* PA CAL is not needed for high power solution */ | 554 | /* PA CAL is not needed for high power solution */ |
566 | if (ah->eep_ops->get_eeprom(ah, EEP_TXGAIN_TYPE) == | 555 | if (ah->eep_ops->get_eeprom(ah, EEP_TXGAIN_TYPE) == |
@@ -741,7 +730,7 @@ static bool ar9285_hw_cl_cal(struct ath_hw *ah, struct ath9k_channel *chan) | |||
741 | REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_CAL); | 730 | REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_CAL); |
742 | if (!ath9k_hw_wait(ah, AR_PHY_AGC_CONTROL, | 731 | if (!ath9k_hw_wait(ah, AR_PHY_AGC_CONTROL, |
743 | AR_PHY_AGC_CONTROL_CAL, 0, AH_WAIT_TIMEOUT)) { | 732 | AR_PHY_AGC_CONTROL_CAL, 0, AH_WAIT_TIMEOUT)) { |
744 | ath_dbg(common, ATH_DBG_CALIBRATE, | 733 | ath_dbg(common, CALIBRATE, |
745 | "offset calibration failed to complete in 1ms; noisy environment?\n"); | 734 | "offset calibration failed to complete in 1ms; noisy environment?\n"); |
746 | return false; | 735 | return false; |
747 | } | 736 | } |
@@ -755,7 +744,7 @@ static bool ar9285_hw_cl_cal(struct ath_hw *ah, struct ath9k_channel *chan) | |||
755 | REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_CAL); | 744 | REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_CAL); |
756 | if (!ath9k_hw_wait(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_CAL, | 745 | if (!ath9k_hw_wait(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_CAL, |
757 | 0, AH_WAIT_TIMEOUT)) { | 746 | 0, AH_WAIT_TIMEOUT)) { |
758 | ath_dbg(common, ATH_DBG_CALIBRATE, | 747 | ath_dbg(common, CALIBRATE, |
759 | "offset calibration failed to complete in 1ms; noisy environment?\n"); | 748 | "offset calibration failed to complete in 1ms; noisy environment?\n"); |
760 | return false; | 749 | return false; |
761 | } | 750 | } |
@@ -851,7 +840,7 @@ static bool ar9002_hw_init_cal(struct ath_hw *ah, struct ath9k_channel *chan) | |||
851 | if (!ath9k_hw_wait(ah, AR_PHY_AGC_CONTROL, | 840 | if (!ath9k_hw_wait(ah, AR_PHY_AGC_CONTROL, |
852 | AR_PHY_AGC_CONTROL_CAL, | 841 | AR_PHY_AGC_CONTROL_CAL, |
853 | 0, AH_WAIT_TIMEOUT)) { | 842 | 0, AH_WAIT_TIMEOUT)) { |
854 | ath_dbg(common, ATH_DBG_CALIBRATE, | 843 | ath_dbg(common, CALIBRATE, |
855 | "offset calibration failed to complete in 1ms; noisy environment?\n"); | 844 | "offset calibration failed to complete in 1ms; noisy environment?\n"); |
856 | return false; | 845 | return false; |
857 | } | 846 | } |
@@ -886,22 +875,21 @@ static bool ar9002_hw_init_cal(struct ath_hw *ah, struct ath9k_channel *chan) | |||
886 | if (ar9002_hw_is_cal_supported(ah, chan, ADC_GAIN_CAL)) { | 875 | if (ar9002_hw_is_cal_supported(ah, chan, ADC_GAIN_CAL)) { |
887 | INIT_CAL(&ah->adcgain_caldata); | 876 | INIT_CAL(&ah->adcgain_caldata); |
888 | INSERT_CAL(ah, &ah->adcgain_caldata); | 877 | INSERT_CAL(ah, &ah->adcgain_caldata); |
889 | ath_dbg(common, ATH_DBG_CALIBRATE, | 878 | ath_dbg(common, CALIBRATE, |
890 | "enabling ADC Gain Calibration.\n"); | 879 | "enabling ADC Gain Calibration\n"); |
891 | } | 880 | } |
892 | 881 | ||
893 | if (ar9002_hw_is_cal_supported(ah, chan, ADC_DC_CAL)) { | 882 | if (ar9002_hw_is_cal_supported(ah, chan, ADC_DC_CAL)) { |
894 | INIT_CAL(&ah->adcdc_caldata); | 883 | INIT_CAL(&ah->adcdc_caldata); |
895 | INSERT_CAL(ah, &ah->adcdc_caldata); | 884 | INSERT_CAL(ah, &ah->adcdc_caldata); |
896 | ath_dbg(common, ATH_DBG_CALIBRATE, | 885 | ath_dbg(common, CALIBRATE, |
897 | "enabling ADC DC Calibration.\n"); | 886 | "enabling ADC DC Calibration\n"); |
898 | } | 887 | } |
899 | 888 | ||
900 | if (ar9002_hw_is_cal_supported(ah, chan, IQ_MISMATCH_CAL)) { | 889 | if (ar9002_hw_is_cal_supported(ah, chan, IQ_MISMATCH_CAL)) { |
901 | INIT_CAL(&ah->iq_caldata); | 890 | INIT_CAL(&ah->iq_caldata); |
902 | INSERT_CAL(ah, &ah->iq_caldata); | 891 | INSERT_CAL(ah, &ah->iq_caldata); |
903 | ath_dbg(common, ATH_DBG_CALIBRATE, | 892 | ath_dbg(common, CALIBRATE, "enabling IQ Calibration\n"); |
904 | "enabling IQ Calibration.\n"); | ||
905 | } | 893 | } |
906 | 894 | ||
907 | ah->cal_list_curr = ah->cal_list; | 895 | ah->cal_list_curr = ah->cal_list; |