2014-10-18 17:38:59 +00:00
|
|
|
From: Felix Fietkau <nbd@openwrt.org>
|
|
|
|
Date: Sat, 18 Oct 2014 13:42:03 +0200
|
|
|
|
Subject: [PATCH] ath9k_hw: start initial NF calibration after PA
|
|
|
|
calibration on <AR9003
|
|
|
|
|
|
|
|
This makes the initial NF calibration less likely to fail.
|
|
|
|
|
|
|
|
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
|
|
---
|
|
|
|
|
2014-06-12 11:41:12 +00:00
|
|
|
--- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c
|
2014-10-25 14:45:22 +00:00
|
|
|
@@ -856,6 +856,8 @@ static bool ar9002_hw_init_cal(struct at
|
2014-06-12 11:41:12 +00:00
|
|
|
|
|
|
|
/* Do PA Calibration */
|
|
|
|
ar9002_hw_pa_cal(ah, true);
|
2014-10-25 14:45:22 +00:00
|
|
|
+ ath9k_hw_loadnf(ah, chan);
|
2014-06-12 11:41:12 +00:00
|
|
|
+ ath9k_hw_start_nfcal(ah, true);
|
|
|
|
|
|
|
|
if (ah->caldata)
|
|
|
|
set_bit(NFCAL_PENDING, &ah->caldata->cal_flags);
|
|
|
|
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
2014-10-18 17:38:59 +00:00
|
|
|
@@ -1953,8 +1953,10 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
2014-06-12 11:41:12 +00:00
|
|
|
if (ath9k_hw_mci_is_enabled(ah))
|
|
|
|
ar9003_mci_check_bt(ah);
|
|
|
|
|
|
|
|
- ath9k_hw_loadnf(ah, chan);
|
|
|
|
- ath9k_hw_start_nfcal(ah, true);
|
|
|
|
+ if (AR_SREV_9300_20_OR_LATER(ah)) {
|
|
|
|
+ ath9k_hw_loadnf(ah, chan);
|
|
|
|
+ ath9k_hw_start_nfcal(ah, true);
|
|
|
|
+ }
|
|
|
|
|
|
|
|
if (AR_SREV_9300_20_OR_LATER(ah))
|
|
|
|
ar9003_hw_bb_watchdog_config(ah);
|