diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-11-26 14:09:42 -0500 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-12-02 11:35:23 -0500 |
commit | adb90a00371a9a06a55c7b7ed7b38152f8e960c3 (patch) | |
tree | 806433967df8baa79216fdb29d9571748170bcaa | |
parent | 8b3ee29626031155c7844988ebe4321c151c03a2 (diff) |
iwlwifi: check for STATUS_EXIT_PENDING when send RXON command
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>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index d39f449a9bb0..cac9647da71c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -1784,6 +1784,9 @@ int iwl3945_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | |||
1784 | int rc = 0; | 1784 | int rc = 0; |
1785 | bool new_assoc = !!(staging_rxon->filter_flags & RXON_FILTER_ASSOC_MSK); | 1785 | bool new_assoc = !!(staging_rxon->filter_flags & RXON_FILTER_ASSOC_MSK); |
1786 | 1786 | ||
1787 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | ||
1788 | return -EINVAL; | ||
1789 | |||
1787 | if (!iwl_is_alive(priv)) | 1790 | if (!iwl_is_alive(priv)) |
1788 | return -1; | 1791 | return -1; |
1789 | 1792 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c index 203ee60a82b4..4865b82355d7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | |||
@@ -130,6 +130,9 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | |||
130 | 130 | ||
131 | lockdep_assert_held(&priv->mutex); | 131 | lockdep_assert_held(&priv->mutex); |
132 | 132 | ||
133 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | ||
134 | return -EINVAL; | ||
135 | |||
133 | if (!iwl_is_alive(priv)) | 136 | if (!iwl_is_alive(priv)) |
134 | return -EBUSY; | 137 | return -EBUSY; |
135 | 138 | ||