summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rt2x00/rt2x00config.c
diff options
context:
space:
mode:
authorLars Ericsson <lars_ericsson@telia.com>2010-09-08 20:55:36 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-09-14 16:03:43 -0400
commit85f4d6488cba35d3bb58833edbcb28faaffdd37c (patch)
tree8bd04ff80a54cfcf86c7f017de892f694af63ed8 /drivers/net/wireless/rt2x00/rt2x00config.c
parent58d7e0f37cfc5b4f473d437024a03d874e5969a3 (diff)
rt2x00: Antenna diversity does not work in 2.6.35
The test if antenna diversity is at all enabled uses a local variable 'flags' to prepare the test condition, but uses 'ant->flags' when the test is evaluated. The effect is that the diversity evaluation will never start. I can see two solutions, use the 'flag' in the test condition or revert the local flag change. My attached patch took alternative two. Then the evaluation start but it will still not switch antenna. The problem is a code section in rt2x00lib_config_antenna (). The effect of that code section is that any change the diversity function perform will be effectively shorten and no antenna selection command issued. The attached patch will filter out any ANTENNA_SW_DIVERSITY setting but forward all other Signed-off-by: Lars Ericsson <lars_ericsson@telia.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00config.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c
index 34f34fa7f53a..db09a641a948 100644
--- a/drivers/net/wireless/rt2x00/rt2x00config.c
+++ b/drivers/net/wireless/rt2x00/rt2x00config.c
@@ -129,12 +129,12 @@ void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev,
*/
if (!(ant->flags & ANTENNA_RX_DIVERSITY))
config.rx = rt2x00lib_config_antenna_check(config.rx, def->rx);
- else
+ else if(config.rx == ANTENNA_SW_DIVERSITY)
config.rx = active->rx;
if (!(ant->flags & ANTENNA_TX_DIVERSITY))
config.tx = rt2x00lib_config_antenna_check(config.tx, def->tx);
- else
+ else if (config.tx == ANTENNA_SW_DIVERSITY)
config.tx = active->tx;
/*