diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-09-24 13:57:46 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-11-13 09:56:01 -0800 |
commit | 43eb69c8861772c281b42f47c568c80e224d19d5 (patch) | |
tree | 433e2322b64132608b100ee7a542c6640e27fad8 /drivers | |
parent | a11e79100dd97d39cd88539046252961d4de9477 (diff) | |
download | linux-rt-43eb69c8861772c281b42f47c568c80e224d19d5.tar.gz |
iwlwifi: don't fail if scan is issued too early
commit 8d09a5e1c36d0dec5728e6c8b0bb5412de09b27b upstream
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-scan.c | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 87c42a572a54..da589fc8ca78 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c @@ -3213,20 +3213,26 @@ static int iwl4965_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len) goto out_unlock; } - /* we don't schedule scan within next_scan_jiffies period */ + /* We don't schedule scan within next_scan_jiffies period. + * Avoid scanning during possible EAPOL exchange, return + * success immediately. + */ if (priv->next_scan_jiffies && time_after(priv->next_scan_jiffies, jiffies)) { IWL_DEBUG_SCAN("scan rejected: within next scan period\n"); - rc = -EAGAIN; + queue_work(priv->workqueue, &priv->scan_completed); + rc = 0; goto out_unlock; } /* if we just finished scan ask for delay */ if (iwl_is_associated(priv) && priv->last_scan_jiffies && time_after(priv->last_scan_jiffies + IWL_DELAY_NEXT_SCAN, jiffies)) { IWL_DEBUG_SCAN("scan rejected: within previous scan period\n"); - rc = -EAGAIN; + queue_work(priv->workqueue, &priv->scan_completed); + rc = 0; goto out_unlock; } + if (len) { IWL_DEBUG_SCAN("direct scan for %s [%d]\n ", iwl_escape_essid(ssid, len), (int)len); diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index 6c8ac3a87d54..3a90a678f37d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c @@ -464,11 +464,6 @@ void iwl_init_scan_params(struct iwl_priv *priv) int iwl_scan_initiate(struct iwl_priv *priv) { - if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { - IWL_ERROR("APs don't scan.\n"); - return 0; - } - if (!iwl_is_ready_rf(priv)) { IWL_DEBUG_SCAN("Aborting scan due to not ready.\n"); return -EIO; @@ -480,8 +475,7 @@ int iwl_scan_initiate(struct iwl_priv *priv) } if (test_bit(STATUS_SCAN_ABORTING, &priv->status)) { - IWL_DEBUG_SCAN("Scan request while abort pending. " - "Queuing.\n"); + IWL_DEBUG_SCAN("Scan request while abort pending\n"); return -EAGAIN; } |