0024-mac80211-ath9k-enable-hw-manual-peak-calibration-for-QCA9561.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. From: Miaoqing Pan <miaoqing@codeaurora.org>
  2. Date: Tue, 1 Sep 2015 12:21:27 +0800
  3. Subject: mac80211: ath9k: enable hw manual peak calibration for QCA9561
  4. This patch fix https://lists.openwrt.org/pipermail/openwrt-devel/
  5. 2015-August/034979.html. As the peak detect calibration is set
  6. incorrectly.
  7. Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
  8. diff --git a/package/kernel/mac80211/patches/546-ath9k_enable_hw_manual_peak_calibration.patch b/package/kernel/mac80211/patches/546-ath9k_enable_hw_manual_peak_calibration.patch
  9. new file mode 100644
  10. index 0000000..8606493
  11. --- /dev/null
  12. +++ b/package/kernel/mac80211/patches/546-ath9k_enable_hw_manual_peak_calibration.patch
  13. @@ -0,0 +1,22 @@
  14. +--- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c
  15. ++++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
  16. +@@ -1249,7 +1249,8 @@ static void ar9003_hw_manual_peak_cal(struct ath_hw *ah, u8 chain, bool is_2g)
  17. + REG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(chain),
  18. + AR_PHY_65NM_RXRF_AGC_AGC2G_CALDAC_OVR, 0x0);
  19. +
  20. +- if (AR_SREV_9003_PCOEM(ah) || AR_SREV_9550(ah) || AR_SREV_9531(ah)) {
  21. ++ if (AR_SREV_9003_PCOEM(ah) || AR_SREV_9550(ah) || AR_SREV_9531(ah) ||
  22. ++ AR_SREV_9561(ah)) {
  23. + if (is_2g)
  24. + REG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(chain),
  25. + AR_PHY_65NM_RXRF_AGC_AGC2G_DBDAC_OVR,
  26. +@@ -1640,7 +1641,8 @@ static bool ar9003_hw_init_cal_soc(struct ath_hw *ah,
  27. +
  28. + skip_tx_iqcal:
  29. + if (run_agc_cal || !(ah->ah_flags & AH_FASTCC)) {
  30. +- if (AR_SREV_9330_11(ah) || AR_SREV_9531(ah) || AR_SREV_9550(ah)) {
  31. ++ if (AR_SREV_9330_11(ah) || AR_SREV_9531(ah) || AR_SREV_9550(ah) ||
  32. ++ AR_SREV_9561(ah)) {
  33. + for (i = 0; i < AR9300_MAX_CHAINS; i++) {
  34. + if (!(ah->rxchainmask & (1 << i)))
  35. + continue;