diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-05-28 16:07:29 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-05-28 16:07:29 +0000 |
commit | e875338294db0a1866a764b265bedba369c5f72a (patch) | |
tree | d09025b3b2aaf5710d14dcd8e60d31041f3998fa /package/mac80211/patches | |
parent | e6250644be2b94bd8be657464030e699e5d87f18 (diff) | |
download | upstream-e875338294db0a1866a764b265bedba369c5f72a.tar.gz upstream-e875338294db0a1866a764b265bedba369c5f72a.tar.bz2 upstream-e875338294db0a1866a764b265bedba369c5f72a.zip |
ath9k: fix some issues in PA predistortion (still disabled by default)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 36744
Diffstat (limited to 'package/mac80211/patches')
-rw-r--r-- | package/mac80211/patches/300-pending_work.patch | 41 |
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; + } + + /* |