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 2601b552c6fa699350886abd4f23e1857a3abd88..ad500631a407658ea3363720315650fe3e1e8a69 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 55274a14af01b33aaab880568320f43444d09a6b..5e375d8089c44be2ed9234c325606defa7e4d432 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 8cab3571047d85c595638105a2450c537e3452a8..0e1f0b50f8e86e7d358259fa4b9815fa73494878 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 7ecfbbc9457a3cb63c1395822606a48955886a33..4d545e62e5c76ecf82d043925ddd27baee4b5956 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 d807e5e2b7180056639fd0b012eb775865568b17..5d35e3504516b1d053db1646bcb58c2527123e5e 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 b701a03e9ebf614a6a95264049895d3d884cc720..c8cd33387a59409da8fe11756df0382668ac2b5d 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 967b4c008bc018dc155bd04f51d25d37d7b7b8e4..46c90b3cc30a53316175818b15ab01221fa123d7 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);