aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-scan.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-09-24 01:57:46 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-09-24 16:18:04 -0400
commit8d09a5e1c36d0dec5728e6c8b0bb5412de09b27b (patch)
tree4e98dfc3181fb2feebc37de9b2d61451797b72e0 /drivers/net/wireless/iwlwifi/iwl-scan.c
parent55d6a3cd0cc85ed90c39cf32e16f622bd003117b (diff)
iwlwifi: don't fail if scan is issued too early
This patch returns success and empty scan on scans requests that were rejected because issued too early. The cached bss list from previous scanning will be returned by mac80211. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-scan.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-scan.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index 09c264be0496..bf855c35b0c1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -463,11 +463,6 @@ void iwl_init_scan_params(struct iwl_priv *priv)
463 463
464int iwl_scan_initiate(struct iwl_priv *priv) 464int iwl_scan_initiate(struct iwl_priv *priv)
465{ 465{
466 if (priv->iw_mode == NL80211_IFTYPE_AP) {
467 IWL_ERROR("APs don't scan.\n");
468 return 0;
469 }
470
471 if (!iwl_is_ready_rf(priv)) { 466 if (!iwl_is_ready_rf(priv)) {
472 IWL_DEBUG_SCAN("Aborting scan due to not ready.\n"); 467 IWL_DEBUG_SCAN("Aborting scan due to not ready.\n");
473 return -EIO; 468 return -EIO;
@@ -479,8 +474,7 @@ int iwl_scan_initiate(struct iwl_priv *priv)
479 } 474 }
480 475
481 if (test_bit(STATUS_SCAN_ABORTING, &priv->status)) { 476 if (test_bit(STATUS_SCAN_ABORTING, &priv->status)) {
482 IWL_DEBUG_SCAN("Scan request while abort pending. " 477 IWL_DEBUG_SCAN("Scan request while abort pending\n");
483 "Queuing.\n");
484 return -EAGAIN; 478 return -EAGAIN;
485 } 479 }
486 480