aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2500pci.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2009-05-21 13:16:46 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-05-22 14:06:04 -0400
commit8a566afea0639fc387add782bc799009512a911b (patch)
treea51a2d99fbd21678dd0c8fab89326551e73b54f2 /drivers/net/wireless/rt2x00/rt2500pci.c
parent3b91c3604d000205fb4e56b5ddd6b77b22ad4689 (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.c30
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, &reg); 343 rt2x00pci_register_read(rt2x00dev, TXCSR1, &reg);
344 rt2x00_set_field32(&reg, TXCSR1_ACK_TIMEOUT, 344 rt2x00_set_field32(&reg, TXCSR1_ACK_TIMEOUT, erp->ack_timeout);
345 erp->ack_timeout);
346 rt2x00_set_field32(&reg, TXCSR1_ACK_CONSUME_TIME, 345 rt2x00_set_field32(&reg, TXCSR1_ACK_CONSUME_TIME,
347 erp->ack_consume_time); 346 erp->ack_consume_time);
347 rt2x00_set_field32(&reg, TXCSR1_TSF_OFFSET, IEEE80211_HEADER);
348 rt2x00_set_field32(&reg, 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, &reg); 351 rt2x00pci_register_read(rt2x00dev, ARCSR2, &reg);
@@ -377,6 +378,11 @@ static void rt2500pci_config_erp(struct rt2x00_dev *rt2x00dev,
377 rt2x00_set_field32(&reg, CSR11_SLOT_TIME, erp->slot_time); 378 rt2x00_set_field32(&reg, 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, &reg);
382 rt2x00_set_field32(&reg, CSR12_BEACON_INTERVAL, erp->beacon_int * 16);
383 rt2x00_set_field32(&reg, CSR12_CFP_MAX_DURATION, erp->beacon_int * 16);
384 rt2x00pci_register_write(rt2x00dev, CSR12, reg);
385
380 rt2x00pci_register_read(rt2x00dev, CSR18, &reg); 386 rt2x00pci_register_read(rt2x00dev, CSR18, &reg);
381 rt2x00_set_field32(&reg, CSR18_SIFS, erp->sifs); 387 rt2x00_set_field32(&reg, CSR18_SIFS, erp->sifs);
382 rt2x00_set_field32(&reg, CSR18_PIFS, erp->pifs); 388 rt2x00_set_field32(&reg, 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
555static void rt2500pci_config_duration(struct rt2x00_dev *rt2x00dev,
556 struct rt2x00lib_conf *libconf)
557{
558 u32 reg;
559
560 rt2x00pci_register_read(rt2x00dev, TXCSR1, &reg);
561 rt2x00_set_field32(&reg, TXCSR1_TSF_OFFSET, IEEE80211_HEADER);
562 rt2x00_set_field32(&reg, TXCSR1_AUTORESPONDER, 1);
563 rt2x00pci_register_write(rt2x00dev, TXCSR1, reg);
564
565 rt2x00pci_register_read(rt2x00dev, CSR12, &reg);
566 rt2x00_set_field32(&reg, CSR12_BEACON_INTERVAL,
567 libconf->conf->beacon_int * 16);
568 rt2x00_set_field32(&reg, CSR12_CFP_MAX_DURATION,
569 libconf->conf->beacon_int * 16);
570 rt2x00pci_register_write(rt2x00dev, CSR12, reg);
571}
572
573static void rt2500pci_config_ps(struct rt2x00_dev *rt2x00dev, 561static 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}