diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2011-02-28 08:33:16 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-02-28 14:11:27 -0500 |
commit | ad6e82a5348e494c0023d77fa55933f23b55711c (patch) | |
tree | 277df5b7f7f3087c2d25cbc490c4c9933b0684f6 /drivers/net/wireless/iwlwifi/iwl-agn-rx.c | |
parent | b7977ffaab5187ad75edaf04ac854615cea93828 (diff) |
iwlwifi: move check health code into iwl-rx.c
Remove check_plcp_health and check_ack_health ops methods, they are
unneeded after iwlegacy driver split. Merge check health code into to
iwl-rx.c and make functions static.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-rx.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rx.c | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c index b192ca842f0a..7a89a55ec316 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c | |||
@@ -169,93 +169,6 @@ static void iwl_accumulative_statistics(struct iwl_priv *priv, | |||
169 | 169 | ||
170 | #define REG_RECALIB_PERIOD (60) | 170 | #define REG_RECALIB_PERIOD (60) |
171 | 171 | ||
172 | /** | ||
173 | * iwl_good_plcp_health - checks for plcp error. | ||
174 | * | ||
175 | * When the plcp error is exceeding the thresholds, reset the radio | ||
176 | * to improve the throughput. | ||
177 | */ | ||
178 | bool iwl_good_plcp_health(struct iwl_priv *priv, | ||
179 | struct iwl_rx_packet *pkt) | ||
180 | { | ||
181 | bool rc = true; | ||
182 | int combined_plcp_delta; | ||
183 | unsigned int plcp_msec; | ||
184 | unsigned long plcp_received_jiffies; | ||
185 | |||
186 | if (priv->cfg->base_params->plcp_delta_threshold == | ||
187 | IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE) { | ||
188 | IWL_DEBUG_RADIO(priv, "plcp_err check disabled\n"); | ||
189 | return rc; | ||
190 | } | ||
191 | |||
192 | /* | ||
193 | * check for plcp_err and trigger radio reset if it exceeds | ||
194 | * the plcp error threshold plcp_delta. | ||
195 | */ | ||
196 | plcp_received_jiffies = jiffies; | ||
197 | plcp_msec = jiffies_to_msecs((long) plcp_received_jiffies - | ||
198 | (long) priv->plcp_jiffies); | ||
199 | priv->plcp_jiffies = plcp_received_jiffies; | ||
200 | /* | ||
201 | * check to make sure plcp_msec is not 0 to prevent division | ||
202 | * by zero. | ||
203 | */ | ||
204 | if (plcp_msec) { | ||
205 | struct statistics_rx_phy *ofdm; | ||
206 | struct statistics_rx_ht_phy *ofdm_ht; | ||
207 | |||
208 | if (iwl_bt_statistics(priv)) { | ||
209 | ofdm = &pkt->u.stats_bt.rx.ofdm; | ||
210 | ofdm_ht = &pkt->u.stats_bt.rx.ofdm_ht; | ||
211 | combined_plcp_delta = | ||
212 | (le32_to_cpu(ofdm->plcp_err) - | ||
213 | le32_to_cpu(priv->_agn.statistics_bt. | ||
214 | rx.ofdm.plcp_err)) + | ||
215 | (le32_to_cpu(ofdm_ht->plcp_err) - | ||
216 | le32_to_cpu(priv->_agn.statistics_bt. | ||
217 | rx.ofdm_ht.plcp_err)); | ||
218 | } else { | ||
219 | ofdm = &pkt->u.stats.rx.ofdm; | ||
220 | ofdm_ht = &pkt->u.stats.rx.ofdm_ht; | ||
221 | combined_plcp_delta = | ||
222 | (le32_to_cpu(ofdm->plcp_err) - | ||
223 | le32_to_cpu(priv->_agn.statistics. | ||
224 | rx.ofdm.plcp_err)) + | ||
225 | (le32_to_cpu(ofdm_ht->plcp_err) - | ||
226 | le32_to_cpu(priv->_agn.statistics. | ||
227 | rx.ofdm_ht.plcp_err)); | ||
228 | } | ||
229 | |||
230 | if ((combined_plcp_delta > 0) && | ||
231 | ((combined_plcp_delta * 100) / plcp_msec) > | ||
232 | priv->cfg->base_params->plcp_delta_threshold) { | ||
233 | /* | ||
234 | * if plcp_err exceed the threshold, | ||
235 | * the following data is printed in csv format: | ||
236 | * Text: plcp_err exceeded %d, | ||
237 | * Received ofdm.plcp_err, | ||
238 | * Current ofdm.plcp_err, | ||
239 | * Received ofdm_ht.plcp_err, | ||
240 | * Current ofdm_ht.plcp_err, | ||
241 | * combined_plcp_delta, | ||
242 | * plcp_msec | ||
243 | */ | ||
244 | IWL_DEBUG_RADIO(priv, "plcp_err exceeded %u, " | ||
245 | "%u, %u, %u, %u, %d, %u mSecs\n", | ||
246 | priv->cfg->base_params->plcp_delta_threshold, | ||
247 | le32_to_cpu(ofdm->plcp_err), | ||
248 | le32_to_cpu(ofdm->plcp_err), | ||
249 | le32_to_cpu(ofdm_ht->plcp_err), | ||
250 | le32_to_cpu(ofdm_ht->plcp_err), | ||
251 | combined_plcp_delta, plcp_msec); | ||
252 | |||
253 | rc = false; | ||
254 | } | ||
255 | } | ||
256 | return rc; | ||
257 | } | ||
258 | |||
259 | void iwl_rx_statistics(struct iwl_priv *priv, | 172 | void iwl_rx_statistics(struct iwl_priv *priv, |
260 | struct iwl_rx_mem_buffer *rxb) | 173 | struct iwl_rx_mem_buffer *rxb) |
261 | { | 174 | { |