iwlwifi: remove unnecessary locking
authorJohannes Berg <johannes.berg@intel.com>
Fri, 4 Feb 2011 14:57:45 +0000 (06:57 -0800)
committerWey-Yi Guy <wey-yi.w.guy@intel.com>
Sun, 6 Feb 2011 17:30:54 +0000 (09:30 -0800)
This code, and the places that set the variable
is_internal_short_scan and the vif pointers are
all protected by the mutex, there's no point in
locking the spinlock here as well (any more).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
drivers/net/wireless/iwlwifi/iwl-agn-lib.c
drivers/net/wireless/iwlwifi/iwl3945-base.c

index d4ba3357b6284927b3a6c4104e48991c7c8443ed..3aa486437509fca6882e44463c58f813acd964dc 100644 (file)
@@ -1395,15 +1395,12 @@ int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
                u32 extra;
                u32 suspend_time = 100;
                u32 scan_suspend_time = 100;
-               unsigned long flags;
 
                IWL_DEBUG_INFO(priv, "Scanning while associated...\n");
-               spin_lock_irqsave(&priv->lock, flags);
                if (priv->is_internal_short_scan)
                        interval = 0;
                else
                        interval = vif->bss_conf.beacon_int;
-               spin_unlock_irqrestore(&priv->lock, flags);
 
                scan->suspend_time = 0;
                scan->max_out_time = cpu_to_le32(200 * 1024);
index 76fae81ddc4b798929a0e62ee22e891b4e1f7141..adcef735180ac1576552624d42e13bbc71388fef 100644 (file)
@@ -2860,16 +2860,13 @@ int iwl3945_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
                u32 extra;
                u32 suspend_time = 100;
                u32 scan_suspend_time = 100;
-               unsigned long flags;
 
                IWL_DEBUG_INFO(priv, "Scanning while associated...\n");
 
-               spin_lock_irqsave(&priv->lock, flags);
                if (priv->is_internal_short_scan)
                        interval = 0;
                else
                        interval = vif->bss_conf.beacon_int;
-               spin_unlock_irqrestore(&priv->lock, flags);
 
                scan->suspend_time = 0;
                scan->max_out_time = cpu_to_le32(200 * 1024);