aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2011-05-06 20:06:44 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2011-05-13 15:02:49 -0400
commit3083d03c215a2d1642dd12ede7ad61e24601b583 (patch)
tree4f6fb3ac63c5ed33d6c2fa02205fc90999c1813f /drivers
parentdd5c940b42c1734e501d9494f7b99566b50a5a87 (diff)
iwlagn: alwasy send RXON with disassociate falge before associate
Before send the RXON command with associated flag set, always do disassociate first to make sure uCode is in the correct state. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rxon.c8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-tx.c5
2 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
index 02387430f7fe..7d40e2d42873 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
@@ -389,11 +389,9 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
389 * AP station must be done after the BSSID is set to correctly 389 * AP station must be done after the BSSID is set to correctly
390 * set up filters in the device. 390 * set up filters in the device.
391 */ 391 */
392 if ((old_assoc && new_assoc) || !new_assoc) { 392 ret = iwlagn_rxon_disconn(priv, ctx);
393 ret = iwlagn_rxon_disconn(priv, ctx); 393 if (ret)
394 if (ret) 394 return ret;
395 return ret;
396 }
397 395
398 if (new_assoc) 396 if (new_assoc)
399 return iwlagn_rxon_connect(priv, ctx); 397 return iwlagn_rxon_connect(priv, ctx);
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 2f6b38cfcc13..54a935ff38fa 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -582,6 +582,11 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
582 int trace_idx; 582 int trace_idx;
583#endif 583#endif
584 584
585 if (test_bit(STATUS_FW_ERROR, &priv->status)) {
586 IWL_WARN(priv, "fw recovery, no hcmd send\n");
587 return -EIO;
588 }
589
585 copy_size = sizeof(out_cmd->hdr); 590 copy_size = sizeof(out_cmd->hdr);
586 cmd_size = sizeof(out_cmd->hdr); 591 cmd_size = sizeof(out_cmd->hdr);
587 592