ath9k: Fix PeakDetect calibration for AR9462
authorSujith Manoharan <c_manoha@qca.qualcomm.com>
Wed, 11 Sep 2013 11:06:32 +0000 (16:36 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 26 Sep 2013 19:13:47 +0000 (15:13 -0400)
commit3001f0d00bcb77d818efa331864d69a9338550e6
treed42c98057007282ba0331a828ec7cc74780a53da
parent4b9b42bfe08fa369c4f51f00d5f349b32242cd8c
ath9k: Fix PeakDetect calibration for AR9462

Since HW PeakDetect calibration is turned on for AR9462,
various conditions have to be handled in the driver:

* Enable agc_cal when loading RTT fails.
* Disable SW PeakDetect calibration when RTT calibration is not enabled.
* Keep SW PeakDetect calibration result in driver.
* Update RTT table according to the saved value.
* Write RTT back after modifying SW RTT table.
* Enable local mode for PeakDetect calibration and restore values.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ar9003_calib.c
drivers/net/wireless/ath/ath9k/ar9003_rtt.c
drivers/net/wireless/ath/ath9k/hw.h