This is what I found: google rt5390 antenna diversity
--------------------------------------------------------------------------------------------------------------------
Ok, I've found a solution.

After looking into the latest ralink release, for chipset 5572, I saw
that rt5390 support was updated. And that support for the chip with rev
1502 was added, named RT5390R.
The only difference with "normal" 5390 is that this one supports hardware
antenna diversity, so the driver should tell the card which antenna to
use by default (the main one in my case).
This is replicated in the patch below, which has been tested on both
working and non-working 1502s, and is proving to work quite well.

I still don't know how to integrate this properly with rt2800pci's
antenna diversity code, since this is the first chipset to have hardware
antenna diversity in the rt2800 family (others had it in rt61 and rt73
for example).

I'll look into it over the next two weeks, and send a patch if no one
does before.


From: Anisse Astier <anisse at astier.eu>
Date: Tue, 17 Apr 2012 12:23:21 +0200
Subject: [PATCH] rt2800: add chipset RT5390R support

This is for testing Only !! Please don't merge !
---
 drivers/net/wireless/rt2x00/rt2800.h    |    1 +
 drivers/net/wireless/rt2x00/rt2800lib.c |   12 ++++++++++++
 2 files changed, 13 insertions(+)

diff --git a/drivers/net/wireless/rt2x00/rt2800.h 
b/drivers/net/wireless/rt2x00/rt2800.h
index 063bfa8..1ce2634 100644
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -83,6 +83,7 @@
 #define REV_RT3090E                    0x0211
 #define REV_RT3390E                    0x0211
 #define REV_RT5390F                    0x0502
+#define REV_RT5390R                    0x1502
 
 /*
  * Signal information.
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c 
b/drivers/net/wireless/rt2x00/rt2800lib.c
index bd19802..e94661f 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -3928,6 +3928,18 @@ static int rt2800_init_rfcsr(struct rt2x00_dev 
*rt2x00dev)
                rt2800_rfcsr_write(rt2x00dev, 30, rfcsr);
        }
 
+       if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390R)) {
+               rt2x00dev->default_ant.tx = ANTENNA_HW_DIVERSITY;
+               rt2x00dev->default_ant.rx = ANTENNA_HW_DIVERSITY;
+               rt2x00dev->default_ant.rx_chain_num = 0;
+               rt2x00dev->default_ant.tx_chain_num = 0;
+
+               rt2800_bbp_write(rt2x00dev, 150, 0);
+               rt2800_bbp_write(rt2x00dev, 151, 0);
+               rt2800_bbp_write(rt2x00dev, 154, 0);
+               rt2800_bbp_write(rt2x00dev, 152, 0x80);
+       }
+
        return 0;
 }
 
--

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1067897

Title:
  new compaq with rt5390 has bad wireless

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1067897/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to