aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2009-06-12 16:22:53 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 14:57:50 -0400
commit9d67187dbd93df98011f7229f76de25d142b57cc (patch)
treead0e6f101efd88b9e327f59b7b945fde8ae9bb44 /drivers
parent47af3fe36dc478f7eddc8bec104ff1876d71f37c (diff)
iwlwifi: modify sensitivity value for 5150
In 5150 there is a long delay between the AGC(Automatic Gain Control) command till the RF is stabilized causing us to miss detections when there was adjacent channel noise, so we need to adjusted the Sensitivity calibration for 5150 differently. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index b3c648ce8c7b..0e445a9c6929 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -407,6 +407,28 @@ static struct iwl_sensitivity_ranges iwl5000_sensitivity = {
407 .nrg_th_ofdm = 95, 407 .nrg_th_ofdm = 95,
408}; 408};
409 409
410static struct iwl_sensitivity_ranges iwl5150_sensitivity = {
411 .min_nrg_cck = 95,
412 .max_nrg_cck = 0, /* not used, set to 0 */
413 .auto_corr_min_ofdm = 90,
414 .auto_corr_min_ofdm_mrc = 170,
415 .auto_corr_min_ofdm_x1 = 105,
416 .auto_corr_min_ofdm_mrc_x1 = 220,
417
418 .auto_corr_max_ofdm = 120,
419 .auto_corr_max_ofdm_mrc = 210,
420 /* max = min for performance bug in 5150 DSP */
421 .auto_corr_max_ofdm_x1 = 105,
422 .auto_corr_max_ofdm_mrc_x1 = 220,
423
424 .auto_corr_min_cck = 125,
425 .auto_corr_max_cck = 200,
426 .auto_corr_min_cck_mrc = 170,
427 .auto_corr_max_cck_mrc = 400,
428 .nrg_th_cck = 95,
429 .nrg_th_ofdm = 95,
430};
431
410static const u8 *iwl5000_eeprom_query_addr(const struct iwl_priv *priv, 432static const u8 *iwl5000_eeprom_query_addr(const struct iwl_priv *priv,
411 size_t offset) 433 size_t offset)
412{ 434{
@@ -826,8 +848,6 @@ static int iwl5000_hw_set_hw_params(struct iwl_priv *priv)
826 BIT(IEEE80211_BAND_5GHZ); 848 BIT(IEEE80211_BAND_5GHZ);
827 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR; 849 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
828 850
829 priv->hw_params.sens = &iwl5000_sensitivity;
830
831 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant); 851 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
832 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant); 852 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
833 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant; 853 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
@@ -836,9 +856,11 @@ static int iwl5000_hw_set_hw_params(struct iwl_priv *priv)
836 if (priv->cfg->ops->lib->temp_ops.set_ct_kill) 856 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
837 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv); 857 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
838 858
859 /* Set initial sensitivity parameters */
839 /* Set initial calibration set */ 860 /* Set initial calibration set */
840 switch (priv->hw_rev & CSR_HW_REV_TYPE_MSK) { 861 switch (priv->hw_rev & CSR_HW_REV_TYPE_MSK) {
841 case CSR_HW_REV_TYPE_5150: 862 case CSR_HW_REV_TYPE_5150:
863 priv->hw_params.sens = &iwl5150_sensitivity;
842 priv->hw_params.calib_init_cfg = 864 priv->hw_params.calib_init_cfg =
843 BIT(IWL_CALIB_DC) | 865 BIT(IWL_CALIB_DC) |
844 BIT(IWL_CALIB_LO) | 866 BIT(IWL_CALIB_LO) |
@@ -847,6 +869,7 @@ static int iwl5000_hw_set_hw_params(struct iwl_priv *priv)
847 869
848 break; 870 break;
849 default: 871 default:
872 priv->hw_params.sens = &iwl5000_sensitivity;
850 priv->hw_params.calib_init_cfg = 873 priv->hw_params.calib_init_cfg =
851 BIT(IWL_CALIB_XTAL) | 874 BIT(IWL_CALIB_XTAL) |
852 BIT(IWL_CALIB_LO) | 875 BIT(IWL_CALIB_LO) |