OSDN Git Service

rt2x00: Antenna diversity does not work in 2.6.35
authorLars Ericsson <lars_ericsson@telia.com>
Wed, 8 Sep 2010 18:55:36 +0000 (20:55 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 14 Sep 2010 20:03:43 +0000 (16:03 -0400)
commit85f4d6488cba35d3bb58833edbcb28faaffdd37c
tree8bd04ff80a54cfcf86c7f017de892f694af63ed8
parent58d7e0f37cfc5b4f473d437024a03d874e5969a3
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>
drivers/net/wireless/rt2x00/rt2x00config.c
drivers/net/wireless/rt2x00/rt2x00link.c