summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/ani.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-10-04 22:09:46 +0400
committerJohn W. Linville <linville@tuxdriver.com>2010-10-07 00:30:39 +0400
commit71ea420992149294e74da3fa34ca8f111326bb6d (patch)
tree877a0bfd9e658c4e5d255e145982473464e1f14e /drivers/net/wireless/ath/ath9k/ani.c
parent435c1610f46dc4d86a6633adb037b18109e6ffdc (diff)
downloadlinux-71ea420992149294e74da3fa34ca8f111326bb6d.tar.xz
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.c9
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)
ath9k_hw_private_ops(ah)->ani_lower_immunity(ah);
}
+static bool use_new_ani(struct ath_hw *ah)
+{
+ return AR_SREV_9300_20_OR_LATER(ah) || modparam_force_new_ani;
+}
+
int ath9k_hw_get_ani_channel_idx(struct ath_hw *ah,
struct ath9k_channel *chan)
{
@@ -1178,7 +1183,7 @@ void ath9k_hw_ani_init(struct ath_hw *ah)
memset(ah->ani, 0, sizeof(ah->ani));
for (i = 0; i < ARRAY_SIZE(ah->ani); i++) {
- if (AR_SREV_9300_20_OR_LATER(ah) || modparam_force_new_ani) {
+ if (use_new_ani(ah)) {
ah->ani[i].ofdmTrigHigh = ATH9K_ANI_OFDM_TRIG_HIGH_NEW;
ah->ani[i].ofdmTrigLow = ATH9K_ANI_OFDM_TRIG_LOW_NEW;
@@ -1230,7 +1235,7 @@ void ath9k_hw_ani_init(struct ath_hw *ah)
* since we expect some ongoing maintenance on the tables, let's sanity
* check here default level should not modify INI setting.
*/
- if (AR_SREV_9300_20_OR_LATER(ah) || modparam_force_new_ani) {
+ if (use_new_ani(ah)) {
const struct ani_ofdm_level_entry *entry_ofdm;
const struct ani_cck_level_entry *entry_cck;