linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
	ipw3945-devel@lists.sourceforge.net,
	Wey-Yi Guy <wey-yi.w.guy@intel.com>
Subject: [PATCH 10/13] iwlagn: always send RXON with disassociate flag before associate
Date: Fri, 13 May 2011 12:13:27 -0700	[thread overview]
Message-ID: <1305314010-18073-11-git-send-email-wey-yi.w.guy@intel.com> (raw)
In-Reply-To: <1305314010-18073-1-git-send-email-wey-yi.w.guy@intel.com>

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>
---
 drivers/net/wireless/iwlwifi/iwl-agn-rxon.c |    8 +++-----
 drivers/net/wireless/iwlwifi/iwl-tx.c       |    5 +++++
 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 0238743..7d40e2d 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)
 	 * AP station must be done after the BSSID is set to correctly
 	 * set up filters in the device.
 	 */
-	if ((old_assoc && new_assoc) || !new_assoc) {
-		ret = iwlagn_rxon_disconn(priv, ctx);
-		if (ret)
-			return ret;
-	}
+	ret = iwlagn_rxon_disconn(priv, ctx);
+	if (ret)
+		return ret;
 
 	if (new_assoc)
 		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 2f6b38c..54a935f 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)
 	int trace_idx;
 #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);
 	cmd_size = sizeof(out_cmd->hdr);
 
-- 
1.7.0.4


  parent reply	other threads:[~2011-05-13 19:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-13 19:13 [PATCH 00/13] update for 2.6.40 Wey-Yi Guy
2011-05-13 19:13 ` [PATCH 01/13] iwlagn: prepare for multi-TB commands Wey-Yi Guy
2011-05-13 19:13 ` [PATCH 02/13] iwlagn: clean up TXQ indirection Wey-Yi Guy
2011-05-13 19:13 ` [PATCH 03/13] iwlagn: remove unused pad argument Wey-Yi Guy
2011-05-13 19:13 ` [PATCH 04/13] iwlagn: support multiple TBs per command Wey-Yi Guy
2011-05-13 19:13 ` [PATCH 05/13] iwlagn: more ucode error log info Wey-Yi Guy
2011-05-13 19:13 ` [PATCH 06/13] iwlagn: add testmode trace command Wey-Yi Guy
2011-05-13 19:13 ` [PATCH 07/13] iwlagn: add eeprom command to testmode Wey-Yi Guy
2011-05-13 19:13 ` [PATCH 08/13] iwlagn: add testmode set fixed rate command Wey-Yi Guy
2011-05-13 19:13 ` [PATCH 09/13] iwlagn: clear STATUS_HCMD_ACTIVE bit if fail enqueue Wey-Yi Guy
2011-05-13 19:13 ` Wey-Yi Guy [this message]
2011-05-13 19:13 ` [PATCH 11/13] iwlagn: remove set but unused vars Wey-Yi Guy
2011-05-13 19:13 ` [PATCH 12/13] iwlagn: change default beacon interval Wey-Yi Guy
2011-05-13 19:13 ` [PATCH 13/13] iwlagn: remove unused old_assoc parameter Wey-Yi Guy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1305314010-18073-11-git-send-email-wey-yi.w.guy@intel.com \
    --to=wey-yi.w.guy@intel.com \
    --cc=ipw3945-devel@lists.sourceforge.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).