diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-scan.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index 3904bb45ca61..7982b1930763 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
@@ -68,9 +68,8 @@ int iwl_scan_cancel(struct iwl_priv *priv) | |||
68 | } | 68 | } |
69 | 69 | ||
70 | if (test_bit(STATUS_SCANNING, &priv->status)) { | 70 | if (test_bit(STATUS_SCANNING, &priv->status)) { |
71 | if (!test_bit(STATUS_SCAN_ABORTING, &priv->status)) { | 71 | if (!test_and_set_bit(STATUS_SCAN_ABORTING, &priv->status)) { |
72 | IWL_DEBUG_SCAN(priv, "Queuing scan abort.\n"); | 72 | IWL_DEBUG_SCAN(priv, "Queuing scan abort.\n"); |
73 | set_bit(STATUS_SCAN_ABORTING, &priv->status); | ||
74 | queue_work(priv->workqueue, &priv->abort_scan); | 73 | queue_work(priv->workqueue, &priv->abort_scan); |
75 | 74 | ||
76 | } else | 75 | } else |
@@ -227,13 +226,13 @@ static void iwl_rx_scan_complete_notif(struct iwl_priv *priv, | |||
227 | jiffies_to_msecs(elapsed_jiffies | 226 | jiffies_to_msecs(elapsed_jiffies |
228 | (priv->scan_pass_start, jiffies))); | 227 | (priv->scan_pass_start, jiffies))); |
229 | 228 | ||
230 | /* If a request to abort was given, or the scan did not succeed | 229 | /* |
230 | * If a request to abort was given, or the scan did not succeed | ||
231 | * then we reset the scan state machine and terminate, | 231 | * then we reset the scan state machine and terminate, |
232 | * re-queuing another scan if one has been requested */ | 232 | * re-queuing another scan if one has been requested |
233 | if (test_bit(STATUS_SCAN_ABORTING, &priv->status)) { | 233 | */ |
234 | if (test_and_clear_bit(STATUS_SCAN_ABORTING, &priv->status)) | ||
234 | IWL_DEBUG_INFO(priv, "Aborted scan completed.\n"); | 235 | IWL_DEBUG_INFO(priv, "Aborted scan completed.\n"); |
235 | clear_bit(STATUS_SCAN_ABORTING, &priv->status); | ||
236 | } | ||
237 | 236 | ||
238 | if (!priv->is_internal_short_scan) | 237 | if (!priv->is_internal_short_scan) |
239 | priv->next_scan_jiffies = 0; | 238 | priv->next_scan_jiffies = 0; |