Skip to content

Commit

Permalink
iwlagn: another double indirect removed
Browse files Browse the repository at this point in the history
Another clean up work after driver split

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
  • Loading branch information
Wey-Yi Guy committed Jul 16, 2011
1 parent 90c300c commit e4305fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
18 changes: 4 additions & 14 deletions drivers/net/wireless/iwlwifi/iwl-6000.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,8 @@ static void iwl6000_nic_config(struct iwl_priv *priv)
CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA);
}
/* do additional nic configuration if needed */
if (priv->cfg->nic &&
priv->cfg->nic->additional_nic_config) {
priv->cfg->nic->additional_nic_config(priv);
}
if (priv->cfg->additional_nic_config)
priv->cfg->additional_nic_config(priv);
}

static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
Expand Down Expand Up @@ -303,14 +301,6 @@ static struct iwl_lib_ops iwl6030_lib = {
.temperature = iwlagn_temperature,
};

static struct iwl_nic_ops iwl6050_nic_ops = {
.additional_nic_config = &iwl6050_additional_nic_config,
};

static struct iwl_nic_ops iwl6150_nic_ops = {
.additional_nic_config = &iwl6150_additional_nic_config,
};

static struct iwl_base_params iwl6000_base_params = {
.eeprom_size = OTP_LOW_IMAGE_SIZE,
.num_of_queues = IWLAGN_NUM_QUEUES,
Expand Down Expand Up @@ -521,7 +511,7 @@ struct iwl_cfg iwl6000i_2bg_cfg = {
.valid_tx_ant = ANT_AB, /* .cfg overwrite */ \
.valid_rx_ant = ANT_AB, /* .cfg overwrite */ \
.lib = &iwl6000_lib, \
.nic = &iwl6050_nic_ops, \
.additional_nic_config = iwl6050_additional_nic_config, \
.eeprom_ver = EEPROM_6050_EEPROM_VERSION, \
.eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, \
.base_params = &iwl6050_base_params, \
Expand All @@ -545,7 +535,7 @@ struct iwl_cfg iwl6050_2abg_cfg = {
.ucode_api_max = IWL6050_UCODE_API_MAX, \
.ucode_api_min = IWL6050_UCODE_API_MIN, \
.lib = &iwl6000_lib, \
.nic = &iwl6150_nic_ops, \
.additional_nic_config = iwl6150_additional_nic_config, \
.eeprom_ver = EEPROM_6150_EEPROM_VERSION, \
.eeprom_calib_ver = EEPROM_6150_TX_POWER_VERSION, \
.base_params = &iwl6050_base_params, \
Expand Down
7 changes: 1 addition & 6 deletions drivers/net/wireless/iwlwifi/iwl-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@ struct iwl_lib_ops {
void (*temperature)(struct iwl_priv *priv);
};

/* NIC specific ops */
struct iwl_nic_ops {
void (*additional_nic_config)(struct iwl_priv *priv);
};

struct iwl_mod_params {
int sw_crypto; /* def: 0 = using hardware encryption */
int num_of_queues; /* def: HW dependent */
Expand Down Expand Up @@ -243,7 +238,7 @@ struct iwl_cfg {
u16 eeprom_ver;
u16 eeprom_calib_ver;
const struct iwl_lib_ops *lib;
const struct iwl_nic_ops *nic;
void (*additional_nic_config)(struct iwl_priv *priv);
/* params not likely to change within a device family */
struct iwl_base_params *base_params;
/* params likely to change within a device family */
Expand Down

0 comments on commit e4305fe

Please sign in to comment.