diff options
author | Nick Kossifidis <mickflemm@gmail.com> | 2010-11-23 14:26:13 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-30 13:53:23 -0500 |
commit | b2b4c69f682a2868411899a77842061dd745884f (patch) | |
tree | c6f859e394f04e3b1bc5b2f54f47825c0e674c05 | |
parent | 71ba1c30851575b43ba76b0f9c26ff5567e8136c (diff) |
ath5k: Tweak power detector delays on RF5111/RF5112
* Tweak power detector delays on AR5111/AR5112 when
using half/quarter modes.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath5k/phy.c | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c index 706fc461be6..6913a52cecc 100644 --- a/drivers/net/wireless/ath/ath5k/phy.c +++ b/drivers/net/wireless/ath/ath5k/phy.c | |||
@@ -851,7 +851,23 @@ static int ath5k_hw_rfregs_init(struct ath5k_hw *ah, | |||
851 | ath5k_hw_rfb_op(ah, rf_regs, ee->ee_xpd[ee_mode], | 851 | ath5k_hw_rfb_op(ah, rf_regs, ee->ee_xpd[ee_mode], |
852 | AR5K_RF_PLO_SEL, true); | 852 | AR5K_RF_PLO_SEL, true); |
853 | 853 | ||
854 | /* TODO: Half/quarter channel support */ | 854 | /* Tweak power detectors for half/quarter rate support */ |
855 | if (ah->ah_bwmode == AR5K_BWMODE_5MHZ || | ||
856 | ah->ah_bwmode == AR5K_BWMODE_10MHZ) { | ||
857 | u8 wait_i; | ||
858 | |||
859 | ath5k_hw_rfb_op(ah, rf_regs, 0x1f, | ||
860 | AR5K_RF_WAIT_S, true); | ||
861 | |||
862 | wait_i = (ah->ah_bwmode == AR5K_BWMODE_5MHZ) ? | ||
863 | 0x1f : 0x10; | ||
864 | |||
865 | ath5k_hw_rfb_op(ah, rf_regs, wait_i, | ||
866 | AR5K_RF_WAIT_I, true); | ||
867 | ath5k_hw_rfb_op(ah, rf_regs, 3, | ||
868 | AR5K_RF_MAX_TIME, true); | ||
869 | |||
870 | } | ||
855 | } | 871 | } |
856 | 872 | ||
857 | if (ah->ah_radio == AR5K_RF5112) { | 873 | if (ah->ah_radio == AR5K_RF5112) { |
@@ -949,8 +965,20 @@ static int ath5k_hw_rfregs_init(struct ath5k_hw *ah, | |||
949 | ath5k_hw_rfb_op(ah, rf_regs, ee->ee_i_gain[ee_mode], | 965 | ath5k_hw_rfb_op(ah, rf_regs, ee->ee_i_gain[ee_mode], |
950 | AR5K_RF_GAIN_I, true); | 966 | AR5K_RF_GAIN_I, true); |
951 | 967 | ||
952 | /* TODO: Half/quarter channel support */ | 968 | /* Tweak power detector for half/quarter rates */ |
969 | if (ah->ah_bwmode == AR5K_BWMODE_5MHZ || | ||
970 | ah->ah_bwmode == AR5K_BWMODE_10MHZ) { | ||
971 | u8 pd_delay; | ||
972 | |||
973 | pd_delay = (ah->ah_bwmode == AR5K_BWMODE_5MHZ) ? | ||
974 | 0xf : 0x8; | ||
953 | 975 | ||
976 | ath5k_hw_rfb_op(ah, rf_regs, pd_delay, | ||
977 | AR5K_RF_PD_PERIOD_A, true); | ||
978 | ath5k_hw_rfb_op(ah, rf_regs, 0xf, | ||
979 | AR5K_RF_PD_DELAY_A, true); | ||
980 | |||
981 | } | ||
954 | } | 982 | } |
955 | 983 | ||
956 | if (ah->ah_radio == AR5K_RF5413 && | 984 | if (ah->ah_radio == AR5K_RF5413 && |