|
@@ -293,7 +293,7 @@ static void rt2x00lib_evaluate_antenna_eval(struct rt2x00_dev *rt2x00dev)
|
|
|
* sample the rssi from the other antenna to make a valid
|
|
|
* comparison between the 2 antennas.
|
|
|
*/
|
|
|
- if ((rssi_curr - rssi_old) > -5 || (rssi_curr - rssi_old) < 5)
|
|
|
+ if (abs(rssi_curr - rssi_old) < 5)
|
|
|
return;
|
|
|
|
|
|
rt2x00dev->link.ant.flags |= ANTENNA_MODE_SAMPLE;
|
|
@@ -319,10 +319,10 @@ static void rt2x00lib_evaluate_antenna(struct rt2x00_dev *rt2x00dev)
|
|
|
rt2x00dev->link.ant.flags &= ~ANTENNA_TX_DIVERSITY;
|
|
|
|
|
|
if (rt2x00dev->hw->conf.antenna_sel_rx == 0 &&
|
|
|
- rt2x00dev->default_ant.rx != ANTENNA_SW_DIVERSITY)
|
|
|
+ rt2x00dev->default_ant.rx == ANTENNA_SW_DIVERSITY)
|
|
|
rt2x00dev->link.ant.flags |= ANTENNA_RX_DIVERSITY;
|
|
|
if (rt2x00dev->hw->conf.antenna_sel_tx == 0 &&
|
|
|
- rt2x00dev->default_ant.tx != ANTENNA_SW_DIVERSITY)
|
|
|
+ rt2x00dev->default_ant.tx == ANTENNA_SW_DIVERSITY)
|
|
|
rt2x00dev->link.ant.flags |= ANTENNA_TX_DIVERSITY;
|
|
|
|
|
|
if (!(rt2x00dev->link.ant.flags & ANTENNA_RX_DIVERSITY) &&
|