diff options
author | Abhijeet Kolekar <abhijeet.kolekar@intel.com> | 2010-04-23 17:14:53 -0400 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-05-10 18:08:46 -0400 |
commit | 1e460535ab3978b7a23e08e9f556af2f84c43235 (patch) | |
tree | 278260326be7c5af183efe567c6c64ffabdd8300 /drivers/net | |
parent | 95b13014bb761a267db8bc1a47cbb35ddde587ef (diff) |
iwl3945: fix scan races
Port following patch to 3945.
"commit 90c4162ff59a3281b6d2f7206740be6217bd6758
Author: Johannes Berg <johannes.berg@intel.com>
Date: Wed Apr 7 00:21:36 2010 -0700
iwlwifi: fix scan races"
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-scan.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 72736094485..7deed865b14 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -515,6 +515,7 @@ int iwl_scan_cancel_timeout(struct iwl_priv *priv, unsigned long ms); | |||
515 | int iwl_mac_hw_scan(struct ieee80211_hw *hw, | 515 | int iwl_mac_hw_scan(struct ieee80211_hw *hw, |
516 | struct ieee80211_vif *vif, | 516 | struct ieee80211_vif *vif, |
517 | struct cfg80211_scan_request *req); | 517 | struct cfg80211_scan_request *req); |
518 | void iwl_bg_start_internal_scan(struct work_struct *work); | ||
518 | void iwl_internal_short_hw_scan(struct iwl_priv *priv); | 519 | void iwl_internal_short_hw_scan(struct iwl_priv *priv); |
519 | int iwl_force_reset(struct iwl_priv *priv, int mode); | 520 | int iwl_force_reset(struct iwl_priv *priv, int mode); |
520 | u16 iwl_fill_probe_req(struct iwl_priv *priv, struct ieee80211_mgmt *frame, | 521 | u16 iwl_fill_probe_req(struct iwl_priv *priv, struct ieee80211_mgmt *frame, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index 447c3018296..28e2d86ee05 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
@@ -367,7 +367,7 @@ void iwl_internal_short_hw_scan(struct iwl_priv *priv) | |||
367 | queue_work(priv->workqueue, &priv->start_internal_scan); | 367 | queue_work(priv->workqueue, &priv->start_internal_scan); |
368 | } | 368 | } |
369 | 369 | ||
370 | static void iwl_bg_start_internal_scan(struct work_struct *work) | 370 | void iwl_bg_start_internal_scan(struct work_struct *work) |
371 | { | 371 | { |
372 | struct iwl_priv *priv = | 372 | struct iwl_priv *priv = |
373 | container_of(work, struct iwl_priv, start_internal_scan); | 373 | container_of(work, struct iwl_priv, start_internal_scan); |
@@ -402,6 +402,7 @@ static void iwl_bg_start_internal_scan(struct work_struct *work) | |||
402 | unlock: | 402 | unlock: |
403 | mutex_unlock(&priv->mutex); | 403 | mutex_unlock(&priv->mutex); |
404 | } | 404 | } |
405 | EXPORT_SYMBOL(iwl_bg_start_internal_scan); | ||
405 | 406 | ||
406 | void iwl_bg_scan_check(struct work_struct *data) | 407 | void iwl_bg_scan_check(struct work_struct *data) |
407 | { | 408 | { |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 867d105c7f0..04cedef0b00 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -3739,6 +3739,7 @@ static void iwl3945_setup_deferred_work(struct iwl_priv *priv) | |||
3739 | INIT_DELAYED_WORK(&priv->_3945.rfkill_poll, iwl3945_rfkill_poll); | 3739 | INIT_DELAYED_WORK(&priv->_3945.rfkill_poll, iwl3945_rfkill_poll); |
3740 | INIT_WORK(&priv->scan_completed, iwl_bg_scan_completed); | 3740 | INIT_WORK(&priv->scan_completed, iwl_bg_scan_completed); |
3741 | INIT_WORK(&priv->abort_scan, iwl_bg_abort_scan); | 3741 | INIT_WORK(&priv->abort_scan, iwl_bg_abort_scan); |
3742 | INIT_WORK(&priv->start_internal_scan, iwl_bg_start_internal_scan); | ||
3742 | INIT_DELAYED_WORK(&priv->scan_check, iwl_bg_scan_check); | 3743 | INIT_DELAYED_WORK(&priv->scan_check, iwl_bg_scan_check); |
3743 | 3744 | ||
3744 | iwl3945_hw_setup_deferred_work(priv); | 3745 | iwl3945_hw_setup_deferred_work(priv); |
@@ -3761,6 +3762,7 @@ static void iwl3945_cancel_deferred_work(struct iwl_priv *priv) | |||
3761 | cancel_delayed_work_sync(&priv->init_alive_start); | 3762 | cancel_delayed_work_sync(&priv->init_alive_start); |
3762 | cancel_delayed_work(&priv->scan_check); | 3763 | cancel_delayed_work(&priv->scan_check); |
3763 | cancel_delayed_work(&priv->alive_start); | 3764 | cancel_delayed_work(&priv->alive_start); |
3765 | cancel_work_sync(&priv->start_internal_scan); | ||
3764 | cancel_work_sync(&priv->beacon_update); | 3766 | cancel_work_sync(&priv->beacon_update); |
3765 | if (priv->cfg->ops->lib->recover_from_tx_stall) | 3767 | if (priv->cfg->ops->lib->recover_from_tx_stall) |
3766 | del_timer_sync(&priv->monitor_recover); | 3768 | del_timer_sync(&priv->monitor_recover); |