summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-11-10 18:25:47 -0800
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2010-11-16 07:46:26 -0800
commit893654de3ff41a4f5037397d06a3f853bbbb3484 (patch)
tree6e62ecab2088147a30e948c12017d9b318509653
parentcfa1da7e9133be9280990b2a64fa7696924c8d9a (diff)
downloadlinux-3.10-893654de3ff41a4f5037397d06a3f853bbbb3484.tar.gz
linux-3.10-893654de3ff41a4f5037397d06a3f853bbbb3484.tar.bz2
linux-3.10-893654de3ff41a4f5037397d06a3f853bbbb3484.zip
iwlagn: avoid crash if vif is not assigned
For reasons that aren't entirely clear to me, we sometimes get here during hardware reset without the interface being set. Don't crash, but keep a warning. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rxon.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
index 2d927a94074..fbaa8d29365 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
@@ -507,6 +507,11 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
mutex_lock(&priv->mutex);
+ if (WARN_ON(!ctx->vif)) {
+ mutex_unlock(&priv->mutex);
+ return;
+ }
+
if (changes & BSS_CHANGED_BEACON_INT)
force = true;