iwlwifi: check for STATUS_EXIT_PENDING when send RXON command
authorWey-Yi Guy <wey-yi.w.guy@intel.com>
Fri, 26 Nov 2010 19:09:42 +0000 (11:09 -0800)
committerWey-Yi Guy <wey-yi.w.guy@intel.com>
Thu, 2 Dec 2010 16:35:23 +0000 (08:35 -0800)
If driver is on the way down, there is no need to send
RXON to uCode, check the condition before continuous the process.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
drivers/net/wireless/iwlwifi/iwl-3945.c
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c

index d39f449a9bb0af534dc87e574fcb584e0536bf57..cac9647da71c0d452e3a55a1b377e3dedfc6693a 100644 (file)
@@ -1784,6 +1784,9 @@ int iwl3945_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
        int rc = 0;
        bool new_assoc = !!(staging_rxon->filter_flags & RXON_FILTER_ASSOC_MSK);
 
+       if (test_bit(STATUS_EXIT_PENDING, &priv->status))
+               return -EINVAL;
+
        if (!iwl_is_alive(priv))
                return -1;
 
index 203ee60a82b4cbb18a6916a74e2f76c62833d871..4865b82355d7d02ff53eca1331f39913d242e124 100644 (file)
@@ -130,6 +130,9 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
 
        lockdep_assert_held(&priv->mutex);
 
+       if (test_bit(STATUS_EXIT_PENDING, &priv->status))
+               return -EINVAL;
+
        if (!iwl_is_alive(priv))
                return -EBUSY;