Commit 637d7925 authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by Wey-Yi Guy

iwlwifi: use enhance_sensitivity from iwl_fw

Remove another dependency between the nic layer and the iwl_priv
struct.
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
parent 6d4dec7b
...@@ -68,6 +68,8 @@ ...@@ -68,6 +68,8 @@
#include "iwl-agn-calib.h" #include "iwl-agn-calib.h"
#include "iwl-trans.h" #include "iwl-trans.h"
#include "iwl-agn.h" #include "iwl-agn.h"
#include "iwl-wifi.h"
#include "iwl-ucode.h"
/***************************************************************************** /*****************************************************************************
* INIT calibrations framework * INIT calibrations framework
...@@ -634,7 +636,7 @@ void iwl_init_sensitivity(struct iwl_priv *priv) ...@@ -634,7 +636,7 @@ void iwl_init_sensitivity(struct iwl_priv *priv)
data->last_bad_plcp_cnt_cck = 0; data->last_bad_plcp_cnt_cck = 0;
data->last_fa_cnt_cck = 0; data->last_fa_cnt_cck = 0;
if (priv->enhance_sensitivity_table) if (nic(priv)->fw.enhance_sensitivity_table)
ret |= iwl_enhance_sensitivity_write(priv); ret |= iwl_enhance_sensitivity_write(priv);
else else
ret |= iwl_sensitivity_write(priv); ret |= iwl_sensitivity_write(priv);
...@@ -745,7 +747,7 @@ void iwl_sensitivity_calibration(struct iwl_priv *priv) ...@@ -745,7 +747,7 @@ void iwl_sensitivity_calibration(struct iwl_priv *priv)
iwl_sens_auto_corr_ofdm(priv, norm_fa_ofdm, rx_enable_time); iwl_sens_auto_corr_ofdm(priv, norm_fa_ofdm, rx_enable_time);
iwl_sens_energy_cck(priv, norm_fa_cck, rx_enable_time, &statis); iwl_sens_energy_cck(priv, norm_fa_cck, rx_enable_time, &statis);
if (priv->enhance_sensitivity_table) if (nic(priv)->fw.enhance_sensitivity_table)
iwl_enhance_sensitivity_write(priv); iwl_enhance_sensitivity_write(priv);
else else
iwl_sensitivity_write(priv); iwl_sensitivity_write(priv);
......
...@@ -796,7 +796,6 @@ struct iwl_priv { ...@@ -796,7 +796,6 @@ struct iwl_priv {
u8 start_calib; u8 start_calib;
struct iwl_sensitivity_data sensitivity_data; struct iwl_sensitivity_data sensitivity_data;
struct iwl_chain_noise_data chain_noise_data; struct iwl_chain_noise_data chain_noise_data;
bool enhance_sensitivity_table;
__le16 sensitivity_tbl[HD_TABLE_SIZE]; __le16 sensitivity_tbl[HD_TABLE_SIZE];
__le16 enhance_sensitivity_tbl[ENHANCE_HD_TABLE_ENTRIES]; __le16 enhance_sensitivity_tbl[ENHANCE_HD_TABLE_ENTRIES];
......
...@@ -967,7 +967,7 @@ static int iwlagn_load_firmware(struct iwl_priv *priv, ...@@ -967,7 +967,7 @@ static int iwlagn_load_firmware(struct iwl_priv *priv,
case IWL_UCODE_TLV_ENHANCE_SENS_TBL: case IWL_UCODE_TLV_ENHANCE_SENS_TBL:
if (tlv_len) if (tlv_len)
goto invalid_tlv_len; goto invalid_tlv_len;
priv->enhance_sensitivity_table = true; nic->fw.enhance_sensitivity_table = true;
break; break;
case IWL_UCODE_TLV_WOWLAN_INST: case IWL_UCODE_TLV_WOWLAN_INST:
pieces->wowlan_inst = tlv_data; pieces->wowlan_inst = tlv_data;
......
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