rt2800: add chipset revision RT5390R support (Closes: #696592)
svn path=/dists/sid/linux/; revision=19664
This commit is contained in:
parent
ac15a4b9c5
commit
9de27b708b
|
@ -3,6 +3,7 @@ linux (3.2.35-3) UNRELEASED; urgency=low
|
|||
[ Ben Hutchings ]
|
||||
* Input: wacom - fix touch support for Bamboo Fun CTH-461
|
||||
* media/rc: Add iguanair driver from Linux 3.7 (Closes: #696925)
|
||||
* rt2800: add chipset revision RT5390R support (Closes: #696592)
|
||||
|
||||
-- Ben Hutchings <ben@decadent.org.uk> Thu, 27 Dec 2012 02:17:44 +0100
|
||||
|
||||
|
|
69
debian/patches/features/all/rt2800-add-chipset-revision-RT5390R-support.patch
vendored
Normal file
69
debian/patches/features/all/rt2800-add-chipset-revision-RT5390R-support.patch
vendored
Normal file
|
@ -0,0 +1,69 @@
|
|||
From: Anisse Astier <anisse@astier.eu>
|
||||
Date: Mon, 23 Apr 2012 12:33:11 +0200
|
||||
Subject: rt2800: add chipset revision RT5390R support
|
||||
|
||||
commit 0586a11b5cc51413240e6688936e2edac9c2918e upstream.
|
||||
|
||||
About 70% of the chips with revision RT5390R initialize incorrectly, using
|
||||
the auxiliary antenna instead of the main one. The net result is that
|
||||
signal reception is very poor (no AP further than 1M).
|
||||
|
||||
This chipset differs from RT5390 and RT5390F by its support of hardware
|
||||
antenna diversity. Therefore antenna selection should be done
|
||||
differently, by disabling software features and previously selected
|
||||
antenna.
|
||||
|
||||
This changeset does just that, and makes all RT5390R work properly.
|
||||
|
||||
This is based on Ralink's 2012_03_22_RT5572_Linux_STA_v2.6.0.0_DPO
|
||||
driver.
|
||||
|
||||
Signed-off-by: Anisse Astier <anisse@astier.eu>
|
||||
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
||||
---
|
||||
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 1c4d750..d91f4f6 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..1cd16b4 100644
|
||||
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
|
||||
@@ -3356,6 +3356,13 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
|
||||
rt2800_register_write(rt2x00dev, GPIO_CTRL_CFG, reg);
|
||||
}
|
||||
|
||||
+ /* This chip has hardware antenna diversity*/
|
||||
+ if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390R)) {
|
||||
+ rt2800_bbp_write(rt2x00dev, 150, 0); /* Disable Antenna Software OFDM */
|
||||
+ rt2800_bbp_write(rt2x00dev, 151, 0); /* Disable Antenna Software CCK */
|
||||
+ rt2800_bbp_write(rt2x00dev, 154, 0); /* Clear previously selected antenna */
|
||||
+ }
|
||||
+
|
||||
rt2800_bbp_read(rt2x00dev, 152, &value);
|
||||
if (ant == 0)
|
||||
rt2x00_set_field8(&value, BBP152_RX_DEFAULT_ANT, 1);
|
||||
@@ -4291,6 +4298,11 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
|
||||
rt2x00dev->default_ant.rx = ANTENNA_A;
|
||||
}
|
||||
|
||||
+ if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390R)) {
|
||||
+ rt2x00dev->default_ant.tx = ANTENNA_HW_DIVERSITY; /* Unused */
|
||||
+ rt2x00dev->default_ant.rx = ANTENNA_HW_DIVERSITY; /* Unused */
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* Determine external LNA informations.
|
||||
*/
|
|
@ -453,3 +453,4 @@ features/all/iguanair/0008-media-iguanair-fix-receiver-overflow.patch
|
|||
features/all/iguanair/0009-media-rc-do-not-wake-up-rc-thread-unless-there-is-so.patch
|
||||
features/all/iguanair/0010-media-iguanair-do-not-modify-transmit-buffer.patch
|
||||
features/all/iguanair/0011-media-iguanair-cannot-send-data-from-the-stack.patch
|
||||
features/all/rt2800-add-chipset-revision-RT5390R-support.patch
|
||||
|
|
Loading…
Reference in New Issue