linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] rt2x00: rt2800lib: fix default VGC values for RT3593
@ 2013-10-01 18:03 Gabor Juhos
  2013-10-01 18:03 ` [PATCH 2/3] rt2x00: rt2800lib: fix VGC level adjustment for RT3572 and RT3593 Gabor Juhos
  2013-10-01 18:03 ` [PATCH 3/3] rt2x00: rt2800lib: fix VGC programming " Gabor Juhos
  0 siblings, 2 replies; 4+ messages in thread
From: Gabor Juhos @ 2013-10-01 18:03 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, users, Gabor Juhos

Update the rt2800_get_default_vgc function to use the same VGC
values that the DPO_RT5572_LinuxSTA_2.6.1.3_20121022 reference
driver uses.

References:
  RT35xx_ChipAGCAdjust in chips/rt35xx.c
  RT3593_R66_MID_LOW_SENS_GET macro in include/chip/rt3593.h
  RT3593_R66_NON_MID_LOW_SEMS_GET macro in include/chips/rt3593.h

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
---
 drivers/net/wireless/rt2x00/rt2800lib.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index f414978..25c550a 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -4413,6 +4413,7 @@ static u8 rt2800_get_default_vgc(struct rt2x00_dev *rt2x00dev)
 		    rt2x00_rt(rt2x00dev, RT3290) ||
 		    rt2x00_rt(rt2x00dev, RT3390) ||
 		    rt2x00_rt(rt2x00dev, RT3572) ||
+		    rt2x00_rt(rt2x00dev, RT3593) ||
 		    rt2x00_rt(rt2x00dev, RT5390) ||
 		    rt2x00_rt(rt2x00dev, RT5392) ||
 		    rt2x00_rt(rt2x00dev, RT5592))
@@ -4422,6 +4423,8 @@ static u8 rt2800_get_default_vgc(struct rt2x00_dev *rt2x00dev)
 	} else { /* 5GHZ band */
 		if (rt2x00_rt(rt2x00dev, RT3572))
 			vgc = 0x22 + (rt2x00dev->lna_gain * 5) / 3;
+		else if (rt2x00_rt(rt2x00dev, RT3593))
+			vgc = 0x20 + (rt2x00dev->lna_gain * 5) / 3;
 		else if (rt2x00_rt(rt2x00dev, RT5592))
 			vgc = 0x24 + (2 * rt2x00dev->lna_gain);
 		else {
-- 
1.7.10

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

end of thread, other threads:[~2013-10-03 16:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-01 18:03 [PATCH 1/3] rt2x00: rt2800lib: fix default VGC values for RT3593 Gabor Juhos
2013-10-01 18:03 ` [PATCH 2/3] rt2x00: rt2800lib: fix VGC level adjustment for RT3572 and RT3593 Gabor Juhos
2013-10-03 16:40   ` Gabor Juhos
2013-10-01 18:03 ` [PATCH 3/3] rt2x00: rt2800lib: fix VGC programming " Gabor Juhos

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).