diff options
author | Johannes Berg <johannes.berg@intel.com> | 2014-01-29 09:34:11 -0500 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-02-03 15:23:41 -0500 |
commit | 5c0950c377c1fed65fc26062b4111e33490c823e (patch) | |
tree | e7346f005f4da075a8d875c533c1a9ecd1e109e5 | |
parent | 0eb8365305d43bdfde9e064dec4d82c743fa5c38 (diff) |
iwlwifi: mvm: remove unneeded calculations
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>
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/rx.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/rx.c b/drivers/net/wireless/iwlwifi/mvm/rx.c index a85b60f7e67e..ef727df84da7 100644 --- a/drivers/net/wireless/iwlwifi/mvm/rx.c +++ b/drivers/net/wireless/iwlwifi/mvm/rx.c | |||
@@ -129,22 +129,16 @@ static void iwl_mvm_calc_rssi(struct iwl_mvm *mvm, | |||
129 | struct ieee80211_rx_status *rx_status) | 129 | struct ieee80211_rx_status *rx_status) |
130 | { | 130 | { |
131 | int rssi_a, rssi_b, rssi_a_dbm, rssi_b_dbm, max_rssi_dbm; | 131 | int rssi_a, rssi_b, rssi_a_dbm, rssi_b_dbm, max_rssi_dbm; |
132 | int rssi_all_band_a, rssi_all_band_b; | 132 | u32 agc_a, agc_b; |
133 | u32 agc_a, agc_b, max_agc; | ||
134 | u32 val; | 133 | u32 val; |
135 | 134 | ||
136 | val = le32_to_cpu(phy_info->non_cfg_phy[IWL_RX_INFO_AGC_IDX]); | 135 | val = le32_to_cpu(phy_info->non_cfg_phy[IWL_RX_INFO_AGC_IDX]); |
137 | agc_a = (val & IWL_OFDM_AGC_A_MSK) >> IWL_OFDM_AGC_A_POS; | 136 | agc_a = (val & IWL_OFDM_AGC_A_MSK) >> IWL_OFDM_AGC_A_POS; |
138 | agc_b = (val & IWL_OFDM_AGC_B_MSK) >> IWL_OFDM_AGC_B_POS; | 137 | agc_b = (val & IWL_OFDM_AGC_B_MSK) >> IWL_OFDM_AGC_B_POS; |
139 | max_agc = max_t(u32, agc_a, agc_b); | ||
140 | 138 | ||
141 | val = le32_to_cpu(phy_info->non_cfg_phy[IWL_RX_INFO_RSSI_AB_IDX]); | 139 | val = le32_to_cpu(phy_info->non_cfg_phy[IWL_RX_INFO_RSSI_AB_IDX]); |
142 | rssi_a = (val & IWL_OFDM_RSSI_INBAND_A_MSK) >> IWL_OFDM_RSSI_A_POS; | 140 | rssi_a = (val & IWL_OFDM_RSSI_INBAND_A_MSK) >> IWL_OFDM_RSSI_A_POS; |
143 | rssi_b = (val & IWL_OFDM_RSSI_INBAND_B_MSK) >> IWL_OFDM_RSSI_B_POS; | 141 | rssi_b = (val & IWL_OFDM_RSSI_INBAND_B_MSK) >> IWL_OFDM_RSSI_B_POS; |
144 | rssi_all_band_a = (val & IWL_OFDM_RSSI_ALLBAND_A_MSK) >> | ||
145 | IWL_OFDM_RSSI_ALLBAND_A_POS; | ||
146 | rssi_all_band_b = (val & IWL_OFDM_RSSI_ALLBAND_B_MSK) >> | ||
147 | IWL_OFDM_RSSI_ALLBAND_B_POS; | ||
148 | 142 | ||
149 | /* | 143 | /* |
150 | * dBm = rssi dB - agc dB - constant. | 144 | * dBm = rssi dB - agc dB - constant. |