From: Stanislaw Gruszka Date: Mon, 13 Sep 2010 12:46:43 +0000 (+0200) Subject: iwlwifi: cleanup scan initiate check X-Git-Tag: v2.6.37-rc1~147^2~265^2^2~124 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=74d81b259d6c8493f066e34c939cb6fb7d3129e5;p=platform%2Fkernel%2Flinux-3.10.git iwlwifi: cleanup scan initiate check Remove redundant checks and use iwl_is_ready_rf(). Signed-off-by: Stanislaw Gruszka Acked-by: Wey-Yi W Guy Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index af9a836..26dd8f3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c @@ -361,7 +361,7 @@ static int __must_check iwl_scan_initiate(struct iwl_priv *priv, 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"); return -EIO; } @@ -372,26 +372,11 @@ static int __must_check iwl_scan_initiate(struct iwl_priv *priv, 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)) { IWL_DEBUG_HC(priv, "Scan request while abort pending.\n"); 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", internal ? "internal short " : "");