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>
This commit is contained in:
Wey-Yi Guy 2011-05-06 17:06:44 -07:00
parent dd5c940b42
commit 3083d03c21
2 changed files with 8 additions and 5 deletions

View file

@ -389,11 +389,9 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
* AP station must be done after the BSSID is set to correctly * AP station must be done after the BSSID is set to correctly
* set up filters in the device. * set up filters in the device.
*/ */
if ((old_assoc && new_assoc) || !new_assoc) { ret = iwlagn_rxon_disconn(priv, ctx);
ret = iwlagn_rxon_disconn(priv, ctx); if (ret)
if (ret) return ret;
return ret;
}
if (new_assoc) if (new_assoc)
return iwlagn_rxon_connect(priv, ctx); return iwlagn_rxon_connect(priv, ctx);

View file

@ -582,6 +582,11 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
int trace_idx; int trace_idx;
#endif #endif
if (test_bit(STATUS_FW_ERROR, &priv->status)) {
IWL_WARN(priv, "fw recovery, no hcmd send\n");
return -EIO;
}
copy_size = sizeof(out_cmd->hdr); copy_size = sizeof(out_cmd->hdr);
cmd_size = sizeof(out_cmd->hdr); cmd_size = sizeof(out_cmd->hdr);