Search Linux Wireless

RE: [PATCH 13/14] iwlwifi: cleanup scan initiate check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Gruszka,

-----Original Message-----
From: Stanislaw Gruszka [mailto:sgruszka@xxxxxxxxxx]
Sent: Thursday, September 09, 2010 6:53 AM
To: Johannes Berg; Guy, Wey-Yi W; Chatre, Reinette; John W. Linville
Cc: linux-wireless@xxxxxxxxxxxxxxx; Stanislaw Gruszka
Subject: [PATCH 13/14] iwlwifi: cleanup scan initiate check

Remove redundand checks and use iwl_is_ready_rf().

Signed-off-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx>
---
 drivers/net/wireless/iwlwifi/iwl-scan.c |   17 +----------------
 1 files changed, 1 insertions(+), 16 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index 10b0ccc..9cc4901 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 " : "");


Same cleanup for 3945?

Thanks
Wey

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux