Commit 681c0050 authored by Ron Rindjunsky's avatar Ron Rindjunsky Committed by John W. Linville

iwlwifi: allow consecutive scans in unassociated state

This patch allows consecutive scans requests when driver is in
unassociated state.
Signed-off-by: default avatarRon Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: default avatarEsti Kummer <ester.kummer@intel.com>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 7c0399d3
...@@ -3205,12 +3205,14 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t ssid_len) ...@@ -3205,12 +3205,14 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t ssid_len)
/* we don't schedule scan within next_scan_jiffies period */ /* we don't schedule scan within next_scan_jiffies period */
if (priv->next_scan_jiffies && if (priv->next_scan_jiffies &&
time_after(priv->next_scan_jiffies, jiffies)) { time_after(priv->next_scan_jiffies, jiffies)) {
IWL_DEBUG_SCAN("scan rejected: within next scan period\n");
ret = -EAGAIN; ret = -EAGAIN;
goto out_unlock; goto out_unlock;
} }
/* if we just finished scan ask for delay */ /* if we just finished scan ask for delay */
if (priv->last_scan_jiffies && if (iwl_is_associated(priv) && priv->last_scan_jiffies &&
time_after(priv->last_scan_jiffies + IWL_DELAY_NEXT_SCAN, jiffies)) { time_after(priv->last_scan_jiffies + IWL_DELAY_NEXT_SCAN, jiffies)) {
IWL_DEBUG_SCAN("scan rejected: within previous scan period\n");
ret = -EAGAIN; ret = -EAGAIN;
goto out_unlock; goto out_unlock;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment