Skip to content

Commit

Permalink
ath9k: Choose correct ANI calibration period
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sujith authored and John W. Linville committed Dec 5, 2008
1 parent 7470d7f commit aac9207
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/wireless/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,9 @@ static void ath_ani_calibrate(unsigned long data)
* The interval must be the shortest necessary to satisfy ANI,
* short calibration and long calibration.
*/

cal_interval = ATH_ANI_POLLINTERVAL;
cal_interval = ATH_LONG_CALINTERVAL;
if (sc->sc_ah->ah_config.enable_ani)
cal_interval = min(cal_interval, (u32)ATH_ANI_POLLINTERVAL);
if (!sc->sc_ani.sc_caldone)
cal_interval = min(cal_interval, (u32)ATH_SHORT_CALINTERVAL);

Expand Down

0 comments on commit aac9207

Please sign in to comment.