summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-11-11 02:25:47 (GMT)
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2010-11-16 15:46:26 (GMT)
commit893654de3ff41a4f5037397d06a3f853bbbb3484 (patch)
tree6e62ecab2088147a30e948c12017d9b318509653 /drivers
parentcfa1da7e9133be9280990b2a64fa7696924c8d9a (diff)
downloadlinux-fsl-qoriq-893654de3ff41a4f5037397d06a3f853bbbb3484.tar.xz
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>
Diffstat (limited to 'drivers')
-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 2d927a9..fbaa8d2 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;