aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-03-06 05:06:38 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-06 15:16:18 -0500
commit5c17ddc4a047c59638c7eb8537aa887a1ddb9b0b (patch)
tree47633f4289f30043be66dcb2b868b81208fac627
parent62e2c102cc1d2600381410c089ca9a37359577d2 (diff)
ath5k: do not re-run AGC calibration periodically
All other Atheros drivers run the AGC gain calibration and DC offset calibration only after reset. Running them periodically has caused stability issues on some (primarily AR2315/2413/5413/5414 based) devices, leading to messages such as: ath5k phy0: gain calibration timeout (2462MHz) ath5k phy0: calibration of channel 11 failed Related bug reports: https://dev.openwrt.org/ticket/10574 https://bugzilla.redhat.com/show_bug.cgi?id=795141 Signed-off-by: Felix Fietkau <nbd@openwrt.org> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath5k/phy.c34
1 files changed, 9 insertions, 25 deletions
diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c
index e1f8613426a9..3a2845489a1b 100644
--- a/drivers/net/wireless/ath/ath5k/phy.c
+++ b/drivers/net/wireless/ath/ath5k/phy.c
@@ -1871,31 +1871,15 @@ ath5k_hw_phy_calibrate(struct ath5k_hw *ah,
1871 ret = 0; 1871 ret = 0;
1872 } 1872 }
1873 1873
1874 /* On full calibration do an AGC calibration and 1874 /* On full calibration request a PAPD probe for
1875 * request a PAPD probe for gainf calibration if 1875 * gainf calibration if needed */
1876 * needed */ 1876 if ((ah->ah_cal_mask & AR5K_CALIBRATION_FULL) &&
1877 if (ah->ah_cal_mask & AR5K_CALIBRATION_FULL) { 1877 (ah->ah_radio == AR5K_RF5111 ||
1878 1878 ah->ah_radio == AR5K_RF5112) &&
1879 AR5K_REG_ENABLE_BITS(ah, AR5K_PHY_AGCCTL, 1879 channel->hw_value != AR5K_MODE_11B)
1880 AR5K_PHY_AGCCTL_CAL); 1880 ath5k_hw_request_rfgain_probe(ah);
1881 1881
1882 ret = ath5k_hw_register_timeout(ah, AR5K_PHY_AGCCTL, 1882 /* Update noise floor */
1883 AR5K_PHY_AGCCTL_CAL | AR5K_PHY_AGCCTL_NF,
1884 0, false);
1885 if (ret) {
1886 ATH5K_ERR(ah,
1887 "gain calibration timeout (%uMHz)\n",
1888 channel->center_freq);
1889 }
1890
1891 if ((ah->ah_radio == AR5K_RF5111 ||
1892 ah->ah_radio == AR5K_RF5112)
1893 && (channel->hw_value != AR5K_MODE_11B))
1894 ath5k_hw_request_rfgain_probe(ah);
1895 }
1896
1897 /* Update noise floor
1898 * XXX: Only do this after AGC calibration */
1899 if (!(ah->ah_cal_mask & AR5K_CALIBRATION_NF)) 1883 if (!(ah->ah_cal_mask & AR5K_CALIBRATION_NF))
1900 ath5k_hw_update_noise_floor(ah); 1884 ath5k_hw_update_noise_floor(ah);
1901 1885