aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-04-05 12:41:51 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-04-07 15:51:35 -0400
commit7102762ef0ef330ab0601b6c3bc92bf9be5b1317 (patch)
treecbe94cb4e340ff815fac93dc4ed9c378c1a332c0
parent2dedbf58b2edbe940d370845dbf4210f1ddd2b31 (diff)
iwlagn: clean up ucode loading
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>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-1000.c3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-2000.c3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-ucode.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h7
7 files changed, 5 insertions, 28 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index 2601b552c6fa..ad500631a407 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -185,13 +185,10 @@ static struct iwl_lib_ops iwl1000_lib = {
185 .rx_handler_setup = iwlagn_rx_handler_setup, 185 .rx_handler_setup = iwlagn_rx_handler_setup,
186 .setup_deferred_work = iwlagn_setup_deferred_work, 186 .setup_deferred_work = iwlagn_setup_deferred_work,
187 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr, 187 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
188 .load_ucode = iwlagn_load_ucode,
189 .dump_nic_event_log = iwl_dump_nic_event_log, 188 .dump_nic_event_log = iwl_dump_nic_event_log,
190 .dump_nic_error_log = iwl_dump_nic_error_log, 189 .dump_nic_error_log = iwl_dump_nic_error_log,
191 .dump_csr = iwl_dump_csr, 190 .dump_csr = iwl_dump_csr,
192 .dump_fh = iwl_dump_fh, 191 .dump_fh = iwl_dump_fh,
193 .init_alive_start = iwlagn_init_alive_start,
194 .alive_notify = iwlagn_alive_notify,
195 .send_tx_power = iwlagn_send_tx_power, 192 .send_tx_power = iwlagn_send_tx_power,
196 .update_chain_flags = iwl_update_chain_flags, 193 .update_chain_flags = iwl_update_chain_flags,
197 .apm_ops = { 194 .apm_ops = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c
index 55274a14af01..5e375d8089c4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-2000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-2000.c
@@ -266,13 +266,10 @@ static struct iwl_lib_ops iwl2000_lib = {
266 .setup_deferred_work = iwlagn_bt_setup_deferred_work, 266 .setup_deferred_work = iwlagn_bt_setup_deferred_work,
267 .cancel_deferred_work = iwlagn_bt_cancel_deferred_work, 267 .cancel_deferred_work = iwlagn_bt_cancel_deferred_work,
268 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr, 268 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
269 .load_ucode = iwlagn_load_ucode,
270 .dump_nic_event_log = iwl_dump_nic_event_log, 269 .dump_nic_event_log = iwl_dump_nic_event_log,
271 .dump_nic_error_log = iwl_dump_nic_error_log, 270 .dump_nic_error_log = iwl_dump_nic_error_log,
272 .dump_csr = iwl_dump_csr, 271 .dump_csr = iwl_dump_csr,
273 .dump_fh = iwl_dump_fh, 272 .dump_fh = iwl_dump_fh,
274 .init_alive_start = iwlagn_init_alive_start,
275 .alive_notify = iwlagn_alive_notify,
276 .send_tx_power = iwlagn_send_tx_power, 273 .send_tx_power = iwlagn_send_tx_power,
277 .update_chain_flags = iwl_update_chain_flags, 274 .update_chain_flags = iwl_update_chain_flags,
278 .set_channel_switch = iwl2030_hw_channel_switch, 275 .set_channel_switch = iwl2030_hw_channel_switch,
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 8cab3571047d..0e1f0b50f8e8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -358,9 +358,6 @@ static struct iwl_lib_ops iwl5000_lib = {
358 .dump_nic_error_log = iwl_dump_nic_error_log, 358 .dump_nic_error_log = iwl_dump_nic_error_log,
359 .dump_csr = iwl_dump_csr, 359 .dump_csr = iwl_dump_csr,
360 .dump_fh = iwl_dump_fh, 360 .dump_fh = iwl_dump_fh,
361 .load_ucode = iwlagn_load_ucode,
362 .init_alive_start = iwlagn_init_alive_start,
363 .alive_notify = iwlagn_alive_notify,
364 .send_tx_power = iwlagn_send_tx_power, 361 .send_tx_power = iwlagn_send_tx_power,
365 .update_chain_flags = iwl_update_chain_flags, 362 .update_chain_flags = iwl_update_chain_flags,
366 .set_channel_switch = iwl5000_hw_channel_switch, 363 .set_channel_switch = iwl5000_hw_channel_switch,
@@ -423,9 +420,6 @@ static struct iwl_lib_ops iwl5150_lib = {
423 .dump_nic_event_log = iwl_dump_nic_event_log, 420 .dump_nic_event_log = iwl_dump_nic_event_log,
424 .dump_nic_error_log = iwl_dump_nic_error_log, 421 .dump_nic_error_log = iwl_dump_nic_error_log,
425 .dump_csr = iwl_dump_csr, 422 .dump_csr = iwl_dump_csr,
426 .load_ucode = iwlagn_load_ucode,
427 .init_alive_start = iwlagn_init_alive_start,
428 .alive_notify = iwlagn_alive_notify,
429 .send_tx_power = iwlagn_send_tx_power, 423 .send_tx_power = iwlagn_send_tx_power,
430 .update_chain_flags = iwl_update_chain_flags, 424 .update_chain_flags = iwl_update_chain_flags,
431 .set_channel_switch = iwl5000_hw_channel_switch, 425 .set_channel_switch = iwl5000_hw_channel_switch,
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index 7ecfbbc9457a..4d545e62e5c7 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -294,13 +294,10 @@ static struct iwl_lib_ops iwl6000_lib = {
294 .rx_handler_setup = iwlagn_rx_handler_setup, 294 .rx_handler_setup = iwlagn_rx_handler_setup,
295 .setup_deferred_work = iwlagn_setup_deferred_work, 295 .setup_deferred_work = iwlagn_setup_deferred_work,
296 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr, 296 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
297 .load_ucode = iwlagn_load_ucode,
298 .dump_nic_event_log = iwl_dump_nic_event_log, 297 .dump_nic_event_log = iwl_dump_nic_event_log,
299 .dump_nic_error_log = iwl_dump_nic_error_log, 298 .dump_nic_error_log = iwl_dump_nic_error_log,
300 .dump_csr = iwl_dump_csr, 299 .dump_csr = iwl_dump_csr,
301 .dump_fh = iwl_dump_fh, 300 .dump_fh = iwl_dump_fh,
302 .init_alive_start = iwlagn_init_alive_start,
303 .alive_notify = iwlagn_alive_notify,
304 .send_tx_power = iwlagn_send_tx_power, 301 .send_tx_power = iwlagn_send_tx_power,
305 .update_chain_flags = iwl_update_chain_flags, 302 .update_chain_flags = iwl_update_chain_flags,
306 .set_channel_switch = iwl6000_hw_channel_switch, 303 .set_channel_switch = iwl6000_hw_channel_switch,
@@ -362,13 +359,10 @@ static struct iwl_lib_ops iwl6030_lib = {
362 .setup_deferred_work = iwlagn_bt_setup_deferred_work, 359 .setup_deferred_work = iwlagn_bt_setup_deferred_work,
363 .cancel_deferred_work = iwlagn_bt_cancel_deferred_work, 360 .cancel_deferred_work = iwlagn_bt_cancel_deferred_work,
364 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr, 361 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
365 .load_ucode = iwlagn_load_ucode,
366 .dump_nic_event_log = iwl_dump_nic_event_log, 362 .dump_nic_event_log = iwl_dump_nic_event_log,
367 .dump_nic_error_log = iwl_dump_nic_error_log, 363 .dump_nic_error_log = iwl_dump_nic_error_log,
368 .dump_csr = iwl_dump_csr, 364 .dump_csr = iwl_dump_csr,
369 .dump_fh = iwl_dump_fh, 365 .dump_fh = iwl_dump_fh,
370 .init_alive_start = iwlagn_init_alive_start,
371 .alive_notify = iwlagn_alive_notify,
372 .send_tx_power = iwlagn_send_tx_power, 366 .send_tx_power = iwlagn_send_tx_power,
373 .update_chain_flags = iwl_update_chain_flags, 367 .update_chain_flags = iwl_update_chain_flags,
374 .set_channel_switch = iwl6000_hw_channel_switch, 368 .set_channel_switch = iwl6000_hw_channel_switch,
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
index d807e5e2b718..5d35e3504516 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
@@ -318,7 +318,7 @@ void iwlagn_init_alive_start(struct iwl_priv *priv)
318 goto restart; 318 goto restart;
319 } 319 }
320 320
321 ret = priv->cfg->ops->lib->alive_notify(priv); 321 ret = iwlagn_alive_notify(priv);
322 if (ret) { 322 if (ret) {
323 IWL_WARN(priv, 323 IWL_WARN(priv,
324 "Could not complete ALIVE transition: %d\n", ret); 324 "Could not complete ALIVE transition: %d\n", ret);
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index b701a03e9ebf..c8cd33387a59 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2248,7 +2248,7 @@ static void iwl_alive_start(struct iwl_priv *priv)
2248 goto restart; 2248 goto restart;
2249 } 2249 }
2250 2250
2251 ret = priv->cfg->ops->lib->alive_notify(priv); 2251 ret = iwlagn_alive_notify(priv);
2252 if (ret) { 2252 if (ret) {
2253 IWL_WARN(priv, 2253 IWL_WARN(priv,
2254 "Could not complete ALIVE transition [ntf]: %d\n", ret); 2254 "Could not complete ALIVE transition [ntf]: %d\n", ret);
@@ -2581,7 +2581,7 @@ static int __iwl_up(struct iwl_priv *priv)
2581 /* load bootstrap state machine, 2581 /* load bootstrap state machine,
2582 * load bootstrap program into processor's memory, 2582 * load bootstrap program into processor's memory,
2583 * prepare to load the "initialize" uCode */ 2583 * prepare to load the "initialize" uCode */
2584 ret = priv->cfg->ops->lib->load_ucode(priv); 2584 ret = iwlagn_load_ucode(priv);
2585 2585
2586 if (ret) { 2586 if (ret) {
2587 IWL_ERR(priv, "Unable to set up bootstrap uCode: %d\n", 2587 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)
2626 return; 2626 return;
2627 } 2627 }
2628 2628
2629 priv->cfg->ops->lib->init_alive_start(priv); 2629 iwlagn_init_alive_start(priv);
2630 mutex_unlock(&priv->mutex); 2630 mutex_unlock(&priv->mutex);
2631} 2631}
2632 2632
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 967b4c008bc0..46c90b3cc30a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -177,14 +177,9 @@ struct iwl_lib_ops {
177 void (*setup_deferred_work)(struct iwl_priv *priv); 177 void (*setup_deferred_work)(struct iwl_priv *priv);
178 /* cancel deferred work */ 178 /* cancel deferred work */
179 void (*cancel_deferred_work)(struct iwl_priv *priv); 179 void (*cancel_deferred_work)(struct iwl_priv *priv);
180 /* alive notification after init uCode load */
181 void (*init_alive_start)(struct iwl_priv *priv);
182 /* alive notification */
183 int (*alive_notify)(struct iwl_priv *priv);
184 /* check validity of rtc data address */ 180 /* check validity of rtc data address */
185 int (*is_valid_rtc_data_addr)(u32 addr); 181 int (*is_valid_rtc_data_addr)(u32 addr);
186 /* 1st ucode load */ 182
187 int (*load_ucode)(struct iwl_priv *priv);
188 int (*dump_nic_event_log)(struct iwl_priv *priv, 183 int (*dump_nic_event_log)(struct iwl_priv *priv,
189 bool full_log, char **buf, bool display); 184 bool full_log, char **buf, bool display);
190 void (*dump_nic_error_log)(struct iwl_priv *priv); 185 void (*dump_nic_error_log)(struct iwl_priv *priv);