551-ath9k_ani_helper.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. --- a/drivers/net/wireless/ath/ath9k/ani.c
  2. +++ b/drivers/net/wireless/ath/ath9k/ani.c
  3. @@ -109,6 +109,11 @@ static void ath9k_hw_ani_lower_immunity(
  4. ath9k_hw_private_ops(ah)->ani_lower_immunity(ah);
  5. }
  6. +static bool use_new_ani(struct ath_hw *ah)
  7. +{
  8. + return AR_SREV_9300_20_OR_LATER(ah) || modparam_force_new_ani;
  9. +}
  10. +
  11. int ath9k_hw_get_ani_channel_idx(struct ath_hw *ah,
  12. struct ath9k_channel *chan)
  13. {
  14. @@ -1178,7 +1183,7 @@ void ath9k_hw_ani_init(struct ath_hw *ah
  15. memset(ah->ani, 0, sizeof(ah->ani));
  16. for (i = 0; i < ARRAY_SIZE(ah->ani); i++) {
  17. - if (AR_SREV_9300_20_OR_LATER(ah) || modparam_force_new_ani) {
  18. + if (use_new_ani(ah)) {
  19. ah->ani[i].ofdmTrigHigh = ATH9K_ANI_OFDM_TRIG_HIGH_NEW;
  20. ah->ani[i].ofdmTrigLow = ATH9K_ANI_OFDM_TRIG_LOW_NEW;
  21. @@ -1230,7 +1235,7 @@ void ath9k_hw_ani_init(struct ath_hw *ah
  22. * since we expect some ongoing maintenance on the tables, let's sanity
  23. * check here default level should not modify INI setting.
  24. */
  25. - if (AR_SREV_9300_20_OR_LATER(ah) || modparam_force_new_ani) {
  26. + if (use_new_ani(ah)) {
  27. const struct ani_ofdm_level_entry *entry_ofdm;
  28. const struct ani_cck_level_entry *entry_cck;