iwlegacy: fix up brokenness caused by cleanup
authorDan Carpenter <error27@gmail.com>
Wed, 15 Jun 2011 13:10:10 +0000 (16:10 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 17 Jun 2011 18:22:24 +0000 (14:22 -0400)
Patch 7f1f9742514 "iwlegacy: refactor iwl4965_mac_channel_switch"
reversed a test and also it changed a spin_lock_irq() to
spin_lock().  I assume the spin_lock change was a mistake because
the unlock was left as spin_unlock_irq().

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlegacy/iwl4965-base.c

index 49a80bb706340923b8c8e6a7e382b604ca3facaf..46242d2aa5ada956b26feb64001dae4cab4f8a43 100644 (file)
@@ -2526,7 +2526,7 @@ void iwl4965_mac_channel_switch(struct ieee80211_hw *hw,
        if (!iwl_legacy_is_associated_ctx(ctx))
                goto out;
 
-       if (priv->cfg->ops->lib->set_channel_switch)
+       if (!priv->cfg->ops->lib->set_channel_switch)
                goto out;
 
        ch = channel->hw_value;
@@ -2539,7 +2539,7 @@ void iwl4965_mac_channel_switch(struct ieee80211_hw *hw,
                goto out;
        }
 
-       spin_lock(&priv->lock);
+       spin_lock_irq(&priv->lock);
 
        priv->current_ht_config.smps = conf->smps_mode;