diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2011-02-08 03:31:55 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-02-09 16:09:49 -0500 |
commit | ca3d9389642946072ed448b2b7386f9e5d3f296b (patch) | |
tree | c47d6fe0767a8f7fbce178054db1d2f68db60b8e /drivers/net/wireless/iwlwifi/iwl-rx.c | |
parent | 9814f6b34be5179849c0872e81eb99286ef4b051 (diff) |
iwlwifi: cleanup iwl_recover_from_statistics
No functional change, make recover from statistics code
easies to read.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-rx.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-rx.c | 37 |
1 files changed, 12 insertions, 25 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c index 87a6fd84d4d2..bc89393fb696 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c | |||
@@ -234,33 +234,20 @@ EXPORT_SYMBOL(iwl_rx_spectrum_measure_notif); | |||
234 | void iwl_recover_from_statistics(struct iwl_priv *priv, | 234 | void iwl_recover_from_statistics(struct iwl_priv *priv, |
235 | struct iwl_rx_packet *pkt) | 235 | struct iwl_rx_packet *pkt) |
236 | { | 236 | { |
237 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 237 | if (test_bit(STATUS_EXIT_PENDING, &priv->status) || |
238 | !iwl_is_any_associated(priv)) | ||
238 | return; | 239 | return; |
239 | if (iwl_is_any_associated(priv)) { | 240 | |
240 | if (priv->cfg->ops->lib->check_ack_health) { | 241 | if (priv->cfg->ops->lib->check_ack_health && |
241 | if (!priv->cfg->ops->lib->check_ack_health( | 242 | !priv->cfg->ops->lib->check_ack_health(priv, pkt)) { |
242 | priv, pkt)) { | 243 | IWL_ERR(priv, "low ack count detected, restart firmware\n"); |
243 | /* | 244 | if (!iwl_force_reset(priv, IWL_FW_RESET, false)) |
244 | * low ack count detected | 245 | return; |
245 | * restart Firmware | ||
246 | */ | ||
247 | IWL_ERR(priv, "low ack count detected, " | ||
248 | "restart firmware\n"); | ||
249 | if (!iwl_force_reset(priv, IWL_FW_RESET, false)) | ||
250 | return; | ||
251 | } | ||
252 | } | ||
253 | if (priv->cfg->ops->lib->check_plcp_health) { | ||
254 | if (!priv->cfg->ops->lib->check_plcp_health( | ||
255 | priv, pkt)) { | ||
256 | /* | ||
257 | * high plcp error detected | ||
258 | * reset Radio | ||
259 | */ | ||
260 | iwl_force_reset(priv, IWL_RF_RESET, false); | ||
261 | } | ||
262 | } | ||
263 | } | 246 | } |
247 | |||
248 | if (priv->cfg->ops->lib->check_plcp_health && | ||
249 | !priv->cfg->ops->lib->check_plcp_health(priv, pkt)) | ||
250 | iwl_force_reset(priv, IWL_RF_RESET, false); | ||
264 | } | 251 | } |
265 | EXPORT_SYMBOL(iwl_recover_from_statistics); | 252 | EXPORT_SYMBOL(iwl_recover_from_statistics); |
266 | 253 | ||