diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00dev.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 00f5f0d49e1..7294c75272d 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -260,19 +260,11 @@ static void rt2x00lib_evaluate_antenna_sample(struct rt2x00_dev *rt2x00dev) | |||
260 | if (sample_a == sample_b) | 260 | if (sample_a == sample_b) |
261 | return; | 261 | return; |
262 | 262 | ||
263 | if (rt2x00dev->link.ant.flags & ANTENNA_RX_DIVERSITY) { | 263 | if (rt2x00dev->link.ant.flags & ANTENNA_RX_DIVERSITY) |
264 | if (sample_a > sample_b && rx == ANTENNA_B) | 264 | rx = (sample_a > sample_b) ? ANTENNA_A : ANTENNA_B; |
265 | rx = ANTENNA_A; | ||
266 | else if (rx == ANTENNA_A) | ||
267 | rx = ANTENNA_B; | ||
268 | } | ||
269 | 265 | ||
270 | if (rt2x00dev->link.ant.flags & ANTENNA_TX_DIVERSITY) { | 266 | if (rt2x00dev->link.ant.flags & ANTENNA_TX_DIVERSITY) |
271 | if (sample_a > sample_b && tx == ANTENNA_B) | 267 | tx = (sample_a > sample_b) ? ANTENNA_A : ANTENNA_B; |
272 | tx = ANTENNA_A; | ||
273 | else if (tx == ANTENNA_A) | ||
274 | tx = ANTENNA_B; | ||
275 | } | ||
276 | 268 | ||
277 | rt2x00lib_config_antenna(rt2x00dev, rx, tx); | 269 | rt2x00lib_config_antenna(rt2x00dev, rx, tx); |
278 | } | 270 | } |
@@ -327,7 +319,7 @@ static void rt2x00lib_evaluate_antenna(struct rt2x00_dev *rt2x00dev) | |||
327 | 319 | ||
328 | if (!(rt2x00dev->link.ant.flags & ANTENNA_RX_DIVERSITY) && | 320 | if (!(rt2x00dev->link.ant.flags & ANTENNA_RX_DIVERSITY) && |
329 | !(rt2x00dev->link.ant.flags & ANTENNA_TX_DIVERSITY)) { | 321 | !(rt2x00dev->link.ant.flags & ANTENNA_TX_DIVERSITY)) { |
330 | rt2x00dev->link.ant.flags &= ~ANTENNA_MODE_SAMPLE; | 322 | rt2x00dev->link.ant.flags = 0; |
331 | return; | 323 | return; |
332 | } | 324 | } |
333 | 325 | ||