Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 214637
b: refs/heads/master
c: 85f4d64
h: refs/heads/master
i:
  214635: a063520
v: v3
  • Loading branch information
Lars Ericsson authored and John W. Linville committed Sep 14, 2010
1 parent bae728c commit 47f965b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 58d7e0f37cfc5b4f473d437024a03d874e5969a3
refs/heads/master: 85f4d6488cba35d3bb58833edbcb28faaffdd37c
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/rt2x00/rt2x00config.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@ void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev,
*/
if (!(ant->flags & ANTENNA_RX_DIVERSITY))
config.rx = rt2x00lib_config_antenna_check(config.rx, def->rx);
else
else if(config.rx == ANTENNA_SW_DIVERSITY)
config.rx = active->rx;

if (!(ant->flags & ANTENNA_TX_DIVERSITY))
config.tx = rt2x00lib_config_antenna_check(config.tx, def->tx);
else
else if (config.tx == ANTENNA_SW_DIVERSITY)
config.tx = active->tx;

/*
Expand Down
12 changes: 4 additions & 8 deletions trunk/drivers/net/wireless/rt2x00/rt2x00link.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,31 +188,27 @@ static void rt2x00lib_antenna_diversity_eval(struct rt2x00_dev *rt2x00dev)
static bool rt2x00lib_antenna_diversity(struct rt2x00_dev *rt2x00dev)
{
struct link_ant *ant = &rt2x00dev->link.ant;
unsigned int flags = ant->flags;

/*
* Determine if software diversity is enabled for
* either the TX or RX antenna (or both).
* Always perform this check since within the link
* tuner interval the configuration might have changed.
*/
flags &= ~ANTENNA_RX_DIVERSITY;
flags &= ~ANTENNA_TX_DIVERSITY;
ant->flags &= ~ANTENNA_RX_DIVERSITY;
ant->flags &= ~ANTENNA_TX_DIVERSITY;

if (rt2x00dev->default_ant.rx == ANTENNA_SW_DIVERSITY)
flags |= ANTENNA_RX_DIVERSITY;
ant->flags |= ANTENNA_RX_DIVERSITY;
if (rt2x00dev->default_ant.tx == ANTENNA_SW_DIVERSITY)
flags |= ANTENNA_TX_DIVERSITY;
ant->flags |= ANTENNA_TX_DIVERSITY;

if (!(ant->flags & ANTENNA_RX_DIVERSITY) &&
!(ant->flags & ANTENNA_TX_DIVERSITY)) {
ant->flags = 0;
return true;
}

/* Update flags */
ant->flags = flags;

/*
* If we have only sampled the data over the last period
* we should now harvest the data. Otherwise just evaluate
Expand Down

0 comments on commit 47f965b

Please sign in to comment.