304-ath9k-avoid-ANI-restart-if-no-trigger.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. From: Miaoqing Pan <miaoqing@codeaurora.org>
  2. Date: Fri, 15 Jan 2016 18:17:17 +0800
  3. Subject: [PATCH] ath9k: avoid ANI restart if no trigger
  4. Fixes commit 54da20d83f0e ("ath9k_hw: improve ANI processing and rx desensitizing parameters")
  5. Call ath9k_ani_restart() only when the phy error rate reach the
  6. ANI immunity threshold. Sync the logic with internal code base.
  7. Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
  8. ---
  9. --- a/drivers/net/wireless/ath/ath9k/ani.c
  10. +++ b/drivers/net/wireless/ath/ath9k/ani.c
  11. @@ -444,14 +444,16 @@ void ath9k_hw_ani_monitor(struct ath_hw
  12. ofdmPhyErrRate < ah->config.ofdm_trig_low) {
  13. ath9k_hw_ani_lower_immunity(ah);
  14. aniState->ofdmsTurn = !aniState->ofdmsTurn;
  15. + ath9k_ani_restart(ah);
  16. } else if (ofdmPhyErrRate > ah->config.ofdm_trig_high) {
  17. ath9k_hw_ani_ofdm_err_trigger(ah);
  18. aniState->ofdmsTurn = false;
  19. + ath9k_ani_restart(ah);
  20. } else if (cckPhyErrRate > ah->config.cck_trig_high) {
  21. ath9k_hw_ani_cck_err_trigger(ah);
  22. aniState->ofdmsTurn = true;
  23. + ath9k_ani_restart(ah);
  24. }
  25. - ath9k_ani_restart(ah);
  26. }
  27. }
  28. EXPORT_SYMBOL(ath9k_hw_ani_monitor);