Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198600
b: refs/heads/master
c: 073d5ea
h: refs/heads/master
v: v3
  • Loading branch information
Reinette Chatre authored and John W. Linville committed May 21, 2010
1 parent a19ab40 commit 15a0928
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 22fe88d3d85850267ff4535b465794a5768f868a
refs/heads/master: 073d5eab6fc85b6c278d507a5633b759a85dc878
21 changes: 18 additions & 3 deletions trunk/drivers/net/wireless/iwlwifi/iwl-scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,11 @@ void iwl_bg_start_internal_scan(struct work_struct *work)

mutex_lock(&priv->mutex);

if (priv->is_internal_short_scan == true) {
IWL_DEBUG_SCAN(priv, "Internal scan already in progress\n");
goto unlock;
}

if (!iwl_is_ready_rf(priv)) {
IWL_DEBUG_SCAN(priv, "not ready or exit pending\n");
goto unlock;
Expand Down Expand Up @@ -497,17 +502,27 @@ void iwl_bg_scan_completed(struct work_struct *work)
{
struct iwl_priv *priv =
container_of(work, struct iwl_priv, scan_completed);
bool internal = false;

IWL_DEBUG_SCAN(priv, "SCAN complete scan\n");

cancel_delayed_work(&priv->scan_check);

if (!priv->is_internal_short_scan)
ieee80211_scan_completed(priv->hw, false);
else {
mutex_lock(&priv->mutex);
if (priv->is_internal_short_scan) {
priv->is_internal_short_scan = false;
IWL_DEBUG_SCAN(priv, "internal short scan completed\n");
internal = true;
}
mutex_unlock(&priv->mutex);

/*
* Do not hold mutex here since this will cause mac80211 to call
* into driver again into functions that will attempt to take
* mutex.
*/
if (!internal)
ieee80211_scan_completed(priv->hw, false);

if (test_bit(STATUS_EXIT_PENDING, &priv->status))
return;
Expand Down

0 comments on commit 15a0928

Please sign in to comment.