diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2011-06-08 09:28:25 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-10 14:57:49 -0400 |
commit | ecaee0ff07d429a8571ea015c00a211c17a86494 (patch) | |
tree | a072a06e6c9d95eacde7a19928ed78376a1dd098 /drivers/net/wireless/iwlegacy | |
parent | 3c09b174da3de867e61c4dcca765417a98ba961e (diff) |
iwlegacy: remove recover from statistics
Recover from statistics code was added during 6xxx devices development,
I don't think is needed on old devices. Also it is suspicious to cause
random, unreproducible microcode errors and hangs. So remove it.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlegacy')
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-3945.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-4965-rx.c | 78 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-4965.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-core.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-rx.c | 21 |
5 files changed, 1 insertions, 103 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl-3945.c b/drivers/net/wireless/iwlegacy/iwl-3945.c index d096dc28204d..5e99584aa9af 100644 --- a/drivers/net/wireless/iwlegacy/iwl-3945.c +++ b/drivers/net/wireless/iwlegacy/iwl-3945.c | |||
@@ -408,7 +408,6 @@ void iwl3945_hw_rx_statistics(struct iwl_priv *priv, | |||
408 | #ifdef CONFIG_IWLWIFI_LEGACY_DEBUGFS | 408 | #ifdef CONFIG_IWLWIFI_LEGACY_DEBUGFS |
409 | iwl3945_accumulative_statistics(priv, (__le32 *)&pkt->u.raw); | 409 | iwl3945_accumulative_statistics(priv, (__le32 *)&pkt->u.raw); |
410 | #endif | 410 | #endif |
411 | iwl_legacy_recover_from_statistics(priv, pkt); | ||
412 | 411 | ||
413 | memcpy(&priv->_3945.statistics, pkt->u.raw, sizeof(priv->_3945.statistics)); | 412 | memcpy(&priv->_3945.statistics, pkt->u.raw, sizeof(priv->_3945.statistics)); |
414 | } | 413 | } |
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-rx.c b/drivers/net/wireless/iwlegacy/iwl-4965-rx.c index b9fa2f6411a7..2b144bbfc3c5 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965-rx.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965-rx.c | |||
@@ -151,81 +151,6 @@ static void iwl4965_accumulative_statistics(struct iwl_priv *priv, | |||
151 | 151 | ||
152 | #define REG_RECALIB_PERIOD (60) | 152 | #define REG_RECALIB_PERIOD (60) |
153 | 153 | ||
154 | /** | ||
155 | * iwl4965_good_plcp_health - checks for plcp error. | ||
156 | * | ||
157 | * When the plcp error is exceeding the thresholds, reset the radio | ||
158 | * to improve the throughput. | ||
159 | */ | ||
160 | bool iwl4965_good_plcp_health(struct iwl_priv *priv, | ||
161 | struct iwl_rx_packet *pkt) | ||
162 | { | ||
163 | bool rc = true; | ||
164 | int combined_plcp_delta; | ||
165 | unsigned int plcp_msec; | ||
166 | unsigned long plcp_received_jiffies; | ||
167 | |||
168 | if (priv->cfg->base_params->plcp_delta_threshold == | ||
169 | IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE) { | ||
170 | IWL_DEBUG_RADIO(priv, "plcp_err check disabled\n"); | ||
171 | return rc; | ||
172 | } | ||
173 | |||
174 | /* | ||
175 | * check for plcp_err and trigger radio reset if it exceeds | ||
176 | * the plcp error threshold plcp_delta. | ||
177 | */ | ||
178 | plcp_received_jiffies = jiffies; | ||
179 | plcp_msec = jiffies_to_msecs((long) plcp_received_jiffies - | ||
180 | (long) priv->plcp_jiffies); | ||
181 | priv->plcp_jiffies = plcp_received_jiffies; | ||
182 | /* | ||
183 | * check to make sure plcp_msec is not 0 to prevent division | ||
184 | * by zero. | ||
185 | */ | ||
186 | if (plcp_msec) { | ||
187 | struct statistics_rx_phy *ofdm; | ||
188 | struct statistics_rx_ht_phy *ofdm_ht; | ||
189 | |||
190 | ofdm = &pkt->u.stats.rx.ofdm; | ||
191 | ofdm_ht = &pkt->u.stats.rx.ofdm_ht; | ||
192 | combined_plcp_delta = | ||
193 | (le32_to_cpu(ofdm->plcp_err) - | ||
194 | le32_to_cpu(priv->_4965.statistics. | ||
195 | rx.ofdm.plcp_err)) + | ||
196 | (le32_to_cpu(ofdm_ht->plcp_err) - | ||
197 | le32_to_cpu(priv->_4965.statistics. | ||
198 | rx.ofdm_ht.plcp_err)); | ||
199 | |||
200 | if ((combined_plcp_delta > 0) && | ||
201 | ((combined_plcp_delta * 100) / plcp_msec) > | ||
202 | priv->cfg->base_params->plcp_delta_threshold) { | ||
203 | /* | ||
204 | * if plcp_err exceed the threshold, | ||
205 | * the following data is printed in csv format: | ||
206 | * Text: plcp_err exceeded %d, | ||
207 | * Received ofdm.plcp_err, | ||
208 | * Current ofdm.plcp_err, | ||
209 | * Received ofdm_ht.plcp_err, | ||
210 | * Current ofdm_ht.plcp_err, | ||
211 | * combined_plcp_delta, | ||
212 | * plcp_msec | ||
213 | */ | ||
214 | IWL_DEBUG_RADIO(priv, "plcp_err exceeded %u, " | ||
215 | "%u, %u, %u, %u, %d, %u mSecs\n", | ||
216 | priv->cfg->base_params->plcp_delta_threshold, | ||
217 | le32_to_cpu(ofdm->plcp_err), | ||
218 | le32_to_cpu(ofdm->plcp_err), | ||
219 | le32_to_cpu(ofdm_ht->plcp_err), | ||
220 | le32_to_cpu(ofdm_ht->plcp_err), | ||
221 | combined_plcp_delta, plcp_msec); | ||
222 | |||
223 | rc = false; | ||
224 | } | ||
225 | } | ||
226 | return rc; | ||
227 | } | ||
228 | |||
229 | void iwl4965_rx_statistics(struct iwl_priv *priv, | 154 | void iwl4965_rx_statistics(struct iwl_priv *priv, |
230 | struct iwl_rx_mem_buffer *rxb) | 155 | struct iwl_rx_mem_buffer *rxb) |
231 | { | 156 | { |
@@ -248,8 +173,7 @@ void iwl4965_rx_statistics(struct iwl_priv *priv, | |||
248 | iwl4965_accumulative_statistics(priv, (__le32 *)&pkt->u.stats); | 173 | iwl4965_accumulative_statistics(priv, (__le32 *)&pkt->u.stats); |
249 | #endif | 174 | #endif |
250 | 175 | ||
251 | iwl_legacy_recover_from_statistics(priv, pkt); | 176 | /* TODO: reading some of statistics is unneeded */ |
252 | |||
253 | memcpy(&priv->_4965.statistics, &pkt->u.stats, | 177 | memcpy(&priv->_4965.statistics, &pkt->u.stats, |
254 | sizeof(priv->_4965.statistics)); | 178 | sizeof(priv->_4965.statistics)); |
255 | 179 | ||
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965.c b/drivers/net/wireless/iwlegacy/iwl-4965.c index 9cf96cb51712..f59f588ca05d 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965.c | |||
@@ -2100,7 +2100,6 @@ static struct iwl_lib_ops iwl4965_lib = { | |||
2100 | .tx_stats_read = iwl4965_ucode_tx_stats_read, | 2100 | .tx_stats_read = iwl4965_ucode_tx_stats_read, |
2101 | .general_stats_read = iwl4965_ucode_general_stats_read, | 2101 | .general_stats_read = iwl4965_ucode_general_stats_read, |
2102 | }, | 2102 | }, |
2103 | .check_plcp_health = iwl4965_good_plcp_health, | ||
2104 | }; | 2103 | }; |
2105 | 2104 | ||
2106 | static const struct iwl_legacy_ops iwl4965_legacy_ops = { | 2105 | static const struct iwl_legacy_ops iwl4965_legacy_ops = { |
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.h b/drivers/net/wireless/iwlegacy/iwl-core.h index c5fbda0760de..a821bdbe3e16 100644 --- a/drivers/net/wireless/iwlegacy/iwl-core.h +++ b/drivers/net/wireless/iwlegacy/iwl-core.h | |||
@@ -161,9 +161,6 @@ struct iwl_lib_ops { | |||
161 | 161 | ||
162 | /* temperature */ | 162 | /* temperature */ |
163 | struct iwl_temp_ops temp_ops; | 163 | struct iwl_temp_ops temp_ops; |
164 | /* check for plcp health */ | ||
165 | bool (*check_plcp_health)(struct iwl_priv *priv, | ||
166 | struct iwl_rx_packet *pkt); | ||
167 | 164 | ||
168 | struct iwl_debugfs_ops debugfs_ops; | 165 | struct iwl_debugfs_ops debugfs_ops; |
169 | 166 | ||
diff --git a/drivers/net/wireless/iwlegacy/iwl-rx.c b/drivers/net/wireless/iwlegacy/iwl-rx.c index 654cf233a384..9b5d0abe8be9 100644 --- a/drivers/net/wireless/iwlegacy/iwl-rx.c +++ b/drivers/net/wireless/iwlegacy/iwl-rx.c | |||
@@ -227,27 +227,6 @@ void iwl_legacy_rx_spectrum_measure_notif(struct iwl_priv *priv, | |||
227 | } | 227 | } |
228 | EXPORT_SYMBOL(iwl_legacy_rx_spectrum_measure_notif); | 228 | EXPORT_SYMBOL(iwl_legacy_rx_spectrum_measure_notif); |
229 | 229 | ||
230 | void iwl_legacy_recover_from_statistics(struct iwl_priv *priv, | ||
231 | struct iwl_rx_packet *pkt) | ||
232 | { | ||
233 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | ||
234 | return; | ||
235 | if (iwl_legacy_is_any_associated(priv)) { | ||
236 | if (priv->cfg->ops->lib->check_plcp_health) { | ||
237 | if (!priv->cfg->ops->lib->check_plcp_health( | ||
238 | priv, pkt)) { | ||
239 | /* | ||
240 | * high plcp error detected | ||
241 | * reset Radio | ||
242 | */ | ||
243 | iwl_legacy_force_reset(priv, | ||
244 | IWL_RF_RESET, false); | ||
245 | } | ||
246 | } | ||
247 | } | ||
248 | } | ||
249 | EXPORT_SYMBOL(iwl_legacy_recover_from_statistics); | ||
250 | |||
251 | /* | 230 | /* |
252 | * returns non-zero if packet should be dropped | 231 | * returns non-zero if packet should be dropped |
253 | */ | 232 | */ |