330-ath9k-use-rmw-buffer-in-ath9k_hw_set_operating_mode-.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From: Oleksij Rempel <[email protected]>
  2. Date: Sun, 22 Mar 2015 19:29:57 +0100
  3. Subject: [PATCH] ath9k: use rmw buffer in ath9k_hw_set_operating_mode
  4. and ath9k_hw_reset
  5. Signed-off-by: Oleksij Rempel <[email protected]>
  6. Signed-off-by: Kalle Valo <[email protected]>
  7. ---
  8. --- a/drivers/net/wireless/ath/ath9k/hw.c
  9. +++ b/drivers/net/wireless/ath/ath9k/hw.c
  10. @@ -1227,6 +1227,7 @@ static void ath9k_hw_set_operating_mode(
  11. u32 mask = AR_STA_ID1_STA_AP | AR_STA_ID1_ADHOC;
  12. u32 set = AR_STA_ID1_KSRCH_MODE;
  13. + ENABLE_REG_RMW_BUFFER(ah);
  14. switch (opmode) {
  15. case NL80211_IFTYPE_ADHOC:
  16. if (!AR_SREV_9340_13(ah)) {
  17. @@ -1248,6 +1249,7 @@ static void ath9k_hw_set_operating_mode(
  18. break;
  19. }
  20. REG_RMW(ah, AR_STA_ID1, set, mask);
  21. + REG_RMW_BUFFER_FLUSH(ah);
  22. }
  23. void ath9k_hw_get_delta_slope_vals(struct ath_hw *ah, u32 coef_scaled,
  24. @@ -1960,6 +1962,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
  25. if (!ath9k_hw_mci_is_enabled(ah))
  26. REG_WRITE(ah, AR_OBS, 8);
  27. + ENABLE_REG_RMW_BUFFER(ah);
  28. if (ah->config.rx_intr_mitigation) {
  29. REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_LAST, ah->config.rimt_last);
  30. REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_FIRST, ah->config.rimt_first);
  31. @@ -1969,6 +1972,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
  32. REG_RMW_FIELD(ah, AR_TIMT, AR_TIMT_LAST, 300);
  33. REG_RMW_FIELD(ah, AR_TIMT, AR_TIMT_FIRST, 750);
  34. }
  35. + REG_RMW_BUFFER_FLUSH(ah);
  36. ath9k_hw_init_bb(ah, chan);