Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159237
b: refs/heads/master
c: eb87eaa
h: refs/heads/master
i:
  159235: ef161ba
v: v3
  • Loading branch information
Lars Ericsson authored and John W. Linville committed Jul 27, 2009
1 parent db68c54 commit d7d92f1
Show file tree
Hide file tree
Showing 5 changed files with 11 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: a272a720660059c30fa038113b77fa2a096437d9
refs/heads/master: eb87eaac52e916e28bcf3bd5974f3b581f6c0ae9
12 changes: 6 additions & 6 deletions trunk/drivers/net/wireless/rt2x00/rt2x00config.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ enum antenna rt2x00lib_config_antenna_check(enum antenna current_ant,
}

void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev,
struct antenna_setup *ant)
struct antenna_setup ant)
{
struct antenna_setup *def = &rt2x00dev->default_ant;
struct antenna_setup *active = &rt2x00dev->link.ant.active;
Expand All @@ -138,10 +138,10 @@ void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev,
* might have caused that we restore back to the already
* active setting. If that has happened we can quit.
*/
ant->rx = rt2x00lib_config_antenna_check(ant->rx, def->rx);
ant->tx = rt2x00lib_config_antenna_check(ant->tx, def->tx);
ant.rx = rt2x00lib_config_antenna_check(ant.rx, def->rx);
ant.tx = rt2x00lib_config_antenna_check(ant.tx, def->tx);

if (ant->rx == active->rx && ant->tx == active->tx)
if (ant.rx == active->rx && ant.tx == active->tx)
return;

/*
Expand All @@ -156,11 +156,11 @@ void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev,
* The latter is required since we need to recalibrate the
* noise-sensitivity ratio for the new setup.
*/
rt2x00dev->ops->lib->config_ant(rt2x00dev, ant);
rt2x00dev->ops->lib->config_ant(rt2x00dev, &ant);

rt2x00link_reset_tuner(rt2x00dev, true);

memcpy(active, ant, sizeof(*ant));
memcpy(active, &ant, sizeof(ant));

if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON_LINK);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/rt2x00/rt2x00lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void rt2x00lib_config_erp(struct rt2x00_dev *rt2x00dev,
struct rt2x00_intf *intf,
struct ieee80211_bss_conf *conf);
void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev,
struct antenna_setup *ant);
struct antenna_setup ant);
void rt2x00lib_config(struct rt2x00_dev *rt2x00dev,
struct ieee80211_conf *conf,
const unsigned int changed_flags);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/rt2x00/rt2x00link.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ static void rt2x00lib_antenna_diversity_sample(struct rt2x00_dev *rt2x00dev)
if (ant->flags & ANTENNA_TX_DIVERSITY)
new_ant.tx = (sample_a > sample_b) ? ANTENNA_A : ANTENNA_B;

rt2x00lib_config_antenna(rt2x00dev, &new_ant);
rt2x00lib_config_antenna(rt2x00dev, new_ant);
}

static void rt2x00lib_antenna_diversity_eval(struct rt2x00_dev *rt2x00dev)
Expand Down Expand Up @@ -213,7 +213,7 @@ static void rt2x00lib_antenna_diversity_eval(struct rt2x00_dev *rt2x00dev)
if (ant->flags & ANTENNA_TX_DIVERSITY)
new_ant.tx = (new_ant.tx == ANTENNA_A) ? ANTENNA_B : ANTENNA_A;

rt2x00lib_config_antenna(rt2x00dev, &new_ant);
rt2x00lib_config_antenna(rt2x00dev, new_ant);
}

static void rt2x00lib_antenna_diversity(struct rt2x00_dev *rt2x00dev)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/rt2x00/rt2x00mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ int rt2x00mac_config(struct ieee80211_hw *hw, u32 changed)
*/
if (changed & IEEE80211_CONF_CHANGE_RADIO_ENABLED)
rt2x00lib_config_antenna(rt2x00dev,
&rt2x00dev->default_ant);
rt2x00dev->default_ant);

/* Turn RX back on */
rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON);
Expand Down

0 comments on commit d7d92f1

Please sign in to comment.