diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-10-06 04:05:32 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-10-06 18:14:58 -0400 |
commit | eedda3670ea8e6d7649e3c8847759b0a6e532f8d (patch) | |
tree | 371875181ec3d4422ab365f232165b8413a4cb7d /drivers/net | |
parent | 5118303f7cc0520ce2969ea3d890dc05d586ceb2 (diff) |
iwlwifi: remove STATUS_CONF_PENDING in scanning
This patch removes STATUS_CONF_PENDING usage that called from
iwl4965_mac_config internally after scan completed.
It's called anyway from the mac80211 ieee80211_scan_completed():
if (local->hw_scanning) {
local->hw_scanning = false;
if (ieee80211_hw_config(local))
...
}
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 28 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-scan.c | 23 |
3 files changed, 22 insertions, 32 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 204abab76449..24a1aeb6448f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -2569,30 +2569,6 @@ static void iwl4965_post_associate(struct iwl_priv *priv) | |||
2569 | 2569 | ||
2570 | } | 2570 | } |
2571 | 2571 | ||
2572 | static int iwl4965_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf); | ||
2573 | |||
2574 | static void iwl_bg_scan_completed(struct work_struct *work) | ||
2575 | { | ||
2576 | struct iwl_priv *priv = | ||
2577 | container_of(work, struct iwl_priv, scan_completed); | ||
2578 | |||
2579 | IWL_DEBUG_SCAN("SCAN complete scan\n"); | ||
2580 | |||
2581 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | ||
2582 | return; | ||
2583 | |||
2584 | if (test_bit(STATUS_CONF_PENDING, &priv->status)) | ||
2585 | iwl4965_mac_config(priv->hw, ieee80211_get_hw_conf(priv->hw)); | ||
2586 | |||
2587 | ieee80211_scan_completed(priv->hw); | ||
2588 | |||
2589 | /* Since setting the TXPOWER may have been deferred while | ||
2590 | * performing the scan, fire one off */ | ||
2591 | mutex_lock(&priv->mutex); | ||
2592 | iwl_set_tx_power(priv, priv->tx_power_user_lmt, true); | ||
2593 | mutex_unlock(&priv->mutex); | ||
2594 | } | ||
2595 | |||
2596 | /***************************************************************************** | 2572 | /***************************************************************************** |
2597 | * | 2573 | * |
2598 | * mac80211 entry point functions | 2574 | * mac80211 entry point functions |
@@ -2812,7 +2788,6 @@ static int iwl4965_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *co | |||
2812 | if (unlikely(!priv->cfg->mod_params->disable_hw_scan && | 2788 | if (unlikely(!priv->cfg->mod_params->disable_hw_scan && |
2813 | test_bit(STATUS_SCANNING, &priv->status))) { | 2789 | test_bit(STATUS_SCANNING, &priv->status))) { |
2814 | IWL_DEBUG_MAC80211("leave - scanning\n"); | 2790 | IWL_DEBUG_MAC80211("leave - scanning\n"); |
2815 | set_bit(STATUS_CONF_PENDING, &priv->status); | ||
2816 | mutex_unlock(&priv->mutex); | 2791 | mutex_unlock(&priv->mutex); |
2817 | return 0; | 2792 | return 0; |
2818 | } | 2793 | } |
@@ -2898,7 +2873,6 @@ static int iwl4965_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *co | |||
2898 | IWL_DEBUG_MAC80211("leave\n"); | 2873 | IWL_DEBUG_MAC80211("leave\n"); |
2899 | 2874 | ||
2900 | out: | 2875 | out: |
2901 | clear_bit(STATUS_CONF_PENDING, &priv->status); | ||
2902 | mutex_unlock(&priv->mutex); | 2876 | mutex_unlock(&priv->mutex); |
2903 | return ret; | 2877 | return ret; |
2904 | } | 2878 | } |
@@ -4117,8 +4091,6 @@ static void iwl_setup_deferred_work(struct iwl_priv *priv) | |||
4117 | INIT_DELAYED_WORK(&priv->init_alive_start, iwl_bg_init_alive_start); | 4091 | INIT_DELAYED_WORK(&priv->init_alive_start, iwl_bg_init_alive_start); |
4118 | INIT_DELAYED_WORK(&priv->alive_start, iwl_bg_alive_start); | 4092 | INIT_DELAYED_WORK(&priv->alive_start, iwl_bg_alive_start); |
4119 | 4093 | ||
4120 | /* FIXME : remove when resolved PENDING */ | ||
4121 | INIT_WORK(&priv->scan_completed, iwl_bg_scan_completed); | ||
4122 | iwl_setup_scan_deferred_work(priv); | 4094 | iwl_setup_scan_deferred_work(priv); |
4123 | iwl_setup_power_deferred_work(priv); | 4095 | iwl_setup_power_deferred_work(priv); |
4124 | 4096 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 55a4b584ce07..288b6a800e03 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -333,8 +333,7 @@ void iwl_dump_nic_event_log(struct iwl_priv *priv); | |||
333 | #define STATUS_SCAN_HW 15 | 333 | #define STATUS_SCAN_HW 15 |
334 | #define STATUS_POWER_PMI 16 | 334 | #define STATUS_POWER_PMI 16 |
335 | #define STATUS_FW_ERROR 17 | 335 | #define STATUS_FW_ERROR 17 |
336 | #define STATUS_CONF_PENDING 18 | 336 | #define STATUS_MODE_PENDING 18 |
337 | #define STATUS_MODE_PENDING 19 | ||
338 | 337 | ||
339 | 338 | ||
340 | static inline int iwl_is_ready(struct iwl_priv *priv) | 339 | static inline int iwl_is_ready(struct iwl_priv *priv) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index 639904a7283d..3b0bee331a33 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
@@ -916,10 +916,29 @@ static void iwl_bg_abort_scan(struct work_struct *work) | |||
916 | mutex_unlock(&priv->mutex); | 916 | mutex_unlock(&priv->mutex); |
917 | } | 917 | } |
918 | 918 | ||
919 | static void iwl_bg_scan_completed(struct work_struct *work) | ||
920 | { | ||
921 | struct iwl_priv *priv = | ||
922 | container_of(work, struct iwl_priv, scan_completed); | ||
923 | |||
924 | IWL_DEBUG_SCAN("SCAN complete scan\n"); | ||
925 | |||
926 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | ||
927 | return; | ||
928 | |||
929 | ieee80211_scan_completed(priv->hw); | ||
930 | |||
931 | /* Since setting the TXPOWER may have been deferred while | ||
932 | * performing the scan, fire one off */ | ||
933 | mutex_lock(&priv->mutex); | ||
934 | iwl_set_tx_power(priv, priv->tx_power_user_lmt, true); | ||
935 | mutex_unlock(&priv->mutex); | ||
936 | } | ||
937 | |||
938 | |||
919 | void iwl_setup_scan_deferred_work(struct iwl_priv *priv) | 939 | void iwl_setup_scan_deferred_work(struct iwl_priv *priv) |
920 | { | 940 | { |
921 | /* FIXME: move here when resolved PENDING | 941 | INIT_WORK(&priv->scan_completed, iwl_bg_scan_completed); |
922 | * INIT_WORK(&priv->scan_completed, iwl_bg_scan_completed); */ | ||
923 | INIT_WORK(&priv->request_scan, iwl_bg_request_scan); | 942 | INIT_WORK(&priv->request_scan, iwl_bg_request_scan); |
924 | INIT_WORK(&priv->abort_scan, iwl_bg_abort_scan); | 943 | INIT_WORK(&priv->abort_scan, iwl_bg_abort_scan); |
925 | INIT_DELAYED_WORK(&priv->scan_check, iwl_bg_scan_check); | 944 | INIT_DELAYED_WORK(&priv->scan_check, iwl_bg_scan_check); |