diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-07-27 09:06:21 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-08-01 15:31:34 -0400 |
commit | ada662f3eb6231ab27f5e6366d4e5c395d25edd3 (patch) | |
tree | fa692676e6ecdfbf28d3aae1e10271237ef16592 /drivers/net/wireless/rt2x00/rt2x00config.c | |
parent | d2b690714cd7d328561bfb9bf941edd6a3316a85 (diff) |
rt2x00: Fix partial antenna configuration
The if-statement to determine the new TX/RX antenna
configuration was incomplete. It lacks the general
else-clause when the antenna wasn't changed.
This is a correct event, since it can occur when only
one of the antenna's has been changed or when the new
configuration is being forced (like when the interface
has just been added).
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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c index 3f89516e8332..d134c3be539a 100644 --- a/drivers/net/wireless/rt2x00/rt2x00config.c +++ b/drivers/net/wireless/rt2x00/rt2x00config.c | |||
@@ -254,6 +254,8 @@ config: | |||
254 | libconf.ant.rx = default_ant->rx; | 254 | libconf.ant.rx = default_ant->rx; |
255 | else if (active_ant->rx == ANTENNA_SW_DIVERSITY) | 255 | else if (active_ant->rx == ANTENNA_SW_DIVERSITY) |
256 | libconf.ant.rx = ANTENNA_B; | 256 | libconf.ant.rx = ANTENNA_B; |
257 | else | ||
258 | libconf.ant.rx = active_ant->rx; | ||
257 | 259 | ||
258 | if (conf->antenna_sel_tx) | 260 | if (conf->antenna_sel_tx) |
259 | libconf.ant.tx = conf->antenna_sel_tx; | 261 | libconf.ant.tx = conf->antenna_sel_tx; |
@@ -261,6 +263,8 @@ config: | |||
261 | libconf.ant.tx = default_ant->tx; | 263 | libconf.ant.tx = default_ant->tx; |
262 | else if (active_ant->tx == ANTENNA_SW_DIVERSITY) | 264 | else if (active_ant->tx == ANTENNA_SW_DIVERSITY) |
263 | libconf.ant.tx = ANTENNA_B; | 265 | libconf.ant.tx = ANTENNA_B; |
266 | else | ||
267 | libconf.ant.tx = active_ant->tx; | ||
264 | } | 268 | } |
265 | 269 | ||
266 | if (flags & CONFIG_UPDATE_SLOT_TIME) { | 270 | if (flags & CONFIG_UPDATE_SLOT_TIME) { |