aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-05-28 16:07:29 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-05-28 16:07:29 +0000
commit82d0836e7b7cd543a5efd03462a4c56bff07c2ed (patch)
tree7473df67fa6f1243a3c261043a2ab8e51fdda149 /package
parentfbe37f1e87c47fddb562fd1cd84f1ee2240f97e5 (diff)
downloadupstream-82d0836e7b7cd543a5efd03462a4c56bff07c2ed.tar.gz
upstream-82d0836e7b7cd543a5efd03462a4c56bff07c2ed.tar.bz2
upstream-82d0836e7b7cd543a5efd03462a4c56bff07c2ed.zip
ath9k: fix some issues in PA predistortion (still disabled by default)
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36744 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r--package/mac80211/patches/300-pending_work.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/package/mac80211/patches/300-pending_work.patch b/package/mac80211/patches/300-pending_work.patch
index 8c43574ee8..33120a0903 100644
--- a/package/mac80211/patches/300-pending_work.patch
+++ b/package/mac80211/patches/300-pending_work.patch
@@ -4570,3 +4570,44 @@
return -EINVAL;
trace_drv_add_interface(local, sdata);
+--- a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
++++ b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
+@@ -454,6 +454,8 @@ static bool create_pa_curve(u32 *data_L,
+ if (accum_cnt <= thresh_accum_cnt)
+ continue;
+
++ max_index++;
++
+ /* sum(tx amplitude) */
+ accum_tx = ((data_L[i] >> 16) & 0xffff) |
+ ((data_U[i] & 0x7ff) << 16);
+@@ -468,20 +470,21 @@ static bool create_pa_curve(u32 *data_L,
+
+ accum_tx <<= scale_factor;
+ accum_rx <<= scale_factor;
+- x_est[i + 1] = (((accum_tx + accum_cnt) / accum_cnt) + 32) >>
+- scale_factor;
++ x_est[max_index] =
++ (((accum_tx + accum_cnt) / accum_cnt) + 32) >>
++ scale_factor;
+
+- Y[i + 1] = ((((accum_rx + accum_cnt) / accum_cnt) + 32) >>
++ Y[max_index] =
++ ((((accum_rx + accum_cnt) / accum_cnt) + 32) >>
+ scale_factor) +
+- (1 << scale_factor) * max_index + 16;
++ (1 << scale_factor) * i + 16;
+
+ if (accum_ang >= (1 << 26))
+ accum_ang -= 1 << 27;
+
+- theta[i + 1] = ((accum_ang * (1 << scale_factor)) + accum_cnt) /
+- accum_cnt;
+-
+- max_index++;
++ theta[max_index] =
++ ((accum_ang * (1 << scale_factor)) + accum_cnt) /
++ accum_cnt;
+ }
+
+ /*