diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-04-06 07:12:39 -0400 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-04-16 16:47:01 -0400 |
commit | 92ae80eec7ac642f249b7a2fc02f41441d128a62 (patch) | |
tree | be3a2a1fa54df6fa9b6ed95b862a1c746ade49fc /drivers/net/wireless/iwlwifi | |
parent | 6708dc863880777ffe5fc55c86bfd80f886f53d6 (diff) |
iwlwifi: remove next_scan_jiffies
This logic is just confusing, if anything it
belongs into mac80211. Also, even if we do
scan during the EAPOL handshake, that will
not cause any problems, just a short delay.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-scan.c | 20 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 5 |
4 files changed, 0 insertions, 35 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 73f5fc6c35d5..9d300b2d9fe3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -1867,7 +1867,6 @@ static inline void iwl_set_no_assoc(struct iwl_priv *priv) | |||
1867 | iwlcore_commit_rxon(priv); | 1867 | iwlcore_commit_rxon(priv); |
1868 | } | 1868 | } |
1869 | 1869 | ||
1870 | #define IWL_DELAY_NEXT_SCAN_AFTER_ASSOC (HZ*6) | ||
1871 | void iwl_bss_info_changed(struct ieee80211_hw *hw, | 1870 | void iwl_bss_info_changed(struct ieee80211_hw *hw, |
1872 | struct ieee80211_vif *vif, | 1871 | struct ieee80211_vif *vif, |
1873 | struct ieee80211_bss_conf *bss_conf, | 1872 | struct ieee80211_bss_conf *bss_conf, |
@@ -1988,14 +1987,6 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw, | |||
1988 | 1987 | ||
1989 | iwl_led_associate(priv); | 1988 | iwl_led_associate(priv); |
1990 | 1989 | ||
1991 | /* | ||
1992 | * We have just associated, don't start scan too early | ||
1993 | * leave time for EAPOL exchange to complete. | ||
1994 | * | ||
1995 | * XXX: do this in mac80211 | ||
1996 | */ | ||
1997 | priv->next_scan_jiffies = jiffies + | ||
1998 | IWL_DELAY_NEXT_SCAN_AFTER_ASSOC; | ||
1999 | if (!iwl_is_rfkill(priv)) | 1990 | if (!iwl_is_rfkill(priv)) |
2000 | priv->cfg->ops->lib->post_associate(priv); | 1991 | priv->cfg->ops->lib->post_associate(priv); |
2001 | } else | 1992 | } else |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index ee4cb028e138..f2d4ca5b132a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -1049,7 +1049,6 @@ struct iwl_priv { | |||
1049 | struct iwl_calib_result calib_results[IWL_CALIB_MAX]; | 1049 | struct iwl_calib_result calib_results[IWL_CALIB_MAX]; |
1050 | 1050 | ||
1051 | /* Scan related variables */ | 1051 | /* Scan related variables */ |
1052 | unsigned long next_scan_jiffies; | ||
1053 | unsigned long scan_start; | 1052 | unsigned long scan_start; |
1054 | unsigned long scan_pass_start; | 1053 | unsigned long scan_pass_start; |
1055 | unsigned long scan_start_tsf; | 1054 | unsigned long scan_start_tsf; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index 7982b1930763..e45b49ada9fa 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
@@ -199,9 +199,6 @@ static void iwl_rx_scan_results_notif(struct iwl_priv *priv, | |||
199 | le32_to_cpu(notif->statistics[0]), | 199 | le32_to_cpu(notif->statistics[0]), |
200 | le32_to_cpu(notif->tsf_low) - priv->scan_start_tsf); | 200 | le32_to_cpu(notif->tsf_low) - priv->scan_start_tsf); |
201 | #endif | 201 | #endif |
202 | |||
203 | if (!priv->is_internal_short_scan) | ||
204 | priv->next_scan_jiffies = 0; | ||
205 | } | 202 | } |
206 | 203 | ||
207 | /* Service SCAN_COMPLETE_NOTIFICATION (0x84) */ | 204 | /* Service SCAN_COMPLETE_NOTIFICATION (0x84) */ |
@@ -234,9 +231,6 @@ static void iwl_rx_scan_complete_notif(struct iwl_priv *priv, | |||
234 | if (test_and_clear_bit(STATUS_SCAN_ABORTING, &priv->status)) | 231 | if (test_and_clear_bit(STATUS_SCAN_ABORTING, &priv->status)) |
235 | IWL_DEBUG_INFO(priv, "Aborted scan completed.\n"); | 232 | IWL_DEBUG_INFO(priv, "Aborted scan completed.\n"); |
236 | 233 | ||
237 | if (!priv->is_internal_short_scan) | ||
238 | priv->next_scan_jiffies = 0; | ||
239 | |||
240 | IWL_DEBUG_INFO(priv, "Setting scan to off\n"); | 234 | IWL_DEBUG_INFO(priv, "Setting scan to off\n"); |
241 | 235 | ||
242 | clear_bit(STATUS_SCANNING, &priv->status); | 236 | clear_bit(STATUS_SCANNING, &priv->status); |
@@ -462,8 +456,6 @@ static int iwl_scan_initiate(struct iwl_priv *priv) | |||
462 | return 0; | 456 | return 0; |
463 | } | 457 | } |
464 | 458 | ||
465 | #define IWL_DELAY_NEXT_SCAN (HZ*2) | ||
466 | |||
467 | int iwl_mac_hw_scan(struct ieee80211_hw *hw, | 459 | int iwl_mac_hw_scan(struct ieee80211_hw *hw, |
468 | struct cfg80211_scan_request *req) | 460 | struct cfg80211_scan_request *req) |
469 | { | 461 | { |
@@ -497,18 +489,6 @@ int iwl_mac_hw_scan(struct ieee80211_hw *hw, | |||
497 | goto out_unlock; | 489 | goto out_unlock; |
498 | } | 490 | } |
499 | 491 | ||
500 | /* We don't schedule scan within next_scan_jiffies period. | ||
501 | * Avoid scanning during possible EAPOL exchange, return | ||
502 | * success immediately. | ||
503 | */ | ||
504 | if (priv->next_scan_jiffies && | ||
505 | time_after(priv->next_scan_jiffies, jiffies)) { | ||
506 | IWL_DEBUG_SCAN(priv, "scan rejected: within next scan period\n"); | ||
507 | queue_work(priv->workqueue, &priv->scan_completed); | ||
508 | ret = 0; | ||
509 | goto out_unlock; | ||
510 | } | ||
511 | |||
512 | /* mac80211 will only ask for one band at a time */ | 492 | /* mac80211 will only ask for one band at a time */ |
513 | priv->scan_band = req->channels[0]->band; | 493 | priv->scan_band = req->channels[0]->band; |
514 | priv->scan_request = req; | 494 | priv->scan_request = req; |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index e26669558fc2..af32359400b3 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -3048,8 +3048,6 @@ static void iwl3945_bg_rx_replenish(struct work_struct *data) | |||
3048 | mutex_unlock(&priv->mutex); | 3048 | mutex_unlock(&priv->mutex); |
3049 | } | 3049 | } |
3050 | 3050 | ||
3051 | #define IWL_DELAY_NEXT_SCAN (HZ*2) | ||
3052 | |||
3053 | void iwl3945_post_associate(struct iwl_priv *priv) | 3051 | void iwl3945_post_associate(struct iwl_priv *priv) |
3054 | { | 3052 | { |
3055 | int rc = 0; | 3053 | int rc = 0; |
@@ -3134,9 +3132,6 @@ void iwl3945_post_associate(struct iwl_priv *priv) | |||
3134 | __func__, priv->iw_mode); | 3132 | __func__, priv->iw_mode); |
3135 | break; | 3133 | break; |
3136 | } | 3134 | } |
3137 | |||
3138 | /* we have just associated, don't start scan too early */ | ||
3139 | priv->next_scan_jiffies = jiffies + IWL_DELAY_NEXT_SCAN; | ||
3140 | } | 3135 | } |
3141 | 3136 | ||
3142 | /***************************************************************************** | 3137 | /***************************************************************************** |