浏览代码

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>
Sujith 16 年之前
父节点
当前提交
aac9207e45
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      drivers/net/wireless/ath9k/main.c

+ 3 - 2
drivers/net/wireless/ath9k/main.c

@@ -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);