diff options
-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 | } |