aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2011-07-06 19:28:47 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2011-07-16 10:37:35 -0400
commite4305fe91f986aa3c56fbc18f0a8ecf05d65f26d (patch)
tree710ae5b68fc82cf78d96f59deddb98215d31d84f
parent90c300cbd89e76789dbff101a1cb1ec226af277f (diff)
iwlagn: another double indirect removed
Another clean up work after driver split Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c18
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h7
2 files changed, 5 insertions, 20 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index f6b309da6eb..5ab75242986 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -106,10 +106,8 @@ static void iwl6000_nic_config(struct iwl_priv *priv)
106 CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA); 106 CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA);
107 } 107 }
108 /* do additional nic configuration if needed */ 108 /* do additional nic configuration if needed */
109 if (priv->cfg->nic && 109 if (priv->cfg->additional_nic_config)
110 priv->cfg->nic->additional_nic_config) { 110 priv->cfg->additional_nic_config(priv);
111 priv->cfg->nic->additional_nic_config(priv);
112 }
113} 111}
114 112
115static struct iwl_sensitivity_ranges iwl6000_sensitivity = { 113static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
@@ -303,14 +301,6 @@ static struct iwl_lib_ops iwl6030_lib = {
303 .temperature = iwlagn_temperature, 301 .temperature = iwlagn_temperature,
304}; 302};
305 303
306static struct iwl_nic_ops iwl6050_nic_ops = {
307 .additional_nic_config = &iwl6050_additional_nic_config,
308};
309
310static struct iwl_nic_ops iwl6150_nic_ops = {
311 .additional_nic_config = &iwl6150_additional_nic_config,
312};
313
314static struct iwl_base_params iwl6000_base_params = { 304static struct iwl_base_params iwl6000_base_params = {
315 .eeprom_size = OTP_LOW_IMAGE_SIZE, 305 .eeprom_size = OTP_LOW_IMAGE_SIZE,
316 .num_of_queues = IWLAGN_NUM_QUEUES, 306 .num_of_queues = IWLAGN_NUM_QUEUES,
@@ -521,7 +511,7 @@ struct iwl_cfg iwl6000i_2bg_cfg = {
521 .valid_tx_ant = ANT_AB, /* .cfg overwrite */ \ 511 .valid_tx_ant = ANT_AB, /* .cfg overwrite */ \
522 .valid_rx_ant = ANT_AB, /* .cfg overwrite */ \ 512 .valid_rx_ant = ANT_AB, /* .cfg overwrite */ \
523 .lib = &iwl6000_lib, \ 513 .lib = &iwl6000_lib, \
524 .nic = &iwl6050_nic_ops, \ 514 .additional_nic_config = iwl6050_additional_nic_config, \
525 .eeprom_ver = EEPROM_6050_EEPROM_VERSION, \ 515 .eeprom_ver = EEPROM_6050_EEPROM_VERSION, \
526 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, \ 516 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, \
527 .base_params = &iwl6050_base_params, \ 517 .base_params = &iwl6050_base_params, \
@@ -545,7 +535,7 @@ struct iwl_cfg iwl6050_2abg_cfg = {
545 .ucode_api_max = IWL6050_UCODE_API_MAX, \ 535 .ucode_api_max = IWL6050_UCODE_API_MAX, \
546 .ucode_api_min = IWL6050_UCODE_API_MIN, \ 536 .ucode_api_min = IWL6050_UCODE_API_MIN, \
547 .lib = &iwl6000_lib, \ 537 .lib = &iwl6000_lib, \
548 .nic = &iwl6150_nic_ops, \ 538 .additional_nic_config = iwl6150_additional_nic_config, \
549 .eeprom_ver = EEPROM_6150_EEPROM_VERSION, \ 539 .eeprom_ver = EEPROM_6150_EEPROM_VERSION, \
550 .eeprom_calib_ver = EEPROM_6150_TX_POWER_VERSION, \ 540 .eeprom_calib_ver = EEPROM_6150_TX_POWER_VERSION, \
551 .base_params = &iwl6050_base_params, \ 541 .base_params = &iwl6050_base_params, \
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index d6d2760c7c3..28c21f4377c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -103,11 +103,6 @@ struct iwl_lib_ops {
103 void (*temperature)(struct iwl_priv *priv); 103 void (*temperature)(struct iwl_priv *priv);
104}; 104};
105 105
106/* NIC specific ops */
107struct iwl_nic_ops {
108 void (*additional_nic_config)(struct iwl_priv *priv);
109};
110
111struct iwl_mod_params { 106struct iwl_mod_params {
112 int sw_crypto; /* def: 0 = using hardware encryption */ 107 int sw_crypto; /* def: 0 = using hardware encryption */
113 int num_of_queues; /* def: HW dependent */ 108 int num_of_queues; /* def: HW dependent */
@@ -243,7 +238,7 @@ struct iwl_cfg {
243 u16 eeprom_ver; 238 u16 eeprom_ver;
244 u16 eeprom_calib_ver; 239 u16 eeprom_calib_ver;
245 const struct iwl_lib_ops *lib; 240 const struct iwl_lib_ops *lib;
246 const struct iwl_nic_ops *nic; 241 void (*additional_nic_config)(struct iwl_priv *priv);
247 /* params not likely to change within a device family */ 242 /* params not likely to change within a device family */
248 struct iwl_base_params *base_params; 243 struct iwl_base_params *base_params;
249 /* params likely to change within a device family */ 244 /* params likely to change within a device family */