iwlagn: clean up ucode loading
authorJohannes Berg <johannes.berg@intel.com>
Tue, 5 Apr 2011 16:41:51 +0000 (09:41 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 7 Apr 2011 19:51:35 +0000 (15:51 -0400)
All agn devices behave the same, so there's no
need to go through function pointers for any
of the ucode loading functionality.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-1000.c
drivers/net/wireless/iwlwifi/iwl-2000.c
drivers/net/wireless/iwlwifi/iwl-5000.c
drivers/net/wireless/iwlwifi/iwl-6000.c
drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-core.h

index 2601b55..ad50063 100644 (file)
@@ -185,13 +185,10 @@ static struct iwl_lib_ops iwl1000_lib = {
        .rx_handler_setup = iwlagn_rx_handler_setup,
        .setup_deferred_work = iwlagn_setup_deferred_work,
        .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
-       .load_ucode = iwlagn_load_ucode,
        .dump_nic_event_log = iwl_dump_nic_event_log,
        .dump_nic_error_log = iwl_dump_nic_error_log,
        .dump_csr = iwl_dump_csr,
        .dump_fh = iwl_dump_fh,
-       .init_alive_start = iwlagn_init_alive_start,
-       .alive_notify = iwlagn_alive_notify,
        .send_tx_power = iwlagn_send_tx_power,
        .update_chain_flags = iwl_update_chain_flags,
        .apm_ops = {
index 55274a1..5e375d8 100644 (file)
@@ -266,13 +266,10 @@ static struct iwl_lib_ops iwl2000_lib = {
        .setup_deferred_work = iwlagn_bt_setup_deferred_work,
        .cancel_deferred_work = iwlagn_bt_cancel_deferred_work,
        .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
-       .load_ucode = iwlagn_load_ucode,
        .dump_nic_event_log = iwl_dump_nic_event_log,
        .dump_nic_error_log = iwl_dump_nic_error_log,
        .dump_csr = iwl_dump_csr,
        .dump_fh = iwl_dump_fh,
-       .init_alive_start = iwlagn_init_alive_start,
-       .alive_notify = iwlagn_alive_notify,
        .send_tx_power = iwlagn_send_tx_power,
        .update_chain_flags = iwl_update_chain_flags,
        .set_channel_switch = iwl2030_hw_channel_switch,
index 8cab357..0e1f0b5 100644 (file)
@@ -358,9 +358,6 @@ static struct iwl_lib_ops iwl5000_lib = {
        .dump_nic_error_log = iwl_dump_nic_error_log,
        .dump_csr = iwl_dump_csr,
        .dump_fh = iwl_dump_fh,
-       .load_ucode = iwlagn_load_ucode,
-       .init_alive_start = iwlagn_init_alive_start,
-       .alive_notify = iwlagn_alive_notify,
        .send_tx_power = iwlagn_send_tx_power,
        .update_chain_flags = iwl_update_chain_flags,
        .set_channel_switch = iwl5000_hw_channel_switch,
@@ -423,9 +420,6 @@ static struct iwl_lib_ops iwl5150_lib = {
        .dump_nic_event_log = iwl_dump_nic_event_log,
        .dump_nic_error_log = iwl_dump_nic_error_log,
        .dump_csr = iwl_dump_csr,
-       .load_ucode = iwlagn_load_ucode,
-       .init_alive_start = iwlagn_init_alive_start,
-       .alive_notify = iwlagn_alive_notify,
        .send_tx_power = iwlagn_send_tx_power,
        .update_chain_flags = iwl_update_chain_flags,
        .set_channel_switch = iwl5000_hw_channel_switch,
index 7ecfbbc..4d545e6 100644 (file)
@@ -294,13 +294,10 @@ static struct iwl_lib_ops iwl6000_lib = {
        .rx_handler_setup = iwlagn_rx_handler_setup,
        .setup_deferred_work = iwlagn_setup_deferred_work,
        .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
-       .load_ucode = iwlagn_load_ucode,
        .dump_nic_event_log = iwl_dump_nic_event_log,
        .dump_nic_error_log = iwl_dump_nic_error_log,
        .dump_csr = iwl_dump_csr,
        .dump_fh = iwl_dump_fh,
-       .init_alive_start = iwlagn_init_alive_start,
-       .alive_notify = iwlagn_alive_notify,
        .send_tx_power = iwlagn_send_tx_power,
        .update_chain_flags = iwl_update_chain_flags,
        .set_channel_switch = iwl6000_hw_channel_switch,
@@ -362,13 +359,10 @@ static struct iwl_lib_ops iwl6030_lib = {
        .setup_deferred_work = iwlagn_bt_setup_deferred_work,
        .cancel_deferred_work = iwlagn_bt_cancel_deferred_work,
        .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
-       .load_ucode = iwlagn_load_ucode,
        .dump_nic_event_log = iwl_dump_nic_event_log,
        .dump_nic_error_log = iwl_dump_nic_error_log,
        .dump_csr = iwl_dump_csr,
        .dump_fh = iwl_dump_fh,
-       .init_alive_start = iwlagn_init_alive_start,
-       .alive_notify = iwlagn_alive_notify,
        .send_tx_power = iwlagn_send_tx_power,
        .update_chain_flags = iwl_update_chain_flags,
        .set_channel_switch = iwl6000_hw_channel_switch,
index d807e5e..5d35e35 100644 (file)
@@ -318,7 +318,7 @@ void iwlagn_init_alive_start(struct iwl_priv *priv)
                goto restart;
        }
 
-       ret = priv->cfg->ops->lib->alive_notify(priv);
+       ret = iwlagn_alive_notify(priv);
        if (ret) {
                IWL_WARN(priv,
                        "Could not complete ALIVE transition: %d\n", ret);
index b701a03..c8cd333 100644 (file)
@@ -2248,7 +2248,7 @@ static void iwl_alive_start(struct iwl_priv *priv)
                goto restart;
        }
 
-       ret = priv->cfg->ops->lib->alive_notify(priv);
+       ret = iwlagn_alive_notify(priv);
        if (ret) {
                IWL_WARN(priv,
                        "Could not complete ALIVE transition [ntf]: %d\n", ret);
@@ -2581,7 +2581,7 @@ static int __iwl_up(struct iwl_priv *priv)
                /* load bootstrap state machine,
                 * load bootstrap program into processor's memory,
                 * prepare to load the "initialize" uCode */
-               ret = priv->cfg->ops->lib->load_ucode(priv);
+               ret = iwlagn_load_ucode(priv);
 
                if (ret) {
                        IWL_ERR(priv, "Unable to set up bootstrap uCode: %d\n",
@@ -2626,7 +2626,7 @@ static void iwl_bg_init_alive_start(struct work_struct *data)
                return;
        }
 
-       priv->cfg->ops->lib->init_alive_start(priv);
+       iwlagn_init_alive_start(priv);
        mutex_unlock(&priv->mutex);
 }
 
index 967b4c0..46c90b3 100644 (file)
@@ -177,14 +177,9 @@ struct iwl_lib_ops {
        void (*setup_deferred_work)(struct iwl_priv *priv);
        /* cancel deferred work */
        void (*cancel_deferred_work)(struct iwl_priv *priv);
-       /* alive notification after init uCode load */
-       void (*init_alive_start)(struct iwl_priv *priv);
-       /* alive notification */
-       int (*alive_notify)(struct iwl_priv *priv);
        /* check validity of rtc data address */
        int (*is_valid_rtc_data_addr)(u32 addr);
-       /* 1st ucode load */
-       int (*load_ucode)(struct iwl_priv *priv);
+
        int (*dump_nic_event_log)(struct iwl_priv *priv,
                                  bool full_log, char **buf, bool display);
        void (*dump_nic_error_log)(struct iwl_priv *priv);