aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2008-12-02 08:07:54 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-12-05 09:35:50 -0500
commitaac9207e45b1ec1f36d67e57d94f59ac036d37ee (patch)
treee10993bc20d89b4388e7f332532aee403d2cebdc
parent7470d7f54064557b6210671c2692bba19af5b79d (diff)
ath9k: Choose correct ANI calibration period
ANI can't be turned on/off dynamically yet, but the calculation of the calibration period is wrong anyway. This patch fixes it. Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath9k/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index 3d7111e9b8d8..26c47577e183 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -421,8 +421,9 @@ static void ath_ani_calibrate(unsigned long data)
421 * The interval must be the shortest necessary to satisfy ANI, 421 * The interval must be the shortest necessary to satisfy ANI,
422 * short calibration and long calibration. 422 * short calibration and long calibration.
423 */ 423 */
424 424 cal_interval = ATH_LONG_CALINTERVAL;
425 cal_interval = ATH_ANI_POLLINTERVAL; 425 if (sc->sc_ah->ah_config.enable_ani)
426 cal_interval = min(cal_interval, (u32)ATH_ANI_POLLINTERVAL);
426 if (!sc->sc_ani.sc_caldone) 427 if (!sc->sc_ani.sc_caldone)
427 cal_interval = min(cal_interval, (u32)ATH_SHORT_CALINTERVAL); 428 cal_interval = min(cal_interval, (u32)ATH_SHORT_CALINTERVAL);
428 429