Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264172
b: refs/heads/master
c: 6c80c39
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Sep 26, 2011
1 parent 85e8b3a commit d3f453f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 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: 1b9ca0272ffae212e726380f66777b30a56ed7a5
refs/heads/master: 6c80c39d9a6986a566c30d797aae37bfb697eea3
30 changes: 16 additions & 14 deletions trunk/drivers/net/wireless/iwlwifi/iwl-scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,31 +405,33 @@ int iwl_mac_hw_scan(struct ieee80211_hw *hw,

mutex_lock(&priv->mutex);

if (test_bit(STATUS_SCANNING, &priv->status) &&
priv->scan_type != IWL_SCAN_NORMAL) {
IWL_DEBUG_SCAN(priv, "Scan already in progress.\n");
ret = -EAGAIN;
goto out_unlock;
}

/* mac80211 will only ask for one band at a time */
priv->scan_request = req;
priv->scan_vif = vif;

/*
* If an internal scan is in progress, just set
* up the scan_request as per above.
*/
if (priv->scan_type != IWL_SCAN_NORMAL) {
IWL_DEBUG_SCAN(priv, "SCAN request during internal scan\n");
IWL_DEBUG_SCAN(priv,
"SCAN request during internal scan - defer\n");
priv->scan_request = req;
priv->scan_vif = vif;
ret = 0;
} else
} else {
priv->scan_request = req;
priv->scan_vif = vif;
/*
* mac80211 will only ask for one band at a time
* so using channels[0] here is ok
*/
ret = iwl_scan_initiate(priv, vif, IWL_SCAN_NORMAL,
req->channels[0]->band);
if (ret) {
priv->scan_request = NULL;
priv->scan_vif = NULL;
}
}

IWL_DEBUG_MAC80211(priv, "leave\n");

out_unlock:
mutex_unlock(&priv->mutex);

return ret;
Expand Down

0 comments on commit d3f453f

Please sign in to comment.