diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2009-05-21 13:16:46 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-05-22 14:06:04 -0400 |
commit | 8a566afea0639fc387add782bc799009512a911b (patch) | |
tree | a51a2d99fbd21678dd0c8fab89326551e73b54f2 /drivers/net/wireless/rt2x00/rt2500pci.c | |
parent | 3b91c3604d000205fb4e56b5ddd6b77b22ad4689 (diff) |
rt2x00: Remove usage of IEEE80211_CONF_CHANGE_BEACON_INTERVAL
IEEE80211_CONF_CHANGE_BEACON_INTERVAL was deprecated a month ago,
it is about time to remove all usage from the rt2x00 drivers and
use the correct beacon interval configuration through the bss_info
structure.
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/rt2500pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500pci.c | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index 906960f67b6c..f95cb646f85a 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -341,10 +341,11 @@ static void rt2500pci_config_erp(struct rt2x00_dev *rt2x00dev, | |||
341 | preamble_mask = erp->short_preamble << 3; | 341 | preamble_mask = erp->short_preamble << 3; |
342 | 342 | ||
343 | rt2x00pci_register_read(rt2x00dev, TXCSR1, ®); | 343 | rt2x00pci_register_read(rt2x00dev, TXCSR1, ®); |
344 | rt2x00_set_field32(®, TXCSR1_ACK_TIMEOUT, | 344 | rt2x00_set_field32(®, TXCSR1_ACK_TIMEOUT, erp->ack_timeout); |
345 | erp->ack_timeout); | ||
346 | rt2x00_set_field32(®, TXCSR1_ACK_CONSUME_TIME, | 345 | rt2x00_set_field32(®, TXCSR1_ACK_CONSUME_TIME, |
347 | erp->ack_consume_time); | 346 | erp->ack_consume_time); |
347 | rt2x00_set_field32(®, TXCSR1_TSF_OFFSET, IEEE80211_HEADER); | ||
348 | rt2x00_set_field32(®, TXCSR1_AUTORESPONDER, 1); | ||
348 | rt2x00pci_register_write(rt2x00dev, TXCSR1, reg); | 349 | rt2x00pci_register_write(rt2x00dev, TXCSR1, reg); |
349 | 350 | ||
350 | rt2x00pci_register_read(rt2x00dev, ARCSR2, ®); | 351 | rt2x00pci_register_read(rt2x00dev, ARCSR2, ®); |
@@ -377,6 +378,11 @@ static void rt2500pci_config_erp(struct rt2x00_dev *rt2x00dev, | |||
377 | rt2x00_set_field32(®, CSR11_SLOT_TIME, erp->slot_time); | 378 | rt2x00_set_field32(®, CSR11_SLOT_TIME, erp->slot_time); |
378 | rt2x00pci_register_write(rt2x00dev, CSR11, reg); | 379 | rt2x00pci_register_write(rt2x00dev, CSR11, reg); |
379 | 380 | ||
381 | rt2x00pci_register_read(rt2x00dev, CSR12, ®); | ||
382 | rt2x00_set_field32(®, CSR12_BEACON_INTERVAL, erp->beacon_int * 16); | ||
383 | rt2x00_set_field32(®, CSR12_CFP_MAX_DURATION, erp->beacon_int * 16); | ||
384 | rt2x00pci_register_write(rt2x00dev, CSR12, reg); | ||
385 | |||
380 | rt2x00pci_register_read(rt2x00dev, CSR18, ®); | 386 | rt2x00pci_register_read(rt2x00dev, CSR18, ®); |
381 | rt2x00_set_field32(®, CSR18_SIFS, erp->sifs); | 387 | rt2x00_set_field32(®, CSR18_SIFS, erp->sifs); |
382 | rt2x00_set_field32(®, CSR18_PIFS, erp->pifs); | 388 | rt2x00_set_field32(®, CSR18_PIFS, erp->pifs); |
@@ -552,24 +558,6 @@ static void rt2500pci_config_retry_limit(struct rt2x00_dev *rt2x00dev, | |||
552 | rt2x00pci_register_write(rt2x00dev, CSR11, reg); | 558 | rt2x00pci_register_write(rt2x00dev, CSR11, reg); |
553 | } | 559 | } |
554 | 560 | ||
555 | static void rt2500pci_config_duration(struct rt2x00_dev *rt2x00dev, | ||
556 | struct rt2x00lib_conf *libconf) | ||
557 | { | ||
558 | u32 reg; | ||
559 | |||
560 | rt2x00pci_register_read(rt2x00dev, TXCSR1, ®); | ||
561 | rt2x00_set_field32(®, TXCSR1_TSF_OFFSET, IEEE80211_HEADER); | ||
562 | rt2x00_set_field32(®, TXCSR1_AUTORESPONDER, 1); | ||
563 | rt2x00pci_register_write(rt2x00dev, TXCSR1, reg); | ||
564 | |||
565 | rt2x00pci_register_read(rt2x00dev, CSR12, ®); | ||
566 | rt2x00_set_field32(®, CSR12_BEACON_INTERVAL, | ||
567 | libconf->conf->beacon_int * 16); | ||
568 | rt2x00_set_field32(®, CSR12_CFP_MAX_DURATION, | ||
569 | libconf->conf->beacon_int * 16); | ||
570 | rt2x00pci_register_write(rt2x00dev, CSR12, reg); | ||
571 | } | ||
572 | |||
573 | static void rt2500pci_config_ps(struct rt2x00_dev *rt2x00dev, | 561 | static void rt2500pci_config_ps(struct rt2x00_dev *rt2x00dev, |
574 | struct rt2x00lib_conf *libconf) | 562 | struct rt2x00lib_conf *libconf) |
575 | { | 563 | { |
@@ -609,8 +597,6 @@ static void rt2500pci_config(struct rt2x00_dev *rt2x00dev, | |||
609 | libconf->conf->power_level); | 597 | libconf->conf->power_level); |
610 | if (flags & IEEE80211_CONF_CHANGE_RETRY_LIMITS) | 598 | if (flags & IEEE80211_CONF_CHANGE_RETRY_LIMITS) |
611 | rt2500pci_config_retry_limit(rt2x00dev, libconf); | 599 | rt2500pci_config_retry_limit(rt2x00dev, libconf); |
612 | if (flags & IEEE80211_CONF_CHANGE_BEACON_INTERVAL) | ||
613 | rt2500pci_config_duration(rt2x00dev, libconf); | ||
614 | if (flags & IEEE80211_CONF_CHANGE_PS) | 600 | if (flags & IEEE80211_CONF_CHANGE_PS) |
615 | rt2500pci_config_ps(rt2x00dev, libconf); | 601 | rt2500pci_config_ps(rt2x00dev, libconf); |
616 | } | 602 | } |