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,
Shanyu Zhao <shanyu.zhao@intel.com>,
Wey-Yi Guy <wey-yi.w.guy@intel.com>
Subject: [PATCH 03/14] iwlagn: check ready in iwlagn_bss_info_changed()
Date: Mon, 13 Dec 2010 16:09:21 -0800 [thread overview]
Message-ID: <1292285372-11373-4-git-send-email-wey-yi.w.guy@intel.com> (raw)
In-Reply-To: <1292285372-11373-1-git-send-email-wey-yi.w.guy@intel.com>
From: Shanyu Zhao <shanyu.zhao@intel.com>
In function iwlagn_bss_info_changed(), we need to check if the driver
is ready before doing real work. Also, the previously put WARN() is
removed because the vif is not guaranteed to be valid. uCode restart
routine will clear the vif.
Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
index 4865b82..769479e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
@@ -518,7 +518,14 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
mutex_lock(&priv->mutex);
- if (WARN_ON(!ctx->vif)) {
+ if (unlikely(!iwl_is_ready(priv))) {
+ IWL_DEBUG_MAC80211(priv, "leave - not ready\n");
+ mutex_unlock(&priv->mutex);
+ return;
+ }
+
+ if (unlikely(!ctx->vif)) {
+ IWL_DEBUG_MAC80211(priv, "leave - vif is NULL\n");
mutex_unlock(&priv->mutex);
return;
}
--
1.7.0.4
next prev parent reply other threads:[~2010-12-14 0:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-14 0:09 [PATCH 00/14] update for 2.6.38 Wey-Yi Guy
2010-12-14 0:09 ` [PATCH 01/14] iwlagn: change led compensation for 6005 and 6030 devices Wey-Yi Guy
2010-12-14 0:09 ` [PATCH 02/14] iwlwifi: clear dbg_fixed_rate during init Wey-Yi Guy
2010-12-14 0:09 ` Wey-Yi Guy [this message]
2010-12-14 7:16 ` [PATCH 03/14] iwlagn: check ready in iwlagn_bss_info_changed() Johannes Berg
2010-12-14 15:26 ` Guy, Wey-Yi
2010-12-14 0:09 ` [PATCH 04/14] iwlagn: fix debug variable access Wey-Yi Guy
2010-12-14 0:09 ` [PATCH 05/14] iwlagn: rx antenna diversity Wey-Yi Guy
2010-12-14 0:09 ` [PATCH 06/14] iwlagn: rename enhanced txpower fields Wey-Yi Guy
2010-12-14 7:17 ` Johannes Berg
2010-12-14 15:24 ` Guy, Wey-Yi
2010-12-14 0:09 ` [PATCH 07/14] iwlagn: implement layout-agnostic EEPROM reading Wey-Yi Guy
2010-12-14 0:09 ` [PATCH 08/14] iwlagn: remove old EEPROM TX power reading Wey-Yi Guy
2010-12-14 0:09 ` [PATCH 09/14] iwlwifi: add new EEPROM debug log type Wey-Yi Guy
2010-12-14 0:09 ` [PATCH 10/14] iwlwifi: use IWL_DEBUG_EEPROM for EEPROM related info Wey-Yi Guy
2010-12-14 0:09 ` [PATCH 11/14] iwlagn: More detail tx power logging Wey-Yi Guy
2010-12-14 0:09 ` [PATCH 12/14] iwlwifi: do not reload fw if WiMAX own the RF Wey-Yi Guy
2010-12-14 0:09 ` [PATCH 13/14] iwlwifi: keep track of bt coex enable/disable stage Wey-Yi Guy
2010-12-14 0:09 ` [PATCH 14/14] iwlagn: code clean up to remove duplicate code 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=1292285372-11373-4-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 \
--cc=shanyu.zhao@intel.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).