diff options
author | Ron Rindjunsky <ron.rindjunsky@intel.com> | 2008-09-02 23:26:25 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-09-08 14:23:14 -0400 |
commit | 681c0050ea3ac2e90c83d5af397d73eed848a372 (patch) | |
tree | c7ea9336fd902b3355d733d396822771f59f8965 | |
parent | 7c0399d3fde0a9958fb8e9a067a463643cf235b5 (diff) |
iwlwifi: allow consecutive scans in unassociated state
This patch allows consecutive scans requests when driver is in
unassociated state.
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Esti Kummer <ester.kummer@intel.com>
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>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 575c1d978288..7b8af9609e08 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -3205,12 +3205,14 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t ssid_len) | |||
3205 | /* we don't schedule scan within next_scan_jiffies period */ | 3205 | /* we don't schedule scan within next_scan_jiffies period */ |
3206 | if (priv->next_scan_jiffies && | 3206 | if (priv->next_scan_jiffies && |
3207 | time_after(priv->next_scan_jiffies, jiffies)) { | 3207 | time_after(priv->next_scan_jiffies, jiffies)) { |
3208 | IWL_DEBUG_SCAN("scan rejected: within next scan period\n"); | ||
3208 | ret = -EAGAIN; | 3209 | ret = -EAGAIN; |
3209 | goto out_unlock; | 3210 | goto out_unlock; |
3210 | } | 3211 | } |
3211 | /* if we just finished scan ask for delay */ | 3212 | /* if we just finished scan ask for delay */ |
3212 | if (priv->last_scan_jiffies && | 3213 | if (iwl_is_associated(priv) && priv->last_scan_jiffies && |
3213 | time_after(priv->last_scan_jiffies + IWL_DELAY_NEXT_SCAN, jiffies)) { | 3214 | time_after(priv->last_scan_jiffies + IWL_DELAY_NEXT_SCAN, jiffies)) { |
3215 | IWL_DEBUG_SCAN("scan rejected: within previous scan period\n"); | ||
3214 | ret = -EAGAIN; | 3216 | ret = -EAGAIN; |
3215 | goto out_unlock; | 3217 | goto out_unlock; |
3216 | } | 3218 | } |