ath9k_hw: fix PA predistortion miscalibration
authorFelix Fietkau <nbd@openwrt.org>
Tue, 28 May 2013 16:04:44 +0000 (18:04 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 29 May 2013 19:22:42 +0000 (15:22 -0400)
commit9c8426fc79eef00464d33e774085395cac41d091
treeb260e611319bbe1165f8879922c60e0afbb071a1
parentb338f74e33e33616e8fe498b5b09da8a84a7b218
ath9k_hw: fix PA predistortion miscalibration

If any bins from the training data are skipped (i != max_index), the
calculated compensation curve gets distorted, and the signal will be
wildly overamplified. This may be the cause of the reported hardware
damage that was caused by PA predistortion (because of which PAPRD was
disabled by default).

When calculating the x_est, Y, theta values, the use of max_index and i
was reversed. i points to the bin index whereas max_index refers to the
index of the calculated arrays.

Note that PA predistortion is still disabled, it will be re-enabled
after it has been properly validated.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ar9003_paprd.c