aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches/300-pending_work.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-01-10 14:10:41 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-01-10 14:10:41 +0000
commit6aaeca8067b82c7e41d8eabd9777093c29802644 (patch)
tree363d68c37410877732c2053ed0b3bd4b04cf9aeb /package/mac80211/patches/300-pending_work.patch
parentc28e2ffe8f647dce7d0433120d059d116cdda298 (diff)
downloadupstream-6aaeca8067b82c7e41d8eabd9777093c29802644.tar.gz
upstream-6aaeca8067b82c7e41d8eabd9777093c29802644.tar.bz2
upstream-6aaeca8067b82c7e41d8eabd9777093c29802644.zip
ath9k: add some calibration fixes from wireless-testing
Backport r35081 git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@35082 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/300-pending_work.patch')
-rw-r--r--package/mac80211/patches/300-pending_work.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/package/mac80211/patches/300-pending_work.patch b/package/mac80211/patches/300-pending_work.patch
index 753386de97..87493e488e 100644
--- a/package/mac80211/patches/300-pending_work.patch
+++ b/package/mac80211/patches/300-pending_work.patch
@@ -1262,3 +1262,51 @@
if (sc->rx.frag) {
dev_kfree_skb_any(sc->rx.frag);
+--- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c
++++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
+@@ -893,7 +893,7 @@ static bool ar9003_hw_init_cal(struct at
+ struct ath9k_hw_cal_data *caldata = ah->caldata;
+ bool txiqcal_done = false, txclcal_done = false;
+ bool is_reusable = true, status = true;
+- bool run_rtt_cal = false, run_agc_cal;
++ bool run_rtt_cal = false, run_agc_cal, sep_iq_cal = false;
+ bool rtt = !!(ah->caps.hw_caps & ATH9K_HW_CAP_RTT);
+ u32 agc_ctrl = 0, agc_supp_cals = AR_PHY_AGC_CONTROL_OFFSET_CAL |
+ AR_PHY_AGC_CONTROL_FLTR_CAL |
+@@ -939,7 +939,8 @@ static bool ar9003_hw_init_cal(struct at
+ }
+ }
+
+- if (!(ah->enabled_cals & TX_IQ_CAL))
++ if ((IS_CHAN_HALF_RATE(chan) || IS_CHAN_QUARTER_RATE(chan)) ||
++ !(ah->enabled_cals & TX_IQ_CAL))
+ goto skip_tx_iqcal;
+
+ /* Do Tx IQ Calibration */
+@@ -959,21 +960,22 @@ static bool ar9003_hw_init_cal(struct at
+ REG_CLR_BIT(ah, AR_PHY_TX_IQCAL_CONTROL_0,
+ AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL);
+ txiqcal_done = run_agc_cal = true;
+- goto skip_tx_iqcal;
+- } else if (caldata && !caldata->done_txiqcal_once)
++ } else if (caldata && !caldata->done_txiqcal_once) {
+ run_agc_cal = true;
++ sep_iq_cal = true;
++ }
+
++skip_tx_iqcal:
+ if (ath9k_hw_mci_is_enabled(ah) && IS_CHAN_2GHZ(chan) && run_agc_cal)
+ ar9003_mci_init_cal_req(ah, &is_reusable);
+
+- if (!(IS_CHAN_HALF_RATE(chan) || IS_CHAN_QUARTER_RATE(chan))) {
++ if (sep_iq_cal) {
+ txiqcal_done = ar9003_hw_tx_iq_cal_run(ah);
+ REG_WRITE(ah, AR_PHY_ACTIVE, AR_PHY_ACTIVE_DIS);
+ udelay(5);
+ REG_WRITE(ah, AR_PHY_ACTIVE, AR_PHY_ACTIVE_EN);
+ }
+
+-skip_tx_iqcal:
+ if (run_agc_cal || !(ah->ah_flags & AH_FASTCC)) {
+ /* Calibrate the AGC */
+ REG_WRITE(ah, AR_PHY_AGC_CONTROL,