diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00mac.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 188f89177bd8..48636b0dd895 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -339,7 +339,6 @@ int rt2x00mac_config(struct ieee80211_hw *hw, u32 changed) | |||
339 | { | 339 | { |
340 | struct rt2x00_dev *rt2x00dev = hw->priv; | 340 | struct rt2x00_dev *rt2x00dev = hw->priv; |
341 | struct ieee80211_conf *conf = &hw->conf; | 341 | struct ieee80211_conf *conf = &hw->conf; |
342 | int radio_on; | ||
343 | int status; | 342 | int status; |
344 | 343 | ||
345 | /* | 344 | /* |
@@ -356,7 +355,6 @@ int rt2x00mac_config(struct ieee80211_hw *hw, u32 changed) | |||
356 | * some configuration parameters (e.g. channel and antenna values) can | 355 | * some configuration parameters (e.g. channel and antenna values) can |
357 | * only be set when the radio is enabled. | 356 | * only be set when the radio is enabled. |
358 | */ | 357 | */ |
359 | radio_on = test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags); | ||
360 | if (conf->radio_enabled) { | 358 | if (conf->radio_enabled) { |
361 | /* For programming the values, we have to turn RX off */ | 359 | /* For programming the values, we have to turn RX off */ |
362 | rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF); | 360 | rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF); |
@@ -372,6 +370,17 @@ int rt2x00mac_config(struct ieee80211_hw *hw, u32 changed) | |||
372 | */ | 370 | */ |
373 | rt2x00lib_config(rt2x00dev, conf, changed); | 371 | rt2x00lib_config(rt2x00dev, conf, changed); |
374 | 372 | ||
373 | /* | ||
374 | * The radio was enabled, configure the antenna to the | ||
375 | * default settings, the link tuner will later start | ||
376 | * continue configuring the antenna based on the software | ||
377 | * diversity. But for non-diversity configurations, we need | ||
378 | * to have configured the correct state now. | ||
379 | */ | ||
380 | if (changed & IEEE80211_CONF_CHANGE_RADIO_ENABLED) | ||
381 | rt2x00lib_config_antenna(rt2x00dev, | ||
382 | &rt2x00dev->default_ant); | ||
383 | |||
375 | /* Turn RX back on */ | 384 | /* Turn RX back on */ |
376 | rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON); | 385 | rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON); |
377 | } else { | 386 | } else { |