aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/main.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2009-04-13 12:26:48 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-04-22 16:54:46 -0400
commit379f04407c92d84f2506385b66fb9fc89ecd96c3 (patch)
tree369e64ee62bbe9c331fe804b433f295bebd385e1 /drivers/net/wireless/ath/ath9k/main.c
parent415f738ecf41b427921b503ecfd427e26f89dc23 (diff)
ath9k: Cleanup calibration interface
This patch cleans up the functions dealing with calibration, using proper return values. ath9k_hw_per_calibration(), ath9k_hw_calibrate now return bool values instead of setting error values in the function arguments. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c32
1 files changed, 10 insertions, 22 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 9564b73ded51..8bf2bf36fd6d 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -367,28 +367,16 @@ static void ath_ani_calibrate(unsigned long data)
367 367
368 /* Perform calibration if necessary */ 368 /* Perform calibration if necessary */
369 if (longcal || shortcal) { 369 if (longcal || shortcal) {
370 bool iscaldone = false; 370 sc->ani.caldone = ath9k_hw_calibrate(ah, ah->curchan,
371 371 sc->rx_chainmask, longcal);
372 if (ath9k_hw_calibrate(ah, ah->curchan, 372
373 sc->rx_chainmask, longcal, 373 if (longcal)
374 &iscaldone)) { 374 sc->ani.noise_floor = ath9k_hw_getchan_noise(ah,
375 if (longcal) 375 ah->curchan);
376 sc->ani.noise_floor = 376
377 ath9k_hw_getchan_noise(ah, 377 DPRINTF(sc, ATH_DBG_ANI," calibrate chan %u/%x nf: %d\n",
378 ah->curchan); 378 ah->curchan->channel, ah->curchan->channelFlags,
379 379 sc->ani.noise_floor);
380 DPRINTF(sc, ATH_DBG_ANI,
381 "calibrate chan %u/%x nf: %d\n",
382 ah->curchan->channel,
383 ah->curchan->channelFlags,
384 sc->ani.noise_floor);
385 } else {
386 DPRINTF(sc, ATH_DBG_ANY,
387 "calibrate chan %u/%x failed\n",
388 ah->curchan->channel,
389 ah->curchan->channelFlags);
390 }
391 sc->ani.caldone = iscaldone;
392 } 380 }
393 } 381 }
394 382