iwlegacy: more priv->mutex serialization
[pandora-kernel.git] / drivers / net / wireless / iwlegacy / iwl-core.c
index 553c91b..0073f92 100644 (file)
@@ -2429,11 +2429,13 @@ void iwl_legacy_mac_bss_info_changed(struct ieee80211_hw *hw,
 
        IWL_DEBUG_MAC80211(priv, "changes = 0x%X\n", changes);
 
-       if (!iwl_legacy_is_alive(priv))
-               return;
-
        mutex_lock(&priv->mutex);
 
+       if (!iwl_legacy_is_alive(priv)) {
+               mutex_unlock(&priv->mutex);
+               return;
+       }
+
        if (changes & BSS_CHANGED_QOS) {
                unsigned long flags;