diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-10-04 14:09:46 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-10-06 16:30:39 -0400 |
commit | 71ea420992149294e74da3fa34ca8f111326bb6d (patch) | |
tree | 877a0bfd9e658c4e5d255e145982473464e1f14e /drivers/net/wireless/ath/ath9k/ani.c | |
parent | 435c1610f46dc4d86a6633adb037b18109e6ffdc (diff) |
ath9k_hw: add a helper function to check for the new ANI implementation
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ani.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ani.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c index a1894d240773..9856a1b0ca2d 100644 --- a/drivers/net/wireless/ath/ath9k/ani.c +++ b/drivers/net/wireless/ath/ath9k/ani.c | |||
@@ -109,6 +109,11 @@ static void ath9k_hw_ani_lower_immunity(struct ath_hw *ah) | |||
109 | ath9k_hw_private_ops(ah)->ani_lower_immunity(ah); | 109 | ath9k_hw_private_ops(ah)->ani_lower_immunity(ah); |
110 | } | 110 | } |
111 | 111 | ||
112 | static bool use_new_ani(struct ath_hw *ah) | ||
113 | { | ||
114 | return AR_SREV_9300_20_OR_LATER(ah) || modparam_force_new_ani; | ||
115 | } | ||
116 | |||
112 | int ath9k_hw_get_ani_channel_idx(struct ath_hw *ah, | 117 | int ath9k_hw_get_ani_channel_idx(struct ath_hw *ah, |
113 | struct ath9k_channel *chan) | 118 | struct ath9k_channel *chan) |
114 | { | 119 | { |
@@ -1178,7 +1183,7 @@ void ath9k_hw_ani_init(struct ath_hw *ah) | |||
1178 | 1183 | ||
1179 | memset(ah->ani, 0, sizeof(ah->ani)); | 1184 | memset(ah->ani, 0, sizeof(ah->ani)); |
1180 | for (i = 0; i < ARRAY_SIZE(ah->ani); i++) { | 1185 | for (i = 0; i < ARRAY_SIZE(ah->ani); i++) { |
1181 | if (AR_SREV_9300_20_OR_LATER(ah) || modparam_force_new_ani) { | 1186 | if (use_new_ani(ah)) { |
1182 | ah->ani[i].ofdmTrigHigh = ATH9K_ANI_OFDM_TRIG_HIGH_NEW; | 1187 | ah->ani[i].ofdmTrigHigh = ATH9K_ANI_OFDM_TRIG_HIGH_NEW; |
1183 | ah->ani[i].ofdmTrigLow = ATH9K_ANI_OFDM_TRIG_LOW_NEW; | 1188 | ah->ani[i].ofdmTrigLow = ATH9K_ANI_OFDM_TRIG_LOW_NEW; |
1184 | 1189 | ||
@@ -1230,7 +1235,7 @@ void ath9k_hw_ani_init(struct ath_hw *ah) | |||
1230 | * since we expect some ongoing maintenance on the tables, let's sanity | 1235 | * since we expect some ongoing maintenance on the tables, let's sanity |
1231 | * check here default level should not modify INI setting. | 1236 | * check here default level should not modify INI setting. |
1232 | */ | 1237 | */ |
1233 | if (AR_SREV_9300_20_OR_LATER(ah) || modparam_force_new_ani) { | 1238 | if (use_new_ani(ah)) { |
1234 | const struct ani_ofdm_level_entry *entry_ofdm; | 1239 | const struct ani_ofdm_level_entry *entry_ofdm; |
1235 | const struct ani_cck_level_entry *entry_cck; | 1240 | const struct ani_cck_level_entry *entry_cck; |
1236 | 1241 | ||