diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2010-09-13 08:46:40 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-09-14 16:13:26 -0400 |
commit | 6bd1758d978f917dc0804f44e3528ef1a80d9d43 (patch) | |
tree | e6d18128149cc946df874e05f003402509f68358 | |
parent | f5354c17dc29681c241f2774f3ef9478fb586673 (diff) |
iwlwifi: assure we complete scan in scan_abort and scan_check works
Assure we complete scan in mac80211 when we abort scanning (scan_abort
work) or scan timeout occurs (scan_check work). Currently
iwl_scan_cancel_timeout() procedure force scan finish in mac80211
at the end of timeout loop, so we can use it in proper work functions.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-scan.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index ce605e0aadfe..da037b2f08b4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
@@ -490,18 +490,8 @@ static void iwl_bg_scan_check(struct work_struct *data) | |||
490 | struct iwl_priv *priv = | 490 | struct iwl_priv *priv = |
491 | container_of(data, struct iwl_priv, scan_check.work); | 491 | container_of(data, struct iwl_priv, scan_check.work); |
492 | 492 | ||
493 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | ||
494 | return; | ||
495 | |||
496 | mutex_lock(&priv->mutex); | 493 | mutex_lock(&priv->mutex); |
497 | if (test_bit(STATUS_SCANNING, &priv->status) && | 494 | iwl_scan_cancel_timeout(priv, 200); |
498 | !test_bit(STATUS_SCAN_ABORTING, &priv->status)) { | ||
499 | IWL_DEBUG_SCAN(priv, "Scan completion watchdog (%dms)\n", | ||
500 | jiffies_to_msecs(IWL_SCAN_CHECK_WATCHDOG)); | ||
501 | |||
502 | if (!test_bit(STATUS_EXIT_PENDING, &priv->status)) | ||
503 | iwl_send_scan_abort(priv); | ||
504 | } | ||
505 | mutex_unlock(&priv->mutex); | 495 | mutex_unlock(&priv->mutex); |
506 | } | 496 | } |
507 | 497 | ||
@@ -560,7 +550,7 @@ static void iwl_bg_abort_scan(struct work_struct *work) | |||
560 | cancel_delayed_work(&priv->scan_check); | 550 | cancel_delayed_work(&priv->scan_check); |
561 | 551 | ||
562 | mutex_lock(&priv->mutex); | 552 | mutex_lock(&priv->mutex); |
563 | iwl_do_scan_abort(priv); | 553 | iwl_scan_cancel_timeout(priv, 200); |
564 | mutex_unlock(&priv->mutex); | 554 | mutex_unlock(&priv->mutex); |
565 | } | 555 | } |
566 | 556 | ||