aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-scan.c
diff options
context:
space:
mode:
authorHenry Zhangh <hongx.c.zhang@intel.com>2010-01-22 17:22:44 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-01-25 16:36:20 -0500
commit220575f78fb0b8d2a1c41cd28115d52ae8d132ee (patch)
treec73f41cfeeb7c2e28bf826d750570b0382a4b4ed /drivers/net/wireless/iwlwifi/iwl-scan.c
parentafbdd69af0e6a0c40676d4d4b94a0a4414708eaa (diff)
iwlwifi: Fix A band scanning when associated
This patch allows A band to be scanned when driver is associated to AP. Scan mechanism is that mac80211/cfg80211 requests driver to scan G band first and then immediately to scan A band. Original code require driver to wait for 2 seconds after any scan before another scan will be performed. This caused driver to service G band scan request from mac80211/cfg80211 but deny the A band scan request. Signed-off-by: Henry Zhangh <hongx.c.zhang@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@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.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index fd6bafbddfca..07fabbbfd567 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -192,18 +192,15 @@ static void iwl_rx_scan_results_notif(struct iwl_priv *priv,
192 IWL_DEBUG_SCAN(priv, "Scan ch.res: " 192 IWL_DEBUG_SCAN(priv, "Scan ch.res: "
193 "%d [802.11%s] " 193 "%d [802.11%s] "
194 "(TSF: 0x%08X:%08X) - %d " 194 "(TSF: 0x%08X:%08X) - %d "
195 "elapsed=%lu usec (%dms since last)\n", 195 "elapsed=%lu usec\n",
196 notif->channel, 196 notif->channel,
197 notif->band ? "bg" : "a", 197 notif->band ? "bg" : "a",
198 le32_to_cpu(notif->tsf_high), 198 le32_to_cpu(notif->tsf_high),
199 le32_to_cpu(notif->tsf_low), 199 le32_to_cpu(notif->tsf_low),
200 le32_to_cpu(notif->statistics[0]), 200 le32_to_cpu(notif->statistics[0]),
201 le32_to_cpu(notif->tsf_low) - priv->scan_start_tsf, 201 le32_to_cpu(notif->tsf_low) - priv->scan_start_tsf);
202 jiffies_to_msecs(elapsed_jiffies
203 (priv->last_scan_jiffies, jiffies)));
204#endif 202#endif
205 203
206 priv->last_scan_jiffies = jiffies;
207 priv->next_scan_jiffies = 0; 204 priv->next_scan_jiffies = 0;
208} 205}
209 206
@@ -250,7 +247,6 @@ static void iwl_rx_scan_complete_notif(struct iwl_priv *priv,
250 goto reschedule; 247 goto reschedule;
251 } 248 }
252 249
253 priv->last_scan_jiffies = jiffies;
254 priv->next_scan_jiffies = 0; 250 priv->next_scan_jiffies = 0;
255 IWL_DEBUG_INFO(priv, "Setting scan to off\n"); 251 IWL_DEBUG_INFO(priv, "Setting scan to off\n");
256 252
@@ -528,15 +524,6 @@ int iwl_mac_hw_scan(struct ieee80211_hw *hw,
528 goto out_unlock; 524 goto out_unlock;
529 } 525 }
530 526
531 /* if we just finished scan ask for delay */
532 if (iwl_is_associated(priv) && priv->last_scan_jiffies &&
533 time_after(priv->last_scan_jiffies + IWL_DELAY_NEXT_SCAN, jiffies)) {
534 IWL_DEBUG_SCAN(priv, "scan rejected: within previous scan period\n");
535 queue_work(priv->workqueue, &priv->scan_completed);
536 ret = 0;
537 goto out_unlock;
538 }
539
540 priv->scan_bands = 0; 527 priv->scan_bands = 0;
541 for (i = 0; i < req->n_channels; i++) 528 for (i = 0; i < req->n_channels; i++)
542 priv->scan_bands |= BIT(req->channels[i]->band); 529 priv->scan_bands |= BIT(req->channels[i]->band);