aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-4965.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2008-06-11 21:46:53 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-14 12:18:04 -0400
commit4e39317df0f9e48919130574238319f9a445e6e3 (patch)
tree7983603d7798c10f18372de514ab9b2a773d1f8b /drivers/net/wireless/iwlwifi/iwl-4965.c
parent16e727e866d739d7f02790c794410f6d9f1d720b (diff)
iwlwifi: clean up in setup/cancel deferred work
This patch makes some clean up in setup/cancel_deferred_work. iwl_setup_deferred_work does the work that is common to 4965 and 5000, then it calls to HW specific handlers. This patch also removes uneeded work_struct from iwl_priv. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> 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/wireless/iwlwifi/iwl-4965.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c33
1 files changed, 5 insertions, 28 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index e2c2d9f3edb5..be6b6ebc6bf8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -608,26 +608,6 @@ out:
608 608
609#define REG_RECALIB_PERIOD (60) 609#define REG_RECALIB_PERIOD (60)
610 610
611/**
612 * iwl4965_bg_statistics_periodic - Timer callback to queue statistics
613 *
614 * This callback is provided in order to send a statistics request.
615 *
616 * This timer function is continually reset to execute within
617 * REG_RECALIB_PERIOD seconds since the last STATISTICS_NOTIFICATION
618 * was received. We need to ensure we receive the statistics in order
619 * to update the temperature used for calibrating the TXPOWER.
620 */
621static void iwl4965_bg_statistics_periodic(unsigned long data)
622{
623 struct iwl_priv *priv = (struct iwl_priv *)data;
624
625 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
626 return;
627
628 iwl_send_statistics_request(priv, CMD_ASYNC);
629}
630
631void iwl4965_rf_kill_ct_config(struct iwl_priv *priv) 611void iwl4965_rf_kill_ct_config(struct iwl_priv *priv)
632{ 612{
633 struct iwl4965_ct_kill_config cmd; 613 struct iwl4965_ct_kill_config cmd;
@@ -3469,19 +3449,14 @@ static void iwl4965_rx_handler_setup(struct iwl_priv *priv)
3469 priv->rx_handlers[REPLY_COMPRESSED_BA] = iwl4965_rx_reply_compressed_ba; 3449 priv->rx_handlers[REPLY_COMPRESSED_BA] = iwl4965_rx_reply_compressed_ba;
3470} 3450}
3471 3451
3472void iwl4965_hw_setup_deferred_work(struct iwl_priv *priv) 3452static void iwl4965_setup_deferred_work(struct iwl_priv *priv)
3473{ 3453{
3474 INIT_WORK(&priv->txpower_work, iwl4965_bg_txpower_work); 3454 INIT_WORK(&priv->txpower_work, iwl4965_bg_txpower_work);
3475 init_timer(&priv->statistics_periodic);
3476 priv->statistics_periodic.data = (unsigned long)priv;
3477 priv->statistics_periodic.function = iwl4965_bg_statistics_periodic;
3478} 3455}
3479 3456
3480void iwl4965_hw_cancel_deferred_work(struct iwl_priv *priv) 3457static void iwl4965_cancel_deferred_work(struct iwl_priv *priv)
3481{ 3458{
3482 del_timer_sync(&priv->statistics_periodic); 3459 cancel_work_sync(&priv->txpower_work);
3483
3484 cancel_delayed_work(&priv->init_alive_start);
3485} 3460}
3486 3461
3487 3462
@@ -3506,6 +3481,8 @@ static struct iwl_lib_ops iwl4965_lib = {
3506 .txq_agg_enable = iwl4965_txq_agg_enable, 3481 .txq_agg_enable = iwl4965_txq_agg_enable,
3507 .txq_agg_disable = iwl4965_txq_agg_disable, 3482 .txq_agg_disable = iwl4965_txq_agg_disable,
3508 .rx_handler_setup = iwl4965_rx_handler_setup, 3483 .rx_handler_setup = iwl4965_rx_handler_setup,
3484 .setup_deferred_work = iwl4965_setup_deferred_work,
3485 .cancel_deferred_work = iwl4965_cancel_deferred_work,
3509 .is_valid_rtc_data_addr = iwl4965_hw_valid_rtc_data_addr, 3486 .is_valid_rtc_data_addr = iwl4965_hw_valid_rtc_data_addr,
3510 .alive_notify = iwl4965_alive_notify, 3487 .alive_notify = iwl4965_alive_notify,
3511 .init_alive_start = iwl4965_init_alive_start, 3488 .init_alive_start = iwl4965_init_alive_start,