Skip to content

Commit

Permalink
iwlwifi: remove unnecessary locking
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
  • Loading branch information
jmberg-intel authored and wwguy committed Feb 6, 2011
1 parent b23b025 commit 2f115cf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions drivers/net/wireless/iwlwifi/iwl-agn-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 0 additions & 3 deletions drivers/net/wireless/iwlwifi/iwl3945-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2f115cf

Please sign in to comment.