linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rt2800: fix RT5592 TX power settings regression
@ 2014-11-05 17:03 Ronald Wahl
  2014-11-06 10:27 ` Stanislaw Gruszka
  0 siblings, 1 reply; 6+ messages in thread
From: Ronald Wahl @ 2014-11-05 17:03 UTC (permalink / raw)
  To: users; +Cc: linux-wireless

Commit cee2c7315f60beeff6137ee59e99acc77d636eeb (rt2800: fix RT5390 &
RT3290 TX power settings regression) needs to be extended for the RT5592
chipset as well. But at least for the RT5592 the existing regression fix is
not right because the value returned from rt2800_get_gain_calibration_delta()
is bogus as it is generated by an unappropriate algorithm. This can cause
severe connection issues with sticks that have external ALC enabled like the
Netis WF2150 because of too low TX power at least during the scan process.

So the fix for now is not to call rt2800_get_gain_calibration_delta()
for the RT5592 chipset. I do not touch the existing regression fix for
RT5390 & RT3290 but I think they may need a rework as well.

Signed-off-by: Ronald Wahl <ronald.wahl@raritan.com>
---
 drivers/net/wireless/rt2x00/rt2800lib.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 9f57a2d..66f3546 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -4118,8 +4118,12 @@ static void rt2800_config_txpower_rt28xx(struct rt2x00_dev *rt2x00dev,
 	 * to temperature or maybe other factors) is smaller or bigger than
 	 * expected. We adjust it, based on TSSI reference and boundaries values
 	 * provided in EEPROM.
+	 *
+	 * TODO: add different temperature compensation code for RT5592
 	 */
-	delta += rt2800_get_gain_calibration_delta(rt2x00dev);
+	if (!rt2x00_rt(rt2x00dev, RT5592)) {
+	    delta += rt2800_get_gain_calibration_delta(rt2x00dev);
+	}
 
 	/*
 	 * Decrease power according to user settings, on devices with unknown
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-11-25 14:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-05 17:03 [PATCH] rt2800: fix RT5592 TX power settings regression Ronald Wahl
2014-11-06 10:27 ` Stanislaw Gruszka
2014-11-20 21:09   ` [rt2x00-users] " John W. Linville
2014-11-21  9:39     ` Ronald Wahl
2014-11-25 13:57       ` Stanislaw Gruszka
2014-11-25 14:17         ` [PATCH] rt2800: calculate tx power temperature compensation on selected chips Stanislaw Gruszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).