Commit ca3d9389 authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by John W. Linville

iwlwifi: cleanup iwl_recover_from_statistics

No functional change, make recover from statistics code
easies to read.
Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Acked-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 9814f6b3
...@@ -234,33 +234,20 @@ EXPORT_SYMBOL(iwl_rx_spectrum_measure_notif); ...@@ -234,33 +234,20 @@ EXPORT_SYMBOL(iwl_rx_spectrum_measure_notif);
void iwl_recover_from_statistics(struct iwl_priv *priv, void iwl_recover_from_statistics(struct iwl_priv *priv,
struct iwl_rx_packet *pkt) struct iwl_rx_packet *pkt)
{ {
if (test_bit(STATUS_EXIT_PENDING, &priv->status)) if (test_bit(STATUS_EXIT_PENDING, &priv->status) ||
!iwl_is_any_associated(priv))
return; return;
if (iwl_is_any_associated(priv)) {
if (priv->cfg->ops->lib->check_ack_health) { if (priv->cfg->ops->lib->check_ack_health &&
if (!priv->cfg->ops->lib->check_ack_health( !priv->cfg->ops->lib->check_ack_health(priv, pkt)) {
priv, pkt)) { IWL_ERR(priv, "low ack count detected, restart firmware\n");
/* if (!iwl_force_reset(priv, IWL_FW_RESET, false))
* low ack count detected return;
* restart Firmware
*/
IWL_ERR(priv, "low ack count detected, "
"restart firmware\n");
if (!iwl_force_reset(priv, IWL_FW_RESET, false))
return;
}
}
if (priv->cfg->ops->lib->check_plcp_health) {
if (!priv->cfg->ops->lib->check_plcp_health(
priv, pkt)) {
/*
* high plcp error detected
* reset Radio
*/
iwl_force_reset(priv, IWL_RF_RESET, false);
}
}
} }
if (priv->cfg->ops->lib->check_plcp_health &&
!priv->cfg->ops->lib->check_plcp_health(priv, pkt))
iwl_force_reset(priv, IWL_RF_RESET, false);
} }
EXPORT_SYMBOL(iwl_recover_from_statistics); EXPORT_SYMBOL(iwl_recover_from_statistics);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment