diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-10-29 12:17:57 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-11-10 15:17:33 -0500 |
commit | e4ea1c403acece78c271bf9cd6f797d1cb093df9 (patch) | |
tree | 4356693a16f2596de08f6afee76490f1ebe6b066 /drivers/net/wireless/rt2x00/rt2x00mac.c | |
parent | 3f64b435ab76e79bfb3b4d36f043e6f892093b71 (diff) |
rt2x00: Optimize configuration handling
Implement latest changed from mac80211 configuration
handling to optmize configuration handling in rt2x00.
* Remove set_retry_limit callback function, handled
through config()
* Move config_antenna to its own callback function,
it isn't handled by mac80211 anymore
* Use IEEE80211_CONF_CHANGED_* flags and remove manual
checks
* Removed deprecated short slot setting through config()
and put it in config_erp() through which mac80211 now
configures it
* Remove config_phymode() and move contents to config_erp()
since it only managed the basic rates which is now
determined by mac80211 through config_erp().
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00mac.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index b32d59eafaa3..3a3b5ad38023 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -349,15 +349,6 @@ int rt2x00mac_config(struct ieee80211_hw *hw, u32 changed) | |||
349 | if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) | 349 | if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) |
350 | return 0; | 350 | return 0; |
351 | 351 | ||
352 | if (changed & IEEE80211_CONF_CHANGE_RETRY_LIMITS) { | ||
353 | rt2x00dev->ops->lib->set_retry_limit(hw, | ||
354 | conf->short_frame_max_tx_count, | ||
355 | conf->long_frame_max_tx_count); | ||
356 | } | ||
357 | changed &= ~IEEE80211_CONF_CHANGE_RETRY_LIMITS; | ||
358 | if (!changed) | ||
359 | return 0; | ||
360 | |||
361 | /* | 352 | /* |
362 | * Only change device state when the radio is enabled. It does not | 353 | * Only change device state when the radio is enabled. It does not |
363 | * matter what parameters we have configured when the radio is disabled | 354 | * matter what parameters we have configured when the radio is disabled |
@@ -379,7 +370,7 @@ int rt2x00mac_config(struct ieee80211_hw *hw, u32 changed) | |||
379 | * When we've just turned on the radio, we want to reprogram | 370 | * When we've just turned on the radio, we want to reprogram |
380 | * everything to ensure a consistent state | 371 | * everything to ensure a consistent state |
381 | */ | 372 | */ |
382 | rt2x00lib_config(rt2x00dev, conf, !radio_on); | 373 | rt2x00lib_config(rt2x00dev, conf, changed); |
383 | 374 | ||
384 | /* Turn RX back on */ | 375 | /* Turn RX back on */ |
385 | rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON); | 376 | rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON); |