mutex_unlock(&priv->shrd->mutex);
}
-static void iwl_bg_scan_completed(struct work_struct *work)
+static void iwl_process_scan_complete(struct iwl_priv *priv)
{
- struct iwl_priv *priv =
- container_of(work, struct iwl_priv, scan_completed);
bool aborted;
IWL_DEBUG_SCAN(priv, "Completed scan.\n");
cancel_delayed_work(&priv->scan_check);
- mutex_lock(&priv->shrd->mutex);
-
aborted = test_and_clear_bit(STATUS_SCAN_ABORTING, &priv->shrd->status);
if (aborted)
IWL_DEBUG_SCAN(priv, "Aborted scan completed.\n");
goto out_complete;
}
- goto out;
+ return;
}
out_complete:
out_settings:
/* Can we still talk to firmware ? */
if (!iwl_is_ready_rf(priv->shrd))
- goto out;
+ return;
iwlagn_post_scan(priv);
+}
+
+static void iwl_bg_scan_completed(struct work_struct *work)
+{
+ struct iwl_priv *priv =
+ container_of(work, struct iwl_priv, scan_completed);
-out:
+ mutex_lock(&priv->shrd->mutex);
+ iwl_process_scan_complete(priv);
mutex_unlock(&priv->shrd->mutex);
}