Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 90c300cb authored by Wey-Yi Guy's avatar Wey-Yi Guy
Browse files

iwlagn: remove dual-indirect call to simply the code



After driver split, no need to make the code so complex

Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
parent e505c433
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -186,10 +186,6 @@ static struct iwl_lib_ops iwl1000_lib = {
	.temperature = iwlagn_temperature,
};

static const struct iwl_ops iwl1000_ops = {
	.lib = &iwl1000_lib,
};

static struct iwl_base_params iwl1000_base_params = {
	.num_of_queues = IWLAGN_NUM_QUEUES,
	.num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
@@ -217,7 +213,7 @@ static struct iwl_ht_params iwl1000_ht_params = {
	.ucode_api_min = IWL1000_UCODE_API_MIN,			\
	.eeprom_ver = EEPROM_1000_EEPROM_VERSION,		\
	.eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION,	\
	.ops = &iwl1000_ops,					\
	.lib = &iwl1000_lib,					\
	.base_params = &iwl1000_base_params,			\
	.led_mode = IWL_LED_BLINK

@@ -238,7 +234,7 @@ struct iwl_cfg iwl1000_bg_cfg = {
	.ucode_api_min = IWL100_UCODE_API_MIN,			\
	.eeprom_ver = EEPROM_1000_EEPROM_VERSION,		\
	.eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION,	\
	.ops = &iwl1000_ops,					\
	.lib = &iwl1000_lib,					\
	.base_params = &iwl1000_base_params,			\
	.led_mode = IWL_LED_RF_STATE,				\
	.rx_with_siso_diversity = true
+4 −20
Original line number Diff line number Diff line
@@ -208,22 +208,6 @@ static struct iwl_lib_ops iwl2030_lib = {
	.temperature = iwlagn_temperature,
};

static const struct iwl_ops iwl2000_ops = {
	.lib = &iwl2000_lib,
};

static const struct iwl_ops iwl2030_ops = {
	.lib = &iwl2030_lib,
};

static const struct iwl_ops iwl105_ops = {
	.lib = &iwl2000_lib,
};

static const struct iwl_ops iwl135_ops = {
	.lib = &iwl2030_lib,
};

static struct iwl_base_params iwl2000_base_params = {
	.eeprom_size = OTP_LOW_IMAGE_SIZE,
	.num_of_queues = IWLAGN_NUM_QUEUES,
@@ -282,7 +266,7 @@ static struct iwl_bt_params iwl2030_bt_params = {
	.ucode_api_min = IWL2000_UCODE_API_MIN,			\
	.eeprom_ver = EEPROM_2000_EEPROM_VERSION,		\
	.eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION,	\
	.ops = &iwl2000_ops,					\
	.lib = &iwl2000_lib,					\
	.base_params = &iwl2000_base_params,			\
	.need_dc_calib = true,					\
	.need_temp_offset_calib = true,				\
@@ -307,7 +291,7 @@ struct iwl_cfg iwl2000_2bg_cfg = {
	.ucode_api_min = IWL2030_UCODE_API_MIN,			\
	.eeprom_ver = EEPROM_2000_EEPROM_VERSION,		\
	.eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION,	\
	.ops = &iwl2030_ops,					\
	.lib = &iwl2030_lib,					\
	.base_params = &iwl2030_base_params,			\
	.bt_params = &iwl2030_bt_params,			\
	.need_dc_calib = true,					\
@@ -333,7 +317,7 @@ struct iwl_cfg iwl2030_2bg_cfg = {
	.ucode_api_min = IWL105_UCODE_API_MIN,			\
	.eeprom_ver = EEPROM_2000_EEPROM_VERSION,		\
	.eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION,	\
	.ops = &iwl105_ops,					\
	.lib = &iwl2000_lib,					\
	.base_params = &iwl2000_base_params,			\
	.need_dc_calib = true,					\
	.need_temp_offset_calib = true,				\
@@ -358,7 +342,7 @@ struct iwl_cfg iwl105_bgn_cfg = {
	.ucode_api_min = IWL135_UCODE_API_MIN,			\
	.eeprom_ver = EEPROM_2000_EEPROM_VERSION,		\
	.eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION,	\
	.ops = &iwl135_ops,					\
	.lib = &iwl2030_lib,					\
	.base_params = &iwl2030_base_params,			\
	.bt_params = &iwl2030_bt_params,			\
	.need_dc_calib = true,					\
+3 −11
Original line number Diff line number Diff line
@@ -360,14 +360,6 @@ static struct iwl_lib_ops iwl5150_lib = {
	.temperature = iwl5150_temperature,
};

static const struct iwl_ops iwl5000_ops = {
	.lib = &iwl5000_lib,
};

static const struct iwl_ops iwl5150_ops = {
	.lib = &iwl5150_lib,
};

static struct iwl_base_params iwl5000_base_params = {
	.eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
	.num_of_queues = IWLAGN_NUM_QUEUES,
@@ -390,7 +382,7 @@ static struct iwl_ht_params iwl5000_ht_params = {
	.ucode_api_min = IWL5000_UCODE_API_MIN,			\
	.eeprom_ver = EEPROM_5000_EEPROM_VERSION,		\
	.eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,	\
	.ops = &iwl5000_ops,					\
	.lib = &iwl5000_lib,					\
	.base_params = &iwl5000_base_params,			\
	.led_mode = IWL_LED_BLINK

@@ -433,7 +425,7 @@ struct iwl_cfg iwl5350_agn_cfg = {
	.ucode_api_min = IWL5000_UCODE_API_MIN,
	.eeprom_ver = EEPROM_5050_EEPROM_VERSION,
	.eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION,
	.ops = &iwl5000_ops,
	.lib = &iwl5000_lib,
	.base_params = &iwl5000_base_params,
	.ht_params = &iwl5000_ht_params,
	.led_mode = IWL_LED_BLINK,
@@ -446,7 +438,7 @@ struct iwl_cfg iwl5350_agn_cfg = {
	.ucode_api_min = IWL5150_UCODE_API_MIN,			\
	.eeprom_ver = EEPROM_5050_EEPROM_VERSION,		\
	.eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION,	\
	.ops = &iwl5150_ops,					\
	.lib = &iwl5150_lib,					\
	.base_params = &iwl5000_base_params,			\
	.need_dc_calib = true,					\
	.led_mode = IWL_LED_BLINK,				\
+11 −27
Original line number Diff line number Diff line
@@ -106,9 +106,9 @@ 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->ops->nic &&
		priv->cfg->ops->nic->additional_nic_config) {
			priv->cfg->ops->nic->additional_nic_config(priv);
	if (priv->cfg->nic &&
		priv->cfg->nic->additional_nic_config) {
			priv->cfg->nic->additional_nic_config(priv);
	}
}

@@ -311,24 +311,6 @@ static struct iwl_nic_ops iwl6150_nic_ops = {
	.additional_nic_config = &iwl6150_additional_nic_config,
};

static const struct iwl_ops iwl6000_ops = {
	.lib = &iwl6000_lib,
};

static const struct iwl_ops iwl6050_ops = {
	.lib = &iwl6000_lib,
	.nic = &iwl6050_nic_ops,
};

static const struct iwl_ops iwl6150_ops = {
	.lib = &iwl6000_lib,
	.nic = &iwl6150_nic_ops,
};

static const struct iwl_ops iwl6030_ops = {
	.lib = &iwl6030_lib,
};

static struct iwl_base_params iwl6000_base_params = {
	.eeprom_size = OTP_LOW_IMAGE_SIZE,
	.num_of_queues = IWLAGN_NUM_QUEUES,
@@ -402,7 +384,7 @@ static struct iwl_bt_params iwl6000_bt_params = {
	.ucode_api_min = IWL6000G2_UCODE_API_MIN,		\
	.eeprom_ver = EEPROM_6005_EEPROM_VERSION,		\
	.eeprom_calib_ver = EEPROM_6005_TX_POWER_VERSION,	\
	.ops = &iwl6000_ops,					\
	.lib = &iwl6000_lib,					\
	.base_params = &iwl6000_g2_base_params,			\
	.need_dc_calib = true,					\
	.need_temp_offset_calib = true,				\
@@ -430,7 +412,7 @@ struct iwl_cfg iwl6005_2bg_cfg = {
	.ucode_api_min = IWL6000G2_UCODE_API_MIN,		\
	.eeprom_ver = EEPROM_6030_EEPROM_VERSION,		\
	.eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION,	\
	.ops = &iwl6030_ops,					\
	.lib = &iwl6030_lib,					\
	.base_params = &iwl6000_g2_base_params,			\
	.bt_params = &iwl6000_bt_params,			\
	.need_dc_calib = true,					\
@@ -511,7 +493,7 @@ struct iwl_cfg iwl130_bg_cfg = {
	.valid_rx_ant = ANT_BC,		/* .cfg overwrite */	\
	.eeprom_ver = EEPROM_6000_EEPROM_VERSION,		\
	.eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,	\
	.ops = &iwl6000_ops,					\
	.lib = &iwl6000_lib,					\
	.base_params = &iwl6000_base_params,			\
	.pa_type = IWL_PA_INTERNAL,				\
	.led_mode = IWL_LED_BLINK
@@ -538,7 +520,8 @@ struct iwl_cfg iwl6000i_2bg_cfg = {
	.ucode_api_min = IWL6050_UCODE_API_MIN,			\
	.valid_tx_ant = ANT_AB,		/* .cfg overwrite */	\
	.valid_rx_ant = ANT_AB,		/* .cfg overwrite */	\
	.ops = &iwl6050_ops,					\
	.lib = &iwl6000_lib,					\
	.nic = &iwl6050_nic_ops,				\
	.eeprom_ver = EEPROM_6050_EEPROM_VERSION,		\
	.eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,	\
	.base_params = &iwl6050_base_params,			\
@@ -561,7 +544,8 @@ struct iwl_cfg iwl6050_2abg_cfg = {
	.fw_name_pre = IWL6050_FW_PRE,				\
	.ucode_api_max = IWL6050_UCODE_API_MAX,			\
	.ucode_api_min = IWL6050_UCODE_API_MIN,			\
	.ops = &iwl6150_ops,					\
	.lib = &iwl6000_lib,					\
	.nic = &iwl6150_nic_ops,				\
	.eeprom_ver = EEPROM_6150_EEPROM_VERSION,		\
	.eeprom_calib_ver = EEPROM_6150_TX_POWER_VERSION,	\
	.base_params = &iwl6050_base_params,			\
@@ -587,7 +571,7 @@ struct iwl_cfg iwl6000_3agn_cfg = {
	.ucode_api_min = IWL6000_UCODE_API_MIN,
	.eeprom_ver = EEPROM_6000_EEPROM_VERSION,
	.eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
	.ops = &iwl6000_ops,
	.lib = &iwl6000_lib,
	.base_params = &iwl6000_base_params,
	.ht_params = &iwl6000_ht_params,
	.need_dc_calib = true,
+1 −1
Original line number Diff line number Diff line
@@ -711,7 +711,7 @@ int iwlagn_hw_nic_init(struct iwl_priv *priv)

	iwlagn_set_pwr_vmain(priv);

	priv->cfg->ops->lib->nic_config(priv);
	priv->cfg->lib->nic_config(priv);

	/* Allocate the RX queue, or reset if it is already allocated */
	trans_rx_init(priv);
Loading