iwlwifi: no need to refer to max_nrg_cck range value
authorWey-Yi Guy <wey-yi.w.guy@intel.com>
Fri, 12 Jun 2009 20:22:54 +0000 (13:22 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 10 Jul 2009 18:57:50 +0000 (14:57 -0400)
max_nrg_cck value inside the sensitivity range structure is not needed
for sensitivity calibration.
Keep the parameter in sensitivity structure but set the value to "0" in case
needed in the future implementation.

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>
drivers/net/wireless/iwlwifi/iwl-4965.c
drivers/net/wireless/iwlwifi/iwl-5000.c
drivers/net/wireless/iwlwifi/iwl-calib.c

index 8f3d4bc6a03fcbfa65b8cd712c1704ecf1c8cb42..edbb0bfd8cb7b417f2236cb557a89b5259bd4aba 100644 (file)
@@ -728,7 +728,7 @@ static int iwl4965_alive_notify(struct iwl_priv *priv)
 
 static struct iwl_sensitivity_ranges iwl4965_sensitivity = {
        .min_nrg_cck = 97,
-       .max_nrg_cck = 0,
+       .max_nrg_cck = 0, /* not used, set to 0 */
 
        .auto_corr_min_ofdm = 85,
        .auto_corr_min_ofdm_mrc = 170,
index 0e445a9c69298e5e20225db7303abb3edafebd69..85e8bac499a7c7f5dd6d6db6c8b4d501ff548da1 100644 (file)
@@ -388,7 +388,7 @@ void iwl5000_rts_tx_cmd_flag(struct ieee80211_tx_info *info,
 
 static struct iwl_sensitivity_ranges iwl5000_sensitivity = {
        .min_nrg_cck = 95,
-       .max_nrg_cck = 0,
+       .max_nrg_cck = 0, /* not used, set to 0 */
        .auto_corr_min_ofdm = 90,
        .auto_corr_min_ofdm_mrc = 170,
        .auto_corr_min_ofdm_x1 = 120,
index a5d63672ad39cbcb997f3aae0cfdeb67b8041ee5..f8bf592e939c75a0044b5299f81863dad4c50809 100644 (file)
@@ -251,12 +251,7 @@ static int iwl_sens_energy_cck(struct iwl_priv *priv,
 
                /* increase energy threshold (reduce nrg value)
                 *   to decrease sensitivity */
-               if (data->nrg_th_cck >
-                       (ranges->max_nrg_cck + NRG_STEP_CCK))
-                       data->nrg_th_cck = data->nrg_th_cck
-                                                - NRG_STEP_CCK;
-               else
-                       data->nrg_th_cck = ranges->max_nrg_cck;
+               data->nrg_th_cck = data->nrg_th_cck - NRG_STEP_CCK;
        /* Else if we got fewer than desired, increase sensitivity */
        } else if (false_alarms < min_false_alarms) {
                data->nrg_curr_state = IWL_FA_TOO_FEW;