Skip to content

Commit

Permalink
iwlwifi: check for STATUS_EXIT_PENDING when send RXON command
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wey-Yi Guy committed Dec 2, 2010
1 parent 8b3ee29 commit adb90a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/wireless/iwlwifi/iwl-3945.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 3 additions & 0 deletions drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit adb90a0

Please sign in to comment.