iwlwifi: mvm: remove unneeded calculations
authorJohannes Berg <johannes.berg@intel.com>
Wed, 29 Jan 2014 14:34:11 +0000 (15:34 +0100)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Mon, 3 Feb 2014 20:23:41 +0000 (22:23 +0200)
In iwl_mvm_calc_rssi() some values are calculated but then
never used, remove the calculations.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/mvm/rx.c

index a85b60f7e67e47e24c842f65f726794dd32dfddd..ef727df84da7279f73e429f91c74a91224d635ea 100644 (file)
@@ -129,22 +129,16 @@ static void iwl_mvm_calc_rssi(struct iwl_mvm *mvm,
                              struct ieee80211_rx_status *rx_status)
 {
        int rssi_a, rssi_b, rssi_a_dbm, rssi_b_dbm, max_rssi_dbm;
-       int rssi_all_band_a, rssi_all_band_b;
-       u32 agc_a, agc_b, max_agc;
+       u32 agc_a, agc_b;
        u32 val;
 
        val = le32_to_cpu(phy_info->non_cfg_phy[IWL_RX_INFO_AGC_IDX]);
        agc_a = (val & IWL_OFDM_AGC_A_MSK) >> IWL_OFDM_AGC_A_POS;
        agc_b = (val & IWL_OFDM_AGC_B_MSK) >> IWL_OFDM_AGC_B_POS;
-       max_agc = max_t(u32, agc_a, agc_b);
 
        val = le32_to_cpu(phy_info->non_cfg_phy[IWL_RX_INFO_RSSI_AB_IDX]);
        rssi_a = (val & IWL_OFDM_RSSI_INBAND_A_MSK) >> IWL_OFDM_RSSI_A_POS;
        rssi_b = (val & IWL_OFDM_RSSI_INBAND_B_MSK) >> IWL_OFDM_RSSI_B_POS;
-       rssi_all_band_a = (val & IWL_OFDM_RSSI_ALLBAND_A_MSK) >>
-                               IWL_OFDM_RSSI_ALLBAND_A_POS;
-       rssi_all_band_b = (val & IWL_OFDM_RSSI_ALLBAND_B_MSK) >>
-                               IWL_OFDM_RSSI_ALLBAND_B_POS;
 
        /*
         * dBm = rssi dB - agc dB - constant.