aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches/566-ath9k_nfcal_xor_percal.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-06-13 13:33:39 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-06-13 13:33:39 +0000
commit050a22b6b6249f8c2170bd79b6cf18a0b6186493 (patch)
tree1e0a6b4dc52443ce68ae2757da0cf6e4674fbb16 /package/mac80211/patches/566-ath9k_nfcal_xor_percal.patch
parent006119faa07526ed204ac8f8c6968c1a38bd5e66 (diff)
downloadupstream-050a22b6b6249f8c2170bd79b6cf18a0b6186493.tar.gz
upstream-050a22b6b6249f8c2170bd79b6cf18a0b6186493.tar.bz2
upstream-050a22b6b6249f8c2170bd79b6cf18a0b6186493.zip
AA: mac80211: sync with trunk r41181
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@41182 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/566-ath9k_nfcal_xor_percal.patch')
-rw-r--r--package/mac80211/patches/566-ath9k_nfcal_xor_percal.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/package/mac80211/patches/566-ath9k_nfcal_xor_percal.patch b/package/mac80211/patches/566-ath9k_nfcal_xor_percal.patch
new file mode 100644
index 0000000000..917bc2d946
--- /dev/null
+++ b/package/mac80211/patches/566-ath9k_nfcal_xor_percal.patch
@@ -0,0 +1,42 @@
+--- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c
++++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c
+@@ -660,7 +660,6 @@ static void ar9002_hw_olc_temp_compensat
+ static int ar9002_hw_calibrate(struct ath_hw *ah, struct ath9k_channel *chan,
+ u8 rxchainmask, bool longcal)
+ {
+- bool iscaldone = true;
+ struct ath9k_cal_list *currCal = ah->cal_list_curr;
+ bool nfcal, nfcal_pending = false;
+ int ret;
+@@ -672,15 +671,13 @@ static int ar9002_hw_calibrate(struct at
+ if (currCal && !nfcal &&
+ (currCal->calState == CAL_RUNNING ||
+ currCal->calState == CAL_WAITING)) {
+- iscaldone = ar9002_hw_per_calibration(ah, chan,
+- rxchainmask, currCal);
+- if (iscaldone) {
+- ah->cal_list_curr = currCal = currCal->calNext;
+-
+- if (currCal->calState == CAL_WAITING) {
+- iscaldone = false;
+- ath9k_hw_reset_calibration(ah, currCal);
+- }
++ if (!ar9002_hw_per_calibration(ah, chan, rxchainmask, currCal))
++ return 0;
++
++ ah->cal_list_curr = currCal = currCal->calNext;
++ if (currCal->calState == CAL_WAITING) {
++ ath9k_hw_reset_calibration(ah, currCal);
++ return 0;
+ }
+ }
+
+@@ -710,7 +707,7 @@ static int ar9002_hw_calibrate(struct at
+ }
+ }
+
+- return iscaldone;
++ return 1;
+ }
+
+ /* Carrier leakage Calibration fix */