Commit b8c2b05e authored by Fry, Donald H's avatar Fry, Donald H Committed by John W. Linville

iwlagn: simplify chain_noise_num_beacons indirection

chain_noise_num_beacons is set and never changes.  Use the #define
rather than 3 levels of indirection.
Signed-off-by: default avatarDon Fry <donald.h.fry@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 5092e47a
...@@ -191,7 +191,6 @@ static struct iwl_base_params iwl1000_base_params = { ...@@ -191,7 +191,6 @@ static struct iwl_base_params iwl1000_base_params = {
.max_ll_items = OTP_MAX_LL_ITEMS_1000, .max_ll_items = OTP_MAX_LL_ITEMS_1000,
.shadow_ram_support = false, .shadow_ram_support = false,
.led_compensation = 51, .led_compensation = 51,
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
.support_ct_kill_exit = true, .support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF, .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000, .chain_noise_scale = 1000,
......
...@@ -211,7 +211,6 @@ static struct iwl_base_params iwl2000_base_params = { ...@@ -211,7 +211,6 @@ static struct iwl_base_params iwl2000_base_params = {
.max_ll_items = OTP_MAX_LL_ITEMS_2x00, .max_ll_items = OTP_MAX_LL_ITEMS_2x00,
.shadow_ram_support = true, .shadow_ram_support = true,
.led_compensation = 51, .led_compensation = 51,
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
.adv_thermal_throttle = true, .adv_thermal_throttle = true,
.support_ct_kill_exit = true, .support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
...@@ -231,7 +230,6 @@ static struct iwl_base_params iwl2030_base_params = { ...@@ -231,7 +230,6 @@ static struct iwl_base_params iwl2030_base_params = {
.max_ll_items = OTP_MAX_LL_ITEMS_2x00, .max_ll_items = OTP_MAX_LL_ITEMS_2x00,
.shadow_ram_support = true, .shadow_ram_support = true,
.led_compensation = 57, .led_compensation = 57,
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
.adv_thermal_throttle = true, .adv_thermal_throttle = true,
.support_ct_kill_exit = true, .support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
......
...@@ -353,7 +353,6 @@ static struct iwl_base_params iwl5000_base_params = { ...@@ -353,7 +353,6 @@ static struct iwl_base_params iwl5000_base_params = {
.num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
.pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
.led_compensation = 51, .led_compensation = 51,
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000, .chain_noise_scale = 1000,
.wd_timeout = IWL_LONG_WD_TIMEOUT, .wd_timeout = IWL_LONG_WD_TIMEOUT,
......
...@@ -305,7 +305,6 @@ static struct iwl_base_params iwl6000_base_params = { ...@@ -305,7 +305,6 @@ static struct iwl_base_params iwl6000_base_params = {
.max_ll_items = OTP_MAX_LL_ITEMS_6x00, .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
.shadow_ram_support = true, .shadow_ram_support = true,
.led_compensation = 51, .led_compensation = 51,
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
.adv_thermal_throttle = true, .adv_thermal_throttle = true,
.support_ct_kill_exit = true, .support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
...@@ -323,7 +322,6 @@ static struct iwl_base_params iwl6050_base_params = { ...@@ -323,7 +322,6 @@ static struct iwl_base_params iwl6050_base_params = {
.max_ll_items = OTP_MAX_LL_ITEMS_6x50, .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
.shadow_ram_support = true, .shadow_ram_support = true,
.led_compensation = 51, .led_compensation = 51,
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
.adv_thermal_throttle = true, .adv_thermal_throttle = true,
.support_ct_kill_exit = true, .support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
...@@ -340,7 +338,6 @@ static struct iwl_base_params iwl6000_g2_base_params = { ...@@ -340,7 +338,6 @@ static struct iwl_base_params iwl6000_g2_base_params = {
.max_ll_items = OTP_MAX_LL_ITEMS_6x00, .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
.shadow_ram_support = true, .shadow_ram_support = true,
.led_compensation = 57, .led_compensation = 57,
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
.adv_thermal_throttle = true, .adv_thermal_throttle = true,
.support_ct_kill_exit = true, .support_ct_kill_exit = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
......
...@@ -766,12 +766,9 @@ static void iwl_find_disconn_antenna(struct iwl_priv *priv, u32* average_sig, ...@@ -766,12 +766,9 @@ static void iwl_find_disconn_antenna(struct iwl_priv *priv, u32* average_sig,
u8 first_chain; u8 first_chain;
u16 i = 0; u16 i = 0;
average_sig[0] = data->chain_signal_a / average_sig[0] = data->chain_signal_a / IWL_CAL_NUM_BEACONS;
priv->cfg->base_params->chain_noise_num_beacons; average_sig[1] = data->chain_signal_b / IWL_CAL_NUM_BEACONS;
average_sig[1] = data->chain_signal_b / average_sig[2] = data->chain_signal_c / IWL_CAL_NUM_BEACONS;
priv->cfg->base_params->chain_noise_num_beacons;
average_sig[2] = data->chain_signal_c /
priv->cfg->base_params->chain_noise_num_beacons;
if (average_sig[0] >= average_sig[1]) { if (average_sig[0] >= average_sig[1]) {
max_average_sig = average_sig[0]; max_average_sig = average_sig[0];
...@@ -1038,8 +1035,7 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv) ...@@ -1038,8 +1035,7 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv)
/* If this is the "chain_noise_num_beacons", determine: /* If this is the "chain_noise_num_beacons", determine:
* 1) Disconnected antennas (using signal strengths) * 1) Disconnected antennas (using signal strengths)
* 2) Differential gain (using silence noise) to balance receivers */ * 2) Differential gain (using silence noise) to balance receivers */
if (data->beacon_count != if (data->beacon_count != IWL_CAL_NUM_BEACONS)
priv->cfg->base_params->chain_noise_num_beacons)
return; return;
/* Analyze signal for disconnected antenna */ /* Analyze signal for disconnected antenna */
...@@ -1055,12 +1051,9 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv) ...@@ -1055,12 +1051,9 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv)
iwl_find_disconn_antenna(priv, average_sig, data); iwl_find_disconn_antenna(priv, average_sig, data);
/* Analyze noise for rx balance */ /* Analyze noise for rx balance */
average_noise[0] = data->chain_noise_a / average_noise[0] = data->chain_noise_a / IWL_CAL_NUM_BEACONS;
priv->cfg->base_params->chain_noise_num_beacons; average_noise[1] = data->chain_noise_b / IWL_CAL_NUM_BEACONS;
average_noise[1] = data->chain_noise_b / average_noise[2] = data->chain_noise_c / IWL_CAL_NUM_BEACONS;
priv->cfg->base_params->chain_noise_num_beacons;
average_noise[2] = data->chain_noise_c /
priv->cfg->base_params->chain_noise_num_beacons;
for (i = 0; i < NUM_RX_CHAINS; i++) { for (i = 0; i < NUM_RX_CHAINS; i++) {
if (!(data->disconn_array[i]) && if (!(data->disconn_array[i]) &&
......
...@@ -124,7 +124,6 @@ struct iwl_base_params { ...@@ -124,7 +124,6 @@ struct iwl_base_params {
const u16 max_ll_items; const u16 max_ll_items;
const bool shadow_ram_support; const bool shadow_ram_support;
u16 led_compensation; u16 led_compensation;
int chain_noise_num_beacons;
bool adv_thermal_throttle; bool adv_thermal_throttle;
bool support_ct_kill_exit; bool support_ct_kill_exit;
const bool support_wimax_coexist; const bool support_wimax_coexist;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment