Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aac9207e authored by Sujith's avatar Sujith Committed by John W. Linville
Browse files

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: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarSujith <Sujith.Manoharan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 7470d7f5
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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);