summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Boyer <jwboyer@redhat.com>2013-06-12 07:31:43 -0400
committerJosh Boyer <jwboyer@redhat.com>2013-06-12 07:34:42 -0400
commit972606b89510fd527f7a08372f4e8e404bf4113f (patch)
tree47ea450e0aeae58d4c245a4657b5e5779b141a01
parent18e50ce8f8d390b47ed295bbe96566c6bccf7e6f (diff)
downloadkernel-972606b89510fd527f7a08372f4e8e404bf4113f.tar.gz
kernel-972606b89510fd527f7a08372f4e8e404bf4113f.tar.xz
kernel-972606b89510fd527f7a08372f4e8e404bf4113f.zip
Add fix for rt5390/rt3290 regression (rhbz 950735)
-rw-r--r--kernel.spec9
-rw-r--r--rt2800-fix-RT5390-RT3290-TX-power-settings-regression.patch71
2 files changed, 80 insertions, 0 deletions
diff --git a/kernel.spec b/kernel.spec
index 50da9e506..50818e82b 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -767,6 +767,9 @@ Patch25040: tuntap-set-SOCK_ZEROCOPY-flag-during-open.patch
Patch25041: x86-mtrr-Fix-original-mtrr-range-get-for-mtrr_cleanup.patch
Patch25042: x86-range-make-add_range-use-blank-slot.patch
+#rhbz 950735
+Patch25045: rt2800-fix-RT5390-RT3290-TX-power-settings-regression.patch
+
# END OF PATCH DEFINITIONS
%endif
@@ -1478,6 +1481,9 @@ ApplyPatch tuntap-set-SOCK_ZEROCOPY-flag-during-open.patch
ApplyPatch x86-mtrr-Fix-original-mtrr-range-get-for-mtrr_cleanup.patch
ApplyPatch x86-range-make-add_range-use-blank-slot.patch
+#rhbz 950735
+ApplyPatch rt2800-fix-RT5390-RT3290-TX-power-settings-regression.patch
+
# END OF PATCH APPLICATIONS
%endif
@@ -2283,6 +2289,9 @@ fi
# ||----w |
# || ||
%changelog
+* Wed Jun 12 2013 Josh Boyer <jwboyer@redhat.com>
+- Add fix for rt5390/rt3290 regression (rhbz 950735)
+
* Tue Jun 11 2013 Dave Jones <davej@redhat.com>
- Disable soft lockup detector on virtual machines. (rhbz 971139)
diff --git a/rt2800-fix-RT5390-RT3290-TX-power-settings-regression.patch b/rt2800-fix-RT5390-RT3290-TX-power-settings-regression.patch
new file mode 100644
index 000000000..354873950
--- /dev/null
+++ b/rt2800-fix-RT5390-RT3290-TX-power-settings-regression.patch
@@ -0,0 +1,71 @@
+My change:
+
+commit cee2c7315f60beeff6137ee59e99acc77d636eeb
+Author: Stanislaw Gruszka <sgruszka@redhat.com>
+Date: Fri Oct 5 13:44:09 2012 +0200
+
+ rt2800: use BBP_R1 for setting tx power
+
+unfortunately does not work well with RT5390 and RT3290 chips as they
+require different temperature compensation TX power settings (TSSI
+tuning). Since that commit make wireless connection very unstable on
+those chips, restore previous behavior to fix regression. Once we
+implement proper TSSI tuning on 5390/3290 we can restore back setting
+TX power by BBP_R1 register for those chips.
+
+Reported-and-tested-by: Mike Romberg <mike-romberg@comcast.net>
+Cc: stable@vger.kernel.org
+Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
+---
+ drivers/net/wireless/rt2x00/rt2800lib.c | 29 ++++++++++++++++++-----------
+ 1 file changed, 18 insertions(+), 11 deletions(-)
+
+diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
+index 92849e5..8b679df 100644
+--- a/drivers/net/wireless/rt2x00/rt2800lib.c
++++ b/drivers/net/wireless/rt2x00/rt2800lib.c
+@@ -2634,19 +2634,26 @@ static void rt2800_config_txpower(struct rt2x00_dev *rt2x00dev,
+ * TODO: we do not use +6 dBm option to do not increase power beyond
+ * regulatory limit, however this could be utilized for devices with
+ * CAPABILITY_POWER_LIMIT.
++ *
++ * TODO: add different temperature compensation code for RT3290 & RT5390
++ * to allow to use BBP_R1 for those chips.
+ */
+- rt2800_bbp_read(rt2x00dev, 1, &r1);
+- if (delta <= -12) {
+- power_ctrl = 2;
+- delta += 12;
+- } else if (delta <= -6) {
+- power_ctrl = 1;
+- delta += 6;
+- } else {
+- power_ctrl = 0;
++ if (!rt2x00_rt(rt2x00dev, RT3290) &&
++ !rt2x00_rt(rt2x00dev, RT5390)) {
++ rt2800_bbp_read(rt2x00dev, 1, &r1);
++ if (delta <= -12) {
++ power_ctrl = 2;
++ delta += 12;
++ } else if (delta <= -6) {
++ power_ctrl = 1;
++ delta += 6;
++ } else {
++ power_ctrl = 0;
++ }
++ rt2x00_set_field8(&r1, BBP1_TX_POWER_CTRL, power_ctrl);
++ rt2800_bbp_write(rt2x00dev, 1, r1);
+ }
+- rt2x00_set_field8(&r1, BBP1_TX_POWER_CTRL, power_ctrl);
+- rt2800_bbp_write(rt2x00dev, 1, r1);
++
+ offset = TX_PWR_CFG_0;
+
+ for (i = 0; i < EEPROM_TXPOWER_BYRATE_SIZE; i += 2) {
+--
+1.7.11.7
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at http://vger.kernel.org/majordomo-info.html \ No newline at end of file