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

iwlwifi: cleanup scan initiate check

Remove redundant checks and use iwl_is_ready_rf().
Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Acked-by: default avatarWey-Yi W Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent edeb78a7
...@@ -361,7 +361,7 @@ static int __must_check iwl_scan_initiate(struct iwl_priv *priv, ...@@ -361,7 +361,7 @@ static int __must_check iwl_scan_initiate(struct iwl_priv *priv,
cancel_delayed_work(&priv->scan_check); cancel_delayed_work(&priv->scan_check);
if (!iwl_is_ready(priv)) { if (!iwl_is_ready_rf(priv)) {
IWL_WARN(priv, "request scan called when driver not ready.\n"); IWL_WARN(priv, "request scan called when driver not ready.\n");
return -EIO; return -EIO;
} }
...@@ -372,26 +372,11 @@ static int __must_check iwl_scan_initiate(struct iwl_priv *priv, ...@@ -372,26 +372,11 @@ static int __must_check iwl_scan_initiate(struct iwl_priv *priv,
return -EBUSY; return -EBUSY;
} }
if (test_bit(STATUS_EXIT_PENDING, &priv->status)) {
IWL_DEBUG_SCAN(priv, "Aborting scan due to device shutdown\n");
return -EIO;
}
if (test_bit(STATUS_SCAN_ABORTING, &priv->status)) { if (test_bit(STATUS_SCAN_ABORTING, &priv->status)) {
IWL_DEBUG_HC(priv, "Scan request while abort pending.\n"); IWL_DEBUG_HC(priv, "Scan request while abort pending.\n");
return -EBUSY; return -EBUSY;
} }
if (iwl_is_rfkill(priv)) {
IWL_DEBUG_HC(priv, "Aborting scan due to RF Kill activation\n");
return -EIO;
}
if (!test_bit(STATUS_READY, &priv->status)) {
IWL_DEBUG_HC(priv, "Scan request while uninitialized.\n");
return -EBUSY;
}
IWL_DEBUG_INFO(priv, "Starting %sscan...\n", IWL_DEBUG_INFO(priv, "Starting %sscan...\n",
internal ? "internal short " : ""); internal ? "internal short " : "");
......
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