aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath5k/ath5k.h2
-rw-r--r--drivers/net/wireless/ath/ath5k/phy.c20
2 files changed, 7 insertions, 15 deletions
diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h
index d84ccde11171..3f56d9ee21de 100644
--- a/drivers/net/wireless/ath/ath5k/ath5k.h
+++ b/drivers/net/wireless/ath/ath5k/ath5k.h
@@ -1100,7 +1100,7 @@ struct ath5k_hw {
1100 s32 ah_noise_floor; 1100 s32 ah_noise_floor;
1101 1101
1102 /* Calibration timestamp */ 1102 /* Calibration timestamp */
1103 unsigned long ah_cal_tstamp; 1103 unsigned long ah_cal_next_full;
1104 1104
1105 /* Calibration mask */ 1105 /* Calibration mask */
1106 u8 ah_cal_mask; 1106 u8 ah_cal_mask;
diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c
index 075873f98428..69053bfebbb9 100644
--- a/drivers/net/wireless/ath/ath5k/phy.c
+++ b/drivers/net/wireless/ath/ath5k/phy.c
@@ -1105,22 +1105,14 @@ int ath5k_hw_channel(struct ath5k_hw *ah, struct ieee80211_channel *channel)
1105void 1105void
1106ath5k_hw_calibration_poll(struct ath5k_hw *ah) 1106ath5k_hw_calibration_poll(struct ath5k_hw *ah)
1107{ 1107{
1108 /* Calibration interval in jiffies */ 1108 if (time_is_before_eq_jiffies(ah->ah_cal_next_full)) {
1109 unsigned long cal_intval; 1109 ah->ah_cal_next_full = jiffies +
1110 1110 msecs_to_jiffies(ATH5K_TUNE_CALIBRATION_INTERVAL_FULL);
1111 cal_intval = msecs_to_jiffies(ATH5K_TUNE_CALIBRATION_INTERVAL_FULL);
1112
1113 /* Initialize timestamp if needed */
1114 if (!ah->ah_cal_tstamp)
1115 ah->ah_cal_tstamp = jiffies;
1116
1117 /* For now we always do full calibration
1118 * Mark software interrupt mask and fire software
1119 * interrupt (bit gets auto-cleared) */
1120 if (time_is_before_eq_jiffies(ah->ah_cal_tstamp + cal_intval)) {
1121 ah->ah_cal_tstamp = jiffies;
1122 tasklet_schedule(&ah->ah_sc->calib); 1111 tasklet_schedule(&ah->ah_sc->calib);
1123 } 1112 }
1113 /* we could use SWI to generate enough interrupts to meet our
1114 * calibration interval requirements, if necessary:
1115 * AR5K_REG_ENABLE_BITS(ah, AR5K_CR, AR5K_CR_SWI); */
1124} 1116}
1125 1117
1126static int sign_extend(int val, const int nbits) 1118static int sign_extend(int val, const int nbits)