aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShanyu Zhao <shanyu.zhao@intel.com>2010-12-02 14:02:28 -0500
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2010-12-13 18:51:18 -0500
commitae0b693c12cc78913085733d28e0e0e6020db6f4 (patch)
tree7a233a302342c0d284c2ad5385122d923552c5e5
parenta1da077bc36368eb7d6312e7e49260f0a3d92c77 (diff)
iwlagn: check ready in iwlagn_bss_info_changed()
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>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rxon.c9
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 4865b82355d7..769479eb6ea9 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,
518 518
519 mutex_lock(&priv->mutex); 519 mutex_lock(&priv->mutex);
520 520
521 if (WARN_ON(!ctx->vif)) { 521 if (unlikely(!iwl_is_ready(priv))) {
522 IWL_DEBUG_MAC80211(priv, "leave - not ready\n");
523 mutex_unlock(&priv->mutex);
524 return;
525 }
526
527 if (unlikely(!ctx->vif)) {
528 IWL_DEBUG_MAC80211(priv, "leave - vif is NULL\n");
522 mutex_unlock(&priv->mutex); 529 mutex_unlock(&priv->mutex);
523 return; 530 return;
524 } 531 }