aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-01-21 09:07:17 -0500
committerReinette Chatre <reinette.chatre@intel.com>2010-01-29 14:13:57 -0500
commit80676518da523e926e70794ac2767829effcf3ba (patch)
tree163f0fba772390539773d8d4731e0eb788d3d488 /drivers/net/wireless/iwlwifi/iwl3945-base.c
parent9f1f3ceacb7e52d9bc0364b4f26ae418de79656f (diff)
iwlwifi: remove bg_up work
There's no need to queue a work struct from within a work struct, just move the code to execute directly. 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/iwl3945-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index cd42b5838b38..119da54116de 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -3033,18 +3033,6 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
3033 mutex_unlock(&priv->mutex); 3033 mutex_unlock(&priv->mutex);
3034} 3034}
3035 3035
3036static void iwl3945_bg_up(struct work_struct *data)
3037{
3038 struct iwl_priv *priv = container_of(data, struct iwl_priv, up);
3039
3040 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
3041 return;
3042
3043 mutex_lock(&priv->mutex);
3044 __iwl3945_up(priv);
3045 mutex_unlock(&priv->mutex);
3046}
3047
3048static void iwl3945_bg_restart(struct work_struct *data) 3036static void iwl3945_bg_restart(struct work_struct *data)
3049{ 3037{
3050 struct iwl_priv *priv = container_of(data, struct iwl_priv, restart); 3038 struct iwl_priv *priv = container_of(data, struct iwl_priv, restart);
@@ -3061,7 +3049,13 @@ static void iwl3945_bg_restart(struct work_struct *data)
3061 ieee80211_restart_hw(priv->hw); 3049 ieee80211_restart_hw(priv->hw);
3062 } else { 3050 } else {
3063 iwl3945_down(priv); 3051 iwl3945_down(priv);
3064 queue_work(priv->workqueue, &priv->up); 3052
3053 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
3054 return;
3055
3056 mutex_lock(&priv->mutex);
3057 __iwl3945_up(priv);
3058 mutex_unlock(&priv->mutex);
3065 } 3059 }
3066} 3060}
3067 3061
@@ -3782,7 +3776,6 @@ static void iwl3945_setup_deferred_work(struct iwl_priv *priv)
3782 3776
3783 init_waitqueue_head(&priv->wait_command_queue); 3777 init_waitqueue_head(&priv->wait_command_queue);
3784 3778
3785 INIT_WORK(&priv->up, iwl3945_bg_up);
3786 INIT_WORK(&priv->restart, iwl3945_bg_restart); 3779 INIT_WORK(&priv->restart, iwl3945_bg_restart);
3787 INIT_WORK(&priv->rx_replenish, iwl3945_bg_rx_replenish); 3780 INIT_WORK(&priv->rx_replenish, iwl3945_bg_rx_replenish);
3788 INIT_WORK(&priv->beacon_update, iwl3945_bg_beacon_update); 3781 INIT_WORK(&priv->beacon_update, iwl3945_bg_beacon_update);