diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00dev.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index c4be2ac4d7a4..00f5f0d49e1d 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -293,7 +293,7 @@ static void rt2x00lib_evaluate_antenna_eval(struct rt2x00_dev *rt2x00dev) | |||
293 | * sample the rssi from the other antenna to make a valid | 293 | * sample the rssi from the other antenna to make a valid |
294 | * comparison between the 2 antennas. | 294 | * comparison between the 2 antennas. |
295 | */ | 295 | */ |
296 | if ((rssi_curr - rssi_old) > -5 || (rssi_curr - rssi_old) < 5) | 296 | if (abs(rssi_curr - rssi_old) < 5) |
297 | return; | 297 | return; |
298 | 298 | ||
299 | rt2x00dev->link.ant.flags |= ANTENNA_MODE_SAMPLE; | 299 | rt2x00dev->link.ant.flags |= ANTENNA_MODE_SAMPLE; |
@@ -319,10 +319,10 @@ static void rt2x00lib_evaluate_antenna(struct rt2x00_dev *rt2x00dev) | |||
319 | rt2x00dev->link.ant.flags &= ~ANTENNA_TX_DIVERSITY; | 319 | rt2x00dev->link.ant.flags &= ~ANTENNA_TX_DIVERSITY; |
320 | 320 | ||
321 | if (rt2x00dev->hw->conf.antenna_sel_rx == 0 && | 321 | if (rt2x00dev->hw->conf.antenna_sel_rx == 0 && |
322 | rt2x00dev->default_ant.rx != ANTENNA_SW_DIVERSITY) | 322 | rt2x00dev->default_ant.rx == ANTENNA_SW_DIVERSITY) |
323 | rt2x00dev->link.ant.flags |= ANTENNA_RX_DIVERSITY; | 323 | rt2x00dev->link.ant.flags |= ANTENNA_RX_DIVERSITY; |
324 | if (rt2x00dev->hw->conf.antenna_sel_tx == 0 && | 324 | if (rt2x00dev->hw->conf.antenna_sel_tx == 0 && |
325 | rt2x00dev->default_ant.tx != ANTENNA_SW_DIVERSITY) | 325 | rt2x00dev->default_ant.tx == ANTENNA_SW_DIVERSITY) |
326 | rt2x00dev->link.ant.flags |= ANTENNA_TX_DIVERSITY; | 326 | rt2x00dev->link.ant.flags |= ANTENNA_TX_DIVERSITY; |
327 | 327 | ||
328 | if (!(rt2x00dev->link.ant.flags & ANTENNA_RX_DIVERSITY) && | 328 | if (!(rt2x00dev->link.ant.flags & ANTENNA_RX_DIVERSITY) && |