Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 1 | /* |
Sujith Manoharan | 5b68138 | 2011-05-17 13:36:18 +0530 | [diff] [blame] | 2 | * Copyright (c) 2008-2011 Atheros Communications Inc. |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 3 | * |
| 4 | * Permission to use, copy, modify, and/or distribute this software for any |
| 5 | * purpose with or without fee is hereby granted, provided that the above |
| 6 | * copyright notice and this permission notice appear in all copies. |
| 7 | * |
| 8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| 11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 15 | */ |
| 16 | |
Nikitas Angelinas | bbce80e | 2010-09-08 22:25:42 +0100 | [diff] [blame] | 17 | #include <linux/kernel.h> |
Paul Gortmaker | ee40fa0 | 2011-05-27 16:14:23 -0400 | [diff] [blame] | 18 | #include <linux/export.h> |
Luis R. Rodriguez | cfe8cba | 2009-09-13 23:39:31 -0700 | [diff] [blame] | 19 | #include "hw.h" |
Felix Fietkau | c16fcb4 | 2010-04-15 17:38:39 -0400 | [diff] [blame] | 20 | #include "hw-ops.h" |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 21 | |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 22 | struct ani_ofdm_level_entry { |
| 23 | int spur_immunity_level; |
| 24 | int fir_step_level; |
| 25 | int ofdm_weak_signal_on; |
| 26 | }; |
| 27 | |
| 28 | /* values here are relative to the INI */ |
| 29 | |
| 30 | /* |
| 31 | * Legend: |
| 32 | * |
| 33 | * SI: Spur immunity |
| 34 | * FS: FIR Step |
| 35 | * WS: OFDM / CCK Weak Signal detection |
| 36 | * MRC-CCK: Maximal Ratio Combining for CCK |
| 37 | */ |
| 38 | |
| 39 | static const struct ani_ofdm_level_entry ofdm_level_table[] = { |
| 40 | /* SI FS WS */ |
| 41 | { 0, 0, 1 }, /* lvl 0 */ |
| 42 | { 1, 1, 1 }, /* lvl 1 */ |
| 43 | { 2, 2, 1 }, /* lvl 2 */ |
| 44 | { 3, 2, 1 }, /* lvl 3 (default) */ |
| 45 | { 4, 3, 1 }, /* lvl 4 */ |
| 46 | { 5, 4, 1 }, /* lvl 5 */ |
| 47 | { 6, 5, 1 }, /* lvl 6 */ |
| 48 | { 7, 6, 1 }, /* lvl 7 */ |
Sujith Manoharan | b99553f | 2013-06-04 15:41:32 +0530 | [diff] [blame] | 49 | { 7, 7, 1 }, /* lvl 8 */ |
| 50 | { 7, 8, 0 } /* lvl 9 */ |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 51 | }; |
| 52 | #define ATH9K_ANI_OFDM_NUM_LEVEL \ |
Nikitas Angelinas | bbce80e | 2010-09-08 22:25:42 +0100 | [diff] [blame] | 53 | ARRAY_SIZE(ofdm_level_table) |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 54 | #define ATH9K_ANI_OFDM_MAX_LEVEL \ |
| 55 | (ATH9K_ANI_OFDM_NUM_LEVEL-1) |
| 56 | #define ATH9K_ANI_OFDM_DEF_LEVEL \ |
| 57 | 3 /* default level - matches the INI settings */ |
| 58 | |
| 59 | /* |
| 60 | * MRC (Maximal Ratio Combining) has always been used with multi-antenna ofdm. |
| 61 | * With OFDM for single stream you just add up all antenna inputs, you're |
| 62 | * only interested in what you get after FFT. Signal aligment is also not |
| 63 | * required for OFDM because any phase difference adds up in the frequency |
| 64 | * domain. |
| 65 | * |
| 66 | * MRC requires extra work for use with CCK. You need to align the antenna |
| 67 | * signals from the different antenna before you can add the signals together. |
| 68 | * You need aligment of signals as CCK is in time domain, so addition can cancel |
| 69 | * your signal completely if phase is 180 degrees (think of adding sine waves). |
| 70 | * You also need to remove noise before the addition and this is where ANI |
| 71 | * MRC CCK comes into play. One of the antenna inputs may be stronger but |
| 72 | * lower SNR, so just adding after alignment can be dangerous. |
| 73 | * |
| 74 | * Regardless of alignment in time, the antenna signals add constructively after |
| 75 | * FFT and improve your reception. For more information: |
| 76 | * |
| 77 | * http://en.wikipedia.org/wiki/Maximal-ratio_combining |
| 78 | */ |
| 79 | |
| 80 | struct ani_cck_level_entry { |
| 81 | int fir_step_level; |
| 82 | int mrc_cck_on; |
| 83 | }; |
| 84 | |
| 85 | static const struct ani_cck_level_entry cck_level_table[] = { |
| 86 | /* FS MRC-CCK */ |
| 87 | { 0, 1 }, /* lvl 0 */ |
| 88 | { 1, 1 }, /* lvl 1 */ |
| 89 | { 2, 1 }, /* lvl 2 (default) */ |
| 90 | { 3, 1 }, /* lvl 3 */ |
| 91 | { 4, 0 }, /* lvl 4 */ |
| 92 | { 5, 0 }, /* lvl 5 */ |
| 93 | { 6, 0 }, /* lvl 6 */ |
Sujith Manoharan | b99553f | 2013-06-04 15:41:32 +0530 | [diff] [blame] | 94 | { 7, 0 }, /* lvl 7 (only for high rssi) */ |
| 95 | { 8, 0 } /* lvl 8 (only for high rssi) */ |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 96 | }; |
| 97 | |
| 98 | #define ATH9K_ANI_CCK_NUM_LEVEL \ |
Nikitas Angelinas | bbce80e | 2010-09-08 22:25:42 +0100 | [diff] [blame] | 99 | ARRAY_SIZE(cck_level_table) |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 100 | #define ATH9K_ANI_CCK_MAX_LEVEL \ |
| 101 | (ATH9K_ANI_CCK_NUM_LEVEL-1) |
| 102 | #define ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI \ |
| 103 | (ATH9K_ANI_CCK_NUM_LEVEL-3) |
| 104 | #define ATH9K_ANI_CCK_DEF_LEVEL \ |
| 105 | 2 /* default level - matches the INI settings */ |
| 106 | |
Sujith | cbe61d8 | 2009-02-09 13:27:12 +0530 | [diff] [blame] | 107 | static void ath9k_hw_update_mibstats(struct ath_hw *ah, |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 108 | struct ath9k_mib_stats *stats) |
| 109 | { |
| 110 | stats->ackrcv_bad += REG_READ(ah, AR_ACK_FAIL); |
| 111 | stats->rts_bad += REG_READ(ah, AR_RTS_FAIL); |
| 112 | stats->fcs_bad += REG_READ(ah, AR_FCS_FAIL); |
| 113 | stats->rts_good += REG_READ(ah, AR_RTS_OK); |
| 114 | stats->beacons += REG_READ(ah, AR_BEACON_CNT); |
| 115 | } |
| 116 | |
Felix Fietkau | 093115b | 2010-10-04 20:09:47 +0200 | [diff] [blame] | 117 | static void ath9k_ani_restart(struct ath_hw *ah) |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 118 | { |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 119 | struct ar5416AniState *aniState; |
| 120 | |
Sujith Manoharan | e323300 | 2013-06-03 09:19:26 +0530 | [diff] [blame] | 121 | if (!ah->curchan) |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 122 | return; |
| 123 | |
Sujith Manoharan | c24bd36 | 2013-06-03 09:19:29 +0530 | [diff] [blame] | 124 | aniState = &ah->ani; |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 125 | aniState->listenTime = 0; |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 126 | |
Sujith | 7d0d0df | 2010-04-16 11:53:57 +0530 | [diff] [blame] | 127 | ENABLE_REGWRITE_BUFFER(ah); |
| 128 | |
Felix Fietkau | 465dce6 | 2012-06-15 15:25:24 +0200 | [diff] [blame] | 129 | REG_WRITE(ah, AR_PHY_ERR_1, 0); |
| 130 | REG_WRITE(ah, AR_PHY_ERR_2, 0); |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 131 | REG_WRITE(ah, AR_PHY_ERR_MASK_1, AR_PHY_ERR_OFDM_TIMING); |
| 132 | REG_WRITE(ah, AR_PHY_ERR_MASK_2, AR_PHY_ERR_CCK_TIMING); |
| 133 | |
| 134 | REGWRITE_BUFFER_FLUSH(ah); |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 135 | |
| 136 | ath9k_hw_update_mibstats(ah, &ah->ah_mibStats); |
| 137 | |
| 138 | aniState->ofdmPhyErrCount = 0; |
| 139 | aniState->cckPhyErrCount = 0; |
| 140 | } |
| 141 | |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 142 | /* Adjust the OFDM Noise Immunity Level */ |
Felix Fietkau | 73dc3eb | 2012-06-27 14:58:19 +0200 | [diff] [blame] | 143 | static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel, |
| 144 | bool scan) |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 145 | { |
Sujith Manoharan | c24bd36 | 2013-06-03 09:19:29 +0530 | [diff] [blame] | 146 | struct ar5416AniState *aniState = &ah->ani; |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 147 | struct ath_common *common = ath9k_hw_common(ah); |
| 148 | const struct ani_ofdm_level_entry *entry_ofdm; |
| 149 | const struct ani_cck_level_entry *entry_cck; |
Felix Fietkau | 0b81cc3 | 2012-06-15 15:25:20 +0200 | [diff] [blame] | 150 | bool weak_sig; |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 151 | |
Joe Perches | d2182b6 | 2011-12-15 14:55:53 -0800 | [diff] [blame] | 152 | ath_dbg(common, ANI, "**** ofdmlevel %d=>%d, rssi=%d[lo=%d hi=%d]\n", |
Joe Perches | 226afe6 | 2010-12-02 19:12:37 -0800 | [diff] [blame] | 153 | aniState->ofdmNoiseImmunityLevel, |
Felix Fietkau | 35e808b | 2012-06-15 15:25:19 +0200 | [diff] [blame] | 154 | immunityLevel, BEACON_RSSI(ah), |
Felix Fietkau | 9dbac67 | 2013-01-20 18:51:58 +0100 | [diff] [blame] | 155 | ATH9K_ANI_RSSI_THR_LOW, |
| 156 | ATH9K_ANI_RSSI_THR_HIGH); |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 157 | |
Felix Fietkau | 73dc3eb | 2012-06-27 14:58:19 +0200 | [diff] [blame] | 158 | if (!scan) |
Felix Fietkau | 1e8f0a3 | 2012-06-15 15:25:26 +0200 | [diff] [blame] | 159 | aniState->ofdmNoiseImmunityLevel = immunityLevel; |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 160 | |
| 161 | entry_ofdm = &ofdm_level_table[aniState->ofdmNoiseImmunityLevel]; |
| 162 | entry_cck = &cck_level_table[aniState->cckNoiseImmunityLevel]; |
| 163 | |
| 164 | if (aniState->spurImmunityLevel != entry_ofdm->spur_immunity_level) |
| 165 | ath9k_hw_ani_control(ah, |
| 166 | ATH9K_ANI_SPUR_IMMUNITY_LEVEL, |
| 167 | entry_ofdm->spur_immunity_level); |
| 168 | |
| 169 | if (aniState->firstepLevel != entry_ofdm->fir_step_level && |
| 170 | entry_ofdm->fir_step_level >= entry_cck->fir_step_level) |
| 171 | ath9k_hw_ani_control(ah, |
| 172 | ATH9K_ANI_FIRSTEP_LEVEL, |
| 173 | entry_ofdm->fir_step_level); |
| 174 | |
Felix Fietkau | 0b81cc3 | 2012-06-15 15:25:20 +0200 | [diff] [blame] | 175 | weak_sig = entry_ofdm->ofdm_weak_signal_on; |
| 176 | if (ah->opmode == NL80211_IFTYPE_STATION && |
Felix Fietkau | 9dbac67 | 2013-01-20 18:51:58 +0100 | [diff] [blame] | 177 | BEACON_RSSI(ah) <= ATH9K_ANI_RSSI_THR_HIGH) |
Felix Fietkau | 0b81cc3 | 2012-06-15 15:25:20 +0200 | [diff] [blame] | 178 | weak_sig = true; |
| 179 | |
Sujith Manoharan | 80b4205 | 2013-06-04 15:41:30 +0530 | [diff] [blame] | 180 | /* |
| 181 | * OFDM Weak signal detection is always enabled for AP mode. |
| 182 | */ |
| 183 | if (ah->opmode != NL80211_IFTYPE_AP && |
| 184 | aniState->ofdmWeakSigDetect != weak_sig) { |
| 185 | ath9k_hw_ani_control(ah, |
| 186 | ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION, |
| 187 | entry_ofdm->ofdm_weak_signal_on); |
| 188 | } |
Sujith Manoharan | 55fee98 | 2013-06-17 14:24:36 +0530 | [diff] [blame] | 189 | |
| 190 | if (aniState->ofdmNoiseImmunityLevel >= ATH9K_ANI_OFDM_DEF_LEVEL) { |
| 191 | ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH; |
| 192 | ah->config.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW_ABOVE_INI; |
| 193 | } else { |
| 194 | ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH_BELOW_INI; |
| 195 | ah->config.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW; |
| 196 | } |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 197 | } |
| 198 | |
Felix Fietkau | 8eb4980 | 2010-10-04 20:09:49 +0200 | [diff] [blame] | 199 | static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah) |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 200 | { |
| 201 | struct ar5416AniState *aniState; |
| 202 | |
Sujith Manoharan | e323300 | 2013-06-03 09:19:26 +0530 | [diff] [blame] | 203 | if (!ah->curchan) |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 204 | return; |
| 205 | |
Sujith Manoharan | c24bd36 | 2013-06-03 09:19:29 +0530 | [diff] [blame] | 206 | aniState = &ah->ani; |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 207 | |
| 208 | if (aniState->ofdmNoiseImmunityLevel < ATH9K_ANI_OFDM_MAX_LEVEL) |
Felix Fietkau | 73dc3eb | 2012-06-27 14:58:19 +0200 | [diff] [blame] | 209 | ath9k_hw_set_ofdm_nil(ah, aniState->ofdmNoiseImmunityLevel + 1, false); |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 210 | } |
| 211 | |
| 212 | /* |
| 213 | * Set the ANI settings to match an CCK level. |
| 214 | */ |
Felix Fietkau | 73dc3eb | 2012-06-27 14:58:19 +0200 | [diff] [blame] | 215 | static void ath9k_hw_set_cck_nil(struct ath_hw *ah, u_int8_t immunityLevel, |
| 216 | bool scan) |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 217 | { |
Sujith Manoharan | c24bd36 | 2013-06-03 09:19:29 +0530 | [diff] [blame] | 218 | struct ar5416AniState *aniState = &ah->ani; |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 219 | struct ath_common *common = ath9k_hw_common(ah); |
| 220 | const struct ani_ofdm_level_entry *entry_ofdm; |
| 221 | const struct ani_cck_level_entry *entry_cck; |
| 222 | |
Joe Perches | d2182b6 | 2011-12-15 14:55:53 -0800 | [diff] [blame] | 223 | ath_dbg(common, ANI, "**** ccklevel %d=>%d, rssi=%d[lo=%d hi=%d]\n", |
Joe Perches | 226afe6 | 2010-12-02 19:12:37 -0800 | [diff] [blame] | 224 | aniState->cckNoiseImmunityLevel, immunityLevel, |
Felix Fietkau | 9dbac67 | 2013-01-20 18:51:58 +0100 | [diff] [blame] | 225 | BEACON_RSSI(ah), ATH9K_ANI_RSSI_THR_LOW, |
| 226 | ATH9K_ANI_RSSI_THR_HIGH); |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 227 | |
Felix Fietkau | 5330df7 | 2012-06-15 15:25:22 +0200 | [diff] [blame] | 228 | if (ah->opmode == NL80211_IFTYPE_STATION && |
Felix Fietkau | 9dbac67 | 2013-01-20 18:51:58 +0100 | [diff] [blame] | 229 | BEACON_RSSI(ah) <= ATH9K_ANI_RSSI_THR_LOW && |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 230 | immunityLevel > ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI) |
| 231 | immunityLevel = ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI; |
| 232 | |
Felix Fietkau | 73dc3eb | 2012-06-27 14:58:19 +0200 | [diff] [blame] | 233 | if (!scan) |
Felix Fietkau | 1e8f0a3 | 2012-06-15 15:25:26 +0200 | [diff] [blame] | 234 | aniState->cckNoiseImmunityLevel = immunityLevel; |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 235 | |
| 236 | entry_ofdm = &ofdm_level_table[aniState->ofdmNoiseImmunityLevel]; |
| 237 | entry_cck = &cck_level_table[aniState->cckNoiseImmunityLevel]; |
| 238 | |
| 239 | if (aniState->firstepLevel != entry_cck->fir_step_level && |
| 240 | entry_cck->fir_step_level >= entry_ofdm->fir_step_level) |
| 241 | ath9k_hw_ani_control(ah, |
| 242 | ATH9K_ANI_FIRSTEP_LEVEL, |
| 243 | entry_cck->fir_step_level); |
| 244 | |
| 245 | /* Skip MRC CCK for pre AR9003 families */ |
Sujith Manoharan | a4a2954 | 2012-09-10 09:20:03 +0530 | [diff] [blame] | 246 | if (!AR_SREV_9300_20_OR_LATER(ah) || AR_SREV_9485(ah) || AR_SREV_9565(ah)) |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 247 | return; |
| 248 | |
Rajkumar Manoharan | 81b67fd6 | 2012-06-21 20:33:59 +0530 | [diff] [blame] | 249 | if (aniState->mrcCCK != entry_cck->mrc_cck_on) |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 250 | ath9k_hw_ani_control(ah, |
| 251 | ATH9K_ANI_MRC_CCK, |
| 252 | entry_cck->mrc_cck_on); |
| 253 | } |
| 254 | |
Felix Fietkau | 8eb4980 | 2010-10-04 20:09:49 +0200 | [diff] [blame] | 255 | static void ath9k_hw_ani_cck_err_trigger(struct ath_hw *ah) |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 256 | { |
| 257 | struct ar5416AniState *aniState; |
| 258 | |
Sujith Manoharan | e323300 | 2013-06-03 09:19:26 +0530 | [diff] [blame] | 259 | if (!ah->curchan) |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 260 | return; |
| 261 | |
Sujith Manoharan | c24bd36 | 2013-06-03 09:19:29 +0530 | [diff] [blame] | 262 | aniState = &ah->ani; |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 263 | |
| 264 | if (aniState->cckNoiseImmunityLevel < ATH9K_ANI_CCK_MAX_LEVEL) |
Felix Fietkau | 73dc3eb | 2012-06-27 14:58:19 +0200 | [diff] [blame] | 265 | ath9k_hw_set_cck_nil(ah, aniState->cckNoiseImmunityLevel + 1, |
| 266 | false); |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 267 | } |
| 268 | |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 269 | /* |
| 270 | * only lower either OFDM or CCK errors per turn |
| 271 | * we lower the other one next time |
| 272 | */ |
Felix Fietkau | 8eb4980 | 2010-10-04 20:09:49 +0200 | [diff] [blame] | 273 | static void ath9k_hw_ani_lower_immunity(struct ath_hw *ah) |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 274 | { |
| 275 | struct ar5416AniState *aniState; |
| 276 | |
Sujith Manoharan | c24bd36 | 2013-06-03 09:19:29 +0530 | [diff] [blame] | 277 | aniState = &ah->ani; |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 278 | |
| 279 | /* lower OFDM noise immunity */ |
| 280 | if (aniState->ofdmNoiseImmunityLevel > 0 && |
| 281 | (aniState->ofdmsTurn || aniState->cckNoiseImmunityLevel == 0)) { |
Felix Fietkau | 73dc3eb | 2012-06-27 14:58:19 +0200 | [diff] [blame] | 282 | ath9k_hw_set_ofdm_nil(ah, aniState->ofdmNoiseImmunityLevel - 1, |
| 283 | false); |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 284 | return; |
| 285 | } |
| 286 | |
| 287 | /* lower CCK noise immunity */ |
| 288 | if (aniState->cckNoiseImmunityLevel > 0) |
Felix Fietkau | 73dc3eb | 2012-06-27 14:58:19 +0200 | [diff] [blame] | 289 | ath9k_hw_set_cck_nil(ah, aniState->cckNoiseImmunityLevel - 1, |
| 290 | false); |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 291 | } |
| 292 | |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 293 | /* |
| 294 | * Restore the ANI parameters in the HAL and reset the statistics. |
| 295 | * This routine should be called for every hardware reset and for |
| 296 | * every channel change. |
| 297 | */ |
Felix Fietkau | 8eb4980 | 2010-10-04 20:09:49 +0200 | [diff] [blame] | 298 | void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning) |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 299 | { |
Sujith Manoharan | c24bd36 | 2013-06-03 09:19:29 +0530 | [diff] [blame] | 300 | struct ar5416AniState *aniState = &ah->ani; |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 301 | struct ath9k_channel *chan = ah->curchan; |
| 302 | struct ath_common *common = ath9k_hw_common(ah); |
Felix Fietkau | 1e8f0a3 | 2012-06-15 15:25:26 +0200 | [diff] [blame] | 303 | int ofdm_nil, cck_nil; |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 304 | |
Sujith Manoharan | e323300 | 2013-06-03 09:19:26 +0530 | [diff] [blame] | 305 | if (!ah->curchan) |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 306 | return; |
| 307 | |
| 308 | BUG_ON(aniState == NULL); |
| 309 | ah->stats.ast_ani_reset++; |
| 310 | |
| 311 | /* only allow a subset of functions in AP mode */ |
| 312 | if (ah->opmode == NL80211_IFTYPE_AP) { |
| 313 | if (IS_CHAN_2GHZ(chan)) { |
| 314 | ah->ani_function = (ATH9K_ANI_SPUR_IMMUNITY_LEVEL | |
| 315 | ATH9K_ANI_FIRSTEP_LEVEL); |
| 316 | if (AR_SREV_9300_20_OR_LATER(ah)) |
| 317 | ah->ani_function |= ATH9K_ANI_MRC_CCK; |
| 318 | } else |
| 319 | ah->ani_function = 0; |
| 320 | } |
| 321 | |
Felix Fietkau | 1e8f0a3 | 2012-06-15 15:25:26 +0200 | [diff] [blame] | 322 | ofdm_nil = max_t(int, ATH9K_ANI_OFDM_DEF_LEVEL, |
| 323 | aniState->ofdmNoiseImmunityLevel); |
| 324 | cck_nil = max_t(int, ATH9K_ANI_CCK_DEF_LEVEL, |
| 325 | aniState->cckNoiseImmunityLevel); |
| 326 | |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 327 | if (is_scanning || |
| 328 | (ah->opmode != NL80211_IFTYPE_STATION && |
| 329 | ah->opmode != NL80211_IFTYPE_ADHOC)) { |
| 330 | /* |
| 331 | * If we're scanning or in AP mode, the defaults (ini) |
| 332 | * should be in place. For an AP we assume the historical |
| 333 | * levels for this channel are probably outdated so start |
| 334 | * from defaults instead. |
| 335 | */ |
| 336 | if (aniState->ofdmNoiseImmunityLevel != |
| 337 | ATH9K_ANI_OFDM_DEF_LEVEL || |
| 338 | aniState->cckNoiseImmunityLevel != |
| 339 | ATH9K_ANI_CCK_DEF_LEVEL) { |
Joe Perches | d2182b6 | 2011-12-15 14:55:53 -0800 | [diff] [blame] | 340 | ath_dbg(common, ANI, |
Joe Perches | 226afe6 | 2010-12-02 19:12:37 -0800 | [diff] [blame] | 341 | "Restore defaults: opmode %u chan %d Mhz/0x%x is_scanning=%d ofdm:%d cck:%d\n", |
| 342 | ah->opmode, |
| 343 | chan->channel, |
| 344 | chan->channelFlags, |
| 345 | is_scanning, |
| 346 | aniState->ofdmNoiseImmunityLevel, |
| 347 | aniState->cckNoiseImmunityLevel); |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 348 | |
Felix Fietkau | 1e8f0a3 | 2012-06-15 15:25:26 +0200 | [diff] [blame] | 349 | ofdm_nil = ATH9K_ANI_OFDM_DEF_LEVEL; |
| 350 | cck_nil = ATH9K_ANI_CCK_DEF_LEVEL; |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 351 | } |
| 352 | } else { |
| 353 | /* |
| 354 | * restore historical levels for this channel |
| 355 | */ |
Joe Perches | d2182b6 | 2011-12-15 14:55:53 -0800 | [diff] [blame] | 356 | ath_dbg(common, ANI, |
Joe Perches | 226afe6 | 2010-12-02 19:12:37 -0800 | [diff] [blame] | 357 | "Restore history: opmode %u chan %d Mhz/0x%x is_scanning=%d ofdm:%d cck:%d\n", |
| 358 | ah->opmode, |
| 359 | chan->channel, |
| 360 | chan->channelFlags, |
| 361 | is_scanning, |
| 362 | aniState->ofdmNoiseImmunityLevel, |
| 363 | aniState->cckNoiseImmunityLevel); |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 364 | } |
Felix Fietkau | 73dc3eb | 2012-06-27 14:58:19 +0200 | [diff] [blame] | 365 | ath9k_hw_set_ofdm_nil(ah, ofdm_nil, is_scanning); |
| 366 | ath9k_hw_set_cck_nil(ah, cck_nil, is_scanning); |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 367 | |
Felix Fietkau | 093115b | 2010-10-04 20:09:47 +0200 | [diff] [blame] | 368 | ath9k_ani_restart(ah); |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 369 | } |
| 370 | |
Felix Fietkau | e49f913 | 2010-10-12 16:08:01 +0200 | [diff] [blame] | 371 | static bool ath9k_hw_ani_read_counters(struct ath_hw *ah) |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 372 | { |
Luis R. Rodriguez | c46917b | 2009-09-13 02:42:02 -0700 | [diff] [blame] | 373 | struct ath_common *common = ath9k_hw_common(ah); |
Sujith Manoharan | c24bd36 | 2013-06-03 09:19:29 +0530 | [diff] [blame] | 374 | struct ar5416AniState *aniState = &ah->ani; |
Felix Fietkau | bfc472b | 2010-10-04 20:09:48 +0200 | [diff] [blame] | 375 | u32 phyCnt1, phyCnt2; |
| 376 | int32_t listenTime; |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 377 | |
Felix Fietkau | b5bfc56 | 2010-10-08 22:13:53 +0200 | [diff] [blame] | 378 | ath_hw_cycle_counters_update(common); |
| 379 | listenTime = ath_hw_get_listen_time(common); |
| 380 | |
Felix Fietkau | e49f913 | 2010-10-12 16:08:01 +0200 | [diff] [blame] | 381 | if (listenTime <= 0) { |
Mohammed Shafi Shajakhan | 107021c | 2011-08-26 11:19:57 +0530 | [diff] [blame] | 382 | ah->stats.ast_ani_lneg_or_lzero++; |
Felix Fietkau | 093115b | 2010-10-04 20:09:47 +0200 | [diff] [blame] | 383 | ath9k_ani_restart(ah); |
Felix Fietkau | e49f913 | 2010-10-12 16:08:01 +0200 | [diff] [blame] | 384 | return false; |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 385 | } |
| 386 | |
| 387 | aniState->listenTime += listenTime; |
| 388 | |
Sujith | 1aa8e84 | 2009-08-13 09:34:25 +0530 | [diff] [blame] | 389 | ath9k_hw_update_mibstats(ah, &ah->ah_mibStats); |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 390 | |
Sujith | 1aa8e84 | 2009-08-13 09:34:25 +0530 | [diff] [blame] | 391 | phyCnt1 = REG_READ(ah, AR_PHY_ERR_1); |
| 392 | phyCnt2 = REG_READ(ah, AR_PHY_ERR_2); |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 393 | |
Felix Fietkau | 465dce6 | 2012-06-15 15:25:24 +0200 | [diff] [blame] | 394 | ah->stats.ast_ani_ofdmerrs += phyCnt1 - aniState->ofdmPhyErrCount; |
| 395 | aniState->ofdmPhyErrCount = phyCnt1; |
Sujith | 1aa8e84 | 2009-08-13 09:34:25 +0530 | [diff] [blame] | 396 | |
Felix Fietkau | 465dce6 | 2012-06-15 15:25:24 +0200 | [diff] [blame] | 397 | ah->stats.ast_ani_cckerrs += phyCnt2 - aniState->cckPhyErrCount; |
| 398 | aniState->cckPhyErrCount = phyCnt2; |
| 399 | |
Felix Fietkau | e49f913 | 2010-10-12 16:08:01 +0200 | [diff] [blame] | 400 | return true; |
Felix Fietkau | bfc472b | 2010-10-04 20:09:48 +0200 | [diff] [blame] | 401 | } |
| 402 | |
Felix Fietkau | 9579217 | 2010-10-04 20:09:50 +0200 | [diff] [blame] | 403 | void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan) |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 404 | { |
| 405 | struct ar5416AniState *aniState; |
| 406 | struct ath_common *common = ath9k_hw_common(ah); |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 407 | u32 ofdmPhyErrRate, cckPhyErrRate; |
| 408 | |
Sujith Manoharan | e323300 | 2013-06-03 09:19:26 +0530 | [diff] [blame] | 409 | if (!ah->curchan) |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 410 | return; |
| 411 | |
Sujith Manoharan | c24bd36 | 2013-06-03 09:19:29 +0530 | [diff] [blame] | 412 | aniState = &ah->ani; |
Felix Fietkau | e49f913 | 2010-10-12 16:08:01 +0200 | [diff] [blame] | 413 | if (!ath9k_hw_ani_read_counters(ah)) |
| 414 | return; |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 415 | |
| 416 | ofdmPhyErrRate = aniState->ofdmPhyErrCount * 1000 / |
| 417 | aniState->listenTime; |
| 418 | cckPhyErrRate = aniState->cckPhyErrCount * 1000 / |
| 419 | aniState->listenTime; |
| 420 | |
Joe Perches | d2182b6 | 2011-12-15 14:55:53 -0800 | [diff] [blame] | 421 | ath_dbg(common, ANI, |
Joe Perches | 226afe6 | 2010-12-02 19:12:37 -0800 | [diff] [blame] | 422 | "listenTime=%d OFDM:%d errs=%d/s CCK:%d errs=%d/s ofdm_turn=%d\n", |
| 423 | aniState->listenTime, |
| 424 | aniState->ofdmNoiseImmunityLevel, |
| 425 | ofdmPhyErrRate, aniState->cckNoiseImmunityLevel, |
| 426 | cckPhyErrRate, aniState->ofdmsTurn); |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 427 | |
Sujith Manoharan | 55fee98 | 2013-06-17 14:24:36 +0530 | [diff] [blame] | 428 | if (aniState->listenTime > ah->aniperiod) { |
| 429 | if (cckPhyErrRate < ah->config.cck_trig_low && |
| 430 | ofdmPhyErrRate < ah->config.ofdm_trig_low) { |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 431 | ath9k_hw_ani_lower_immunity(ah); |
| 432 | aniState->ofdmsTurn = !aniState->ofdmsTurn; |
Sujith Manoharan | 55fee98 | 2013-06-17 14:24:36 +0530 | [diff] [blame] | 433 | } else if (ofdmPhyErrRate > ah->config.ofdm_trig_high) { |
Felix Fietkau | 8eb4980 | 2010-10-04 20:09:49 +0200 | [diff] [blame] | 434 | ath9k_hw_ani_ofdm_err_trigger(ah); |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 435 | aniState->ofdmsTurn = false; |
Felix Fietkau | 093115b | 2010-10-04 20:09:47 +0200 | [diff] [blame] | 436 | } else if (cckPhyErrRate > ah->config.cck_trig_high) { |
Felix Fietkau | 8eb4980 | 2010-10-04 20:09:49 +0200 | [diff] [blame] | 437 | ath9k_hw_ani_cck_err_trigger(ah); |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 438 | aniState->ofdmsTurn = true; |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 439 | } |
Rajkumar Manoharan | 54da20d | 2012-03-15 05:34:26 +0530 | [diff] [blame] | 440 | ath9k_ani_restart(ah); |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 441 | } |
| 442 | } |
Felix Fietkau | 9579217 | 2010-10-04 20:09:50 +0200 | [diff] [blame] | 443 | EXPORT_SYMBOL(ath9k_hw_ani_monitor); |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 444 | |
Sujith | cbe61d8 | 2009-02-09 13:27:12 +0530 | [diff] [blame] | 445 | void ath9k_enable_mib_counters(struct ath_hw *ah) |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 446 | { |
Luis R. Rodriguez | c46917b | 2009-09-13 02:42:02 -0700 | [diff] [blame] | 447 | struct ath_common *common = ath9k_hw_common(ah); |
| 448 | |
Joe Perches | d2182b6 | 2011-12-15 14:55:53 -0800 | [diff] [blame] | 449 | ath_dbg(common, ANI, "Enable MIB counters\n"); |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 450 | |
Sujith | cbe61d8 | 2009-02-09 13:27:12 +0530 | [diff] [blame] | 451 | ath9k_hw_update_mibstats(ah, &ah->ah_mibStats); |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 452 | |
Sujith | 7d0d0df | 2010-04-16 11:53:57 +0530 | [diff] [blame] | 453 | ENABLE_REGWRITE_BUFFER(ah); |
| 454 | |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 455 | REG_WRITE(ah, AR_FILT_OFDM, 0); |
| 456 | REG_WRITE(ah, AR_FILT_CCK, 0); |
| 457 | REG_WRITE(ah, AR_MIBC, |
| 458 | ~(AR_MIBC_COW | AR_MIBC_FMC | AR_MIBC_CMC | AR_MIBC_MCS) |
| 459 | & 0x0f); |
| 460 | REG_WRITE(ah, AR_PHY_ERR_MASK_1, AR_PHY_ERR_OFDM_TIMING); |
| 461 | REG_WRITE(ah, AR_PHY_ERR_MASK_2, AR_PHY_ERR_CCK_TIMING); |
Sujith | 7d0d0df | 2010-04-16 11:53:57 +0530 | [diff] [blame] | 462 | |
| 463 | REGWRITE_BUFFER_FLUSH(ah); |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 464 | } |
| 465 | |
Sujith | 0fd06c9 | 2009-02-12 10:06:51 +0530 | [diff] [blame] | 466 | /* Freeze the MIB counters, get the stats and then clear them */ |
Sujith | cbe61d8 | 2009-02-09 13:27:12 +0530 | [diff] [blame] | 467 | void ath9k_hw_disable_mib_counters(struct ath_hw *ah) |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 468 | { |
Luis R. Rodriguez | c46917b | 2009-09-13 02:42:02 -0700 | [diff] [blame] | 469 | struct ath_common *common = ath9k_hw_common(ah); |
| 470 | |
Joe Perches | d2182b6 | 2011-12-15 14:55:53 -0800 | [diff] [blame] | 471 | ath_dbg(common, ANI, "Disable MIB counters\n"); |
Luis R. Rodriguez | c46917b | 2009-09-13 02:42:02 -0700 | [diff] [blame] | 472 | |
Sujith | 0fd06c9 | 2009-02-12 10:06:51 +0530 | [diff] [blame] | 473 | REG_WRITE(ah, AR_MIBC, AR_MIBC_FMC); |
Sujith | cbe61d8 | 2009-02-09 13:27:12 +0530 | [diff] [blame] | 474 | ath9k_hw_update_mibstats(ah, &ah->ah_mibStats); |
Sujith | 0fd06c9 | 2009-02-12 10:06:51 +0530 | [diff] [blame] | 475 | REG_WRITE(ah, AR_MIBC, AR_MIBC_CMC); |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 476 | REG_WRITE(ah, AR_FILT_OFDM, 0); |
| 477 | REG_WRITE(ah, AR_FILT_CCK, 0); |
| 478 | } |
Sujith | 21d5130 | 2010-06-01 15:14:18 +0530 | [diff] [blame] | 479 | EXPORT_SYMBOL(ath9k_hw_disable_mib_counters); |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 480 | |
Luis R. Rodriguez | f637cfd | 2009-08-03 12:24:46 -0700 | [diff] [blame] | 481 | void ath9k_hw_ani_init(struct ath_hw *ah) |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 482 | { |
Luis R. Rodriguez | c46917b | 2009-09-13 02:42:02 -0700 | [diff] [blame] | 483 | struct ath_common *common = ath9k_hw_common(ah); |
Sujith Manoharan | c24bd36 | 2013-06-03 09:19:29 +0530 | [diff] [blame] | 484 | struct ar5416AniState *ani = &ah->ani; |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 485 | |
Joe Perches | d2182b6 | 2011-12-15 14:55:53 -0800 | [diff] [blame] | 486 | ath_dbg(common, ANI, "Initialize ANI\n"); |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 487 | |
Felix Fietkau | 465dce6 | 2012-06-15 15:25:24 +0200 | [diff] [blame] | 488 | ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH; |
| 489 | ah->config.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW; |
Felix Fietkau | 465dce6 | 2012-06-15 15:25:24 +0200 | [diff] [blame] | 490 | ah->config.cck_trig_high = ATH9K_ANI_CCK_TRIG_HIGH; |
| 491 | ah->config.cck_trig_low = ATH9K_ANI_CCK_TRIG_LOW; |
Felix Fietkau | 093115b | 2010-10-04 20:09:47 +0200 | [diff] [blame] | 492 | |
Sujith Manoharan | c24bd36 | 2013-06-03 09:19:29 +0530 | [diff] [blame] | 493 | ani->spurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL; |
| 494 | ani->firstepLevel = ATH9K_ANI_FIRSTEP_LVL; |
| 495 | ani->mrcCCK = AR_SREV_9300_20_OR_LATER(ah) ? true : false; |
| 496 | ani->ofdmsTurn = true; |
| 497 | ani->ofdmWeakSigDetect = true; |
| 498 | ani->cckNoiseImmunityLevel = ATH9K_ANI_CCK_DEF_LEVEL; |
| 499 | ani->ofdmNoiseImmunityLevel = ATH9K_ANI_OFDM_DEF_LEVEL; |
Luis R. Rodriguez | e36b27a | 2010-06-12 00:33:45 -0400 | [diff] [blame] | 500 | |
| 501 | /* |
| 502 | * since we expect some ongoing maintenance on the tables, let's sanity |
| 503 | * check here default level should not modify INI setting. |
| 504 | */ |
Felix Fietkau | 465dce6 | 2012-06-15 15:25:24 +0200 | [diff] [blame] | 505 | ah->aniperiod = ATH9K_ANI_PERIOD; |
| 506 | ah->config.ani_poll_interval = ATH9K_ANI_POLLINTERVAL; |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 507 | |
Felix Fietkau | 093115b | 2010-10-04 20:09:47 +0200 | [diff] [blame] | 508 | ath9k_ani_restart(ah); |
| 509 | ath9k_enable_mib_counters(ah); |
Sujith | f1dc560 | 2008-10-29 10:16:30 +0530 | [diff] [blame] | 510 | } |