aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/ar5008_phy.c
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>2012-03-14 20:04:26 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-09 16:05:52 -0400
commit54da20d83f0e7fe87b75aec44bc2b1448d119320 (patch)
treeaee471dfdc06698c83ce38b563e4926a5838bb0c /drivers/net/wireless/ath/ath9k/ar5008_phy.c
parent7dd30d447b7f4a129586cce8e57d0163dde876b0 (diff)
ath9k_hw: improve ANI processing and rx desensitizing parameters
This patch improves ANI operations by switching among the immunity levels based on PHY errors and beacon rssi which will adjust receiver desensitizing parameters. The changes are * Configure the Weak Signal Detection based on current immunity value. * At highest OFDM immunity level poor performance was observed with strong interference. By tuning the FIR step and spur immunity levels and not changing any weak signal detection thresholds at any level helped to improve the performance. * ANI took long time to recover back to lower immunity levels on heavy data load. As the listen time got reset to zero before reaching to the 5x of aniperiod, the immunity level is not lowering back even without any interference. This patch fix that. Cc: Paul Stewart <pstew@google.com> Cc: Susinder Gulasekaran <susinder@qca.qualcomm.com> Signed-off-by: Suresh Chandrasekaran <csuresh@qca.qualcomm.com> Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ar5008_phy.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar5008_phy.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
index d7d8e9199140..52ff5caf2d0b 100644
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
@@ -1047,46 +1047,8 @@ static bool ar5008_hw_ani_control_old(struct ath_hw *ah,
1047 break; 1047 break;
1048 } 1048 }
1049 case ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION:{ 1049 case ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION:{
1050 static const int m1ThreshLow[] = { 127, 50 };
1051 static const int m2ThreshLow[] = { 127, 40 };
1052 static const int m1Thresh[] = { 127, 0x4d };
1053 static const int m2Thresh[] = { 127, 0x40 };
1054 static const int m2CountThr[] = { 31, 16 };
1055 static const int m2CountThrLow[] = { 63, 48 };
1056 u32 on = param ? 1 : 0; 1050 u32 on = param ? 1 : 0;
1057 1051
1058 REG_RMW_FIELD(ah, AR_PHY_SFCORR_LOW,
1059 AR_PHY_SFCORR_LOW_M1_THRESH_LOW,
1060 m1ThreshLow[on]);
1061 REG_RMW_FIELD(ah, AR_PHY_SFCORR_LOW,
1062 AR_PHY_SFCORR_LOW_M2_THRESH_LOW,
1063 m2ThreshLow[on]);
1064 REG_RMW_FIELD(ah, AR_PHY_SFCORR,
1065 AR_PHY_SFCORR_M1_THRESH,
1066 m1Thresh[on]);
1067 REG_RMW_FIELD(ah, AR_PHY_SFCORR,
1068 AR_PHY_SFCORR_M2_THRESH,
1069 m2Thresh[on]);
1070 REG_RMW_FIELD(ah, AR_PHY_SFCORR,
1071 AR_PHY_SFCORR_M2COUNT_THR,
1072 m2CountThr[on]);
1073 REG_RMW_FIELD(ah, AR_PHY_SFCORR_LOW,
1074 AR_PHY_SFCORR_LOW_M2COUNT_THR_LOW,
1075 m2CountThrLow[on]);
1076
1077 REG_RMW_FIELD(ah, AR_PHY_SFCORR_EXT,
1078 AR_PHY_SFCORR_EXT_M1_THRESH_LOW,
1079 m1ThreshLow[on]);
1080 REG_RMW_FIELD(ah, AR_PHY_SFCORR_EXT,
1081 AR_PHY_SFCORR_EXT_M2_THRESH_LOW,
1082 m2ThreshLow[on]);
1083 REG_RMW_FIELD(ah, AR_PHY_SFCORR_EXT,
1084 AR_PHY_SFCORR_EXT_M1_THRESH,
1085 m1Thresh[on]);
1086 REG_RMW_FIELD(ah, AR_PHY_SFCORR_EXT,
1087 AR_PHY_SFCORR_EXT_M2_THRESH,
1088 m2Thresh[on]);
1089
1090 if (on) 1052 if (on)
1091 REG_SET_BIT(ah, AR_PHY_SFCORR_LOW, 1053 REG_SET_BIT(ah, AR_PHY_SFCORR_LOW,
1092 AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW); 1054 AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW);