300-ath9k-force-rx_clear-when-disabling-rx.patch 966 B

12345678910111213141516171819202122232425262728293031
  1. From: Felix Fietkau <nbd@nbd.name>
  2. Date: Sun, 7 Jun 2015 13:53:35 +0200
  3. Subject: [PATCH] ath9k: force rx_clear when disabling rx
  4. This makes stopping Rx more reliable and should reduce the frequency of
  5. Rx related DMA stop warnings
  6. Cc: stable@vger.kernel.org
  7. Signed-off-by: Felix Fietkau <nbd@nbd.name>
  8. ---
  9. --- a/drivers/net/wireless/ath/ath9k/mac.c
  10. +++ b/drivers/net/wireless/ath/ath9k/mac.c
  11. @@ -677,13 +677,15 @@ void ath9k_hw_startpcureceive(struct ath
  12. ath9k_ani_reset(ah, is_scanning);
  13. - REG_CLR_BIT(ah, AR_DIAG_SW, (AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT));
  14. + REG_CLR_BIT(ah, AR_DIAG_SW,
  15. + AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT | AR_DIAG_FORCE_RX_CLEAR);
  16. }
  17. EXPORT_SYMBOL(ath9k_hw_startpcureceive);
  18. void ath9k_hw_abortpcurecv(struct ath_hw *ah)
  19. {
  20. - REG_SET_BIT(ah, AR_DIAG_SW, AR_DIAG_RX_ABORT | AR_DIAG_RX_DIS);
  21. + REG_SET_BIT(ah, AR_DIAG_SW,
  22. + AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT | AR_DIAG_FORCE_RX_CLEAR);
  23. ath9k_hw_disable_mib_counters(ah);
  24. }