diff options
author | Rajkumar Manoharan <rmanohar@qca.qualcomm.com> | 2012-06-21 11:03:59 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-06-22 14:44:05 -0400 |
commit | 81b67fd60a75cac36092aa37cd0728aab3a7a938 (patch) | |
tree | 8f6a653153cc8d06230d88957550be94bf8a18c2 | |
parent | c49aa4aa2bc89e88672dc419a293d7b8c1f094d2 (diff) |
ath9k_hw: rename mrcCCKOff to fix smatch warning
Rename mrcCCKOff for better code readability and also fixes
the smatch warning.
drivers/net/wireless/ath/ath9k/ar9003_phy.c:982
ar9003_hw_ani_control() Error invalid range 1 to 0.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ani.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ani.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar5008_phy.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_phy.c | 10 |
4 files changed, 10 insertions, 16 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c index a90aa0b4c8f..7ebc3465f22 100644 --- a/drivers/net/wireless/ath/ath9k/ani.c +++ b/drivers/net/wireless/ath/ath9k/ani.c | |||
@@ -238,7 +238,7 @@ static void ath9k_hw_set_cck_nil(struct ath_hw *ah, u_int8_t immunityLevel) | |||
238 | if (!AR_SREV_9300_20_OR_LATER(ah) || AR_SREV_9485(ah)) | 238 | if (!AR_SREV_9300_20_OR_LATER(ah) || AR_SREV_9485(ah)) |
239 | return; | 239 | return; |
240 | 240 | ||
241 | if (aniState->mrcCCKOff == entry_cck->mrc_cck_on) | 241 | if (aniState->mrcCCK != entry_cck->mrc_cck_on) |
242 | ath9k_hw_ani_control(ah, | 242 | ath9k_hw_ani_control(ah, |
243 | ATH9K_ANI_MRC_CCK, | 243 | ATH9K_ANI_MRC_CCK, |
244 | entry_cck->mrc_cck_on); | 244 | entry_cck->mrc_cck_on); |
@@ -525,11 +525,7 @@ void ath9k_hw_ani_init(struct ath_hw *ah) | |||
525 | 525 | ||
526 | ani->firstepLevel = ATH9K_ANI_FIRSTEP_LVL; | 526 | ani->firstepLevel = ATH9K_ANI_FIRSTEP_LVL; |
527 | 527 | ||
528 | if (AR_SREV_9300_20_OR_LATER(ah)) | 528 | ani->mrcCCK = AR_SREV_9300_20_OR_LATER(ah) ? true : false; |
529 | ani->mrcCCKOff = | ||
530 | !ATH9K_ANI_ENABLE_MRC_CCK; | ||
531 | else | ||
532 | ani->mrcCCKOff = true; | ||
533 | 529 | ||
534 | ani->ofdmsTurn = true; | 530 | ani->ofdmsTurn = true; |
535 | 531 | ||
diff --git a/drivers/net/wireless/ath/ath9k/ani.h b/drivers/net/wireless/ath/ath9k/ani.h index 79c85fc6c32..e9d841bbe86 100644 --- a/drivers/net/wireless/ath/ath9k/ani.h +++ b/drivers/net/wireless/ath/ath9k/ani.h | |||
@@ -62,8 +62,6 @@ | |||
62 | #define ATH9K_SIG_SPUR_IMM_SETTING_MIN 0 | 62 | #define ATH9K_SIG_SPUR_IMM_SETTING_MIN 0 |
63 | #define ATH9K_SIG_SPUR_IMM_SETTING_MAX 22 | 63 | #define ATH9K_SIG_SPUR_IMM_SETTING_MAX 22 |
64 | 64 | ||
65 | #define ATH9K_ANI_ENABLE_MRC_CCK true | ||
66 | |||
67 | /* values here are relative to the INI */ | 65 | /* values here are relative to the INI */ |
68 | 66 | ||
69 | enum ath9k_ani_cmd { | 67 | enum ath9k_ani_cmd { |
@@ -111,7 +109,7 @@ struct ar5416AniState { | |||
111 | u8 ofdmNoiseImmunityLevel; | 109 | u8 ofdmNoiseImmunityLevel; |
112 | u8 cckNoiseImmunityLevel; | 110 | u8 cckNoiseImmunityLevel; |
113 | bool ofdmsTurn; | 111 | bool ofdmsTurn; |
114 | u8 mrcCCKOff; | 112 | u8 mrcCCK; |
115 | u8 spurImmunityLevel; | 113 | u8 spurImmunityLevel; |
116 | u8 firstepLevel; | 114 | u8 firstepLevel; |
117 | u8 ofdmWeakSigDetect; | 115 | u8 ofdmWeakSigDetect; |
diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c index b6efcd9b312..874186bfda4 100644 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c | |||
@@ -1234,7 +1234,7 @@ static bool ar5008_hw_ani_control_new(struct ath_hw *ah, | |||
1234 | aniState->spurImmunityLevel, | 1234 | aniState->spurImmunityLevel, |
1235 | aniState->ofdmWeakSigDetect ? "on" : "off", | 1235 | aniState->ofdmWeakSigDetect ? "on" : "off", |
1236 | aniState->firstepLevel, | 1236 | aniState->firstepLevel, |
1237 | !aniState->mrcCCKOff ? "on" : "off", | 1237 | aniState->mrcCCK ? "on" : "off", |
1238 | aniState->listenTime, | 1238 | aniState->listenTime, |
1239 | aniState->ofdmPhyErrCount, | 1239 | aniState->ofdmPhyErrCount, |
1240 | aniState->cckPhyErrCount); | 1240 | aniState->cckPhyErrCount); |
@@ -1322,7 +1322,7 @@ static void ar5008_hw_ani_cache_ini_regs(struct ath_hw *ah) | |||
1322 | aniState->spurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL; | 1322 | aniState->spurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL; |
1323 | aniState->firstepLevel = ATH9K_ANI_FIRSTEP_LVL; | 1323 | aniState->firstepLevel = ATH9K_ANI_FIRSTEP_LVL; |
1324 | aniState->ofdmWeakSigDetect = ATH9K_ANI_USE_OFDM_WEAK_SIG; | 1324 | aniState->ofdmWeakSigDetect = ATH9K_ANI_USE_OFDM_WEAK_SIG; |
1325 | aniState->mrcCCKOff = true; /* not available on pre AR9003 */ | 1325 | aniState->mrcCCK = false; /* not available on pre AR9003 */ |
1326 | } | 1326 | } |
1327 | 1327 | ||
1328 | static void ar5008_hw_set_nf_limits(struct ath_hw *ah) | 1328 | static void ar5008_hw_set_nf_limits(struct ath_hw *ah) |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c index ec8a8d5c6db..f1975b9e539 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c | |||
@@ -979,16 +979,16 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah, | |||
979 | AR_PHY_MRC_CCK_ENABLE, is_on); | 979 | AR_PHY_MRC_CCK_ENABLE, is_on); |
980 | REG_RMW_FIELD(ah, AR_PHY_MRC_CCK_CTRL, | 980 | REG_RMW_FIELD(ah, AR_PHY_MRC_CCK_CTRL, |
981 | AR_PHY_MRC_CCK_MUX_REG, is_on); | 981 | AR_PHY_MRC_CCK_MUX_REG, is_on); |
982 | if (!is_on != aniState->mrcCCKOff) { | 982 | if (is_on != aniState->mrcCCK) { |
983 | ath_dbg(common, ANI, "** ch %d: MRC CCK: %s=>%s\n", | 983 | ath_dbg(common, ANI, "** ch %d: MRC CCK: %s=>%s\n", |
984 | chan->channel, | 984 | chan->channel, |
985 | !aniState->mrcCCKOff ? "on" : "off", | 985 | aniState->mrcCCK ? "on" : "off", |
986 | is_on ? "on" : "off"); | 986 | is_on ? "on" : "off"); |
987 | if (is_on) | 987 | if (is_on) |
988 | ah->stats.ast_ani_ccklow++; | 988 | ah->stats.ast_ani_ccklow++; |
989 | else | 989 | else |
990 | ah->stats.ast_ani_cckhigh++; | 990 | ah->stats.ast_ani_cckhigh++; |
991 | aniState->mrcCCKOff = !is_on; | 991 | aniState->mrcCCK = is_on; |
992 | } | 992 | } |
993 | break; | 993 | break; |
994 | } | 994 | } |
@@ -1004,7 +1004,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah, | |||
1004 | aniState->spurImmunityLevel, | 1004 | aniState->spurImmunityLevel, |
1005 | aniState->ofdmWeakSigDetect ? "on" : "off", | 1005 | aniState->ofdmWeakSigDetect ? "on" : "off", |
1006 | aniState->firstepLevel, | 1006 | aniState->firstepLevel, |
1007 | !aniState->mrcCCKOff ? "on" : "off", | 1007 | aniState->mrcCCK ? "on" : "off", |
1008 | aniState->listenTime, | 1008 | aniState->listenTime, |
1009 | aniState->ofdmPhyErrCount, | 1009 | aniState->ofdmPhyErrCount, |
1010 | aniState->cckPhyErrCount); | 1010 | aniState->cckPhyErrCount); |
@@ -1114,7 +1114,7 @@ static void ar9003_hw_ani_cache_ini_regs(struct ath_hw *ah) | |||
1114 | aniState->spurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL; | 1114 | aniState->spurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL; |
1115 | aniState->firstepLevel = ATH9K_ANI_FIRSTEP_LVL; | 1115 | aniState->firstepLevel = ATH9K_ANI_FIRSTEP_LVL; |
1116 | aniState->ofdmWeakSigDetect = ATH9K_ANI_USE_OFDM_WEAK_SIG; | 1116 | aniState->ofdmWeakSigDetect = ATH9K_ANI_USE_OFDM_WEAK_SIG; |
1117 | aniState->mrcCCKOff = !ATH9K_ANI_ENABLE_MRC_CCK; | 1117 | aniState->mrcCCK = true; |
1118 | } | 1118 | } |
1119 | 1119 | ||
1120 | static void ar9003_hw_set_radar_params(struct ath_hw *ah, | 1120 | static void ar9003_hw_set_radar_params(struct ath_hw *ah, |