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/rt61pci.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/rt61pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index cb521ee7a8f0..a8bf5c432858 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -603,15 +603,22 @@ static void rt61pci_config_erp(struct rt2x00_dev *rt2x00dev, | |||
603 | 603 | ||
604 | rt2x00pci_register_read(rt2x00dev, TXRX_CSR0, ®); | 604 | rt2x00pci_register_read(rt2x00dev, TXRX_CSR0, ®); |
605 | rt2x00_set_field32(®, TXRX_CSR0_RX_ACK_TIMEOUT, erp->ack_timeout); | 605 | rt2x00_set_field32(®, TXRX_CSR0_RX_ACK_TIMEOUT, erp->ack_timeout); |
606 | rt2x00_set_field32(®, TXRX_CSR0_TSF_OFFSET, IEEE80211_HEADER); | ||
606 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR0, reg); | 607 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR0, reg); |
607 | 608 | ||
608 | rt2x00pci_register_read(rt2x00dev, TXRX_CSR4, ®); | 609 | rt2x00pci_register_read(rt2x00dev, TXRX_CSR4, ®); |
610 | rt2x00_set_field32(®, TXRX_CSR4_AUTORESPOND_ENABLE, 1); | ||
609 | rt2x00_set_field32(®, TXRX_CSR4_AUTORESPOND_PREAMBLE, | 611 | rt2x00_set_field32(®, TXRX_CSR4_AUTORESPOND_PREAMBLE, |
610 | !!erp->short_preamble); | 612 | !!erp->short_preamble); |
611 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR4, reg); | 613 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR4, reg); |
612 | 614 | ||
613 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR5, erp->basic_rates); | 615 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR5, erp->basic_rates); |
614 | 616 | ||
617 | rt2x00pci_register_read(rt2x00dev, TXRX_CSR9, ®); | ||
618 | rt2x00_set_field32(®, TXRX_CSR9_BEACON_INTERVAL, | ||
619 | erp->beacon_int * 16); | ||
620 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, reg); | ||
621 | |||
615 | rt2x00pci_register_read(rt2x00dev, MAC_CSR9, ®); | 622 | rt2x00pci_register_read(rt2x00dev, MAC_CSR9, ®); |
616 | rt2x00_set_field32(®, MAC_CSR9_SLOT_TIME, erp->slot_time); | 623 | rt2x00_set_field32(®, MAC_CSR9_SLOT_TIME, erp->slot_time); |
617 | rt2x00pci_register_write(rt2x00dev, MAC_CSR9, reg); | 624 | rt2x00pci_register_write(rt2x00dev, MAC_CSR9, reg); |
@@ -938,25 +945,6 @@ static void rt61pci_config_retry_limit(struct rt2x00_dev *rt2x00dev, | |||
938 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR4, reg); | 945 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR4, reg); |
939 | } | 946 | } |
940 | 947 | ||
941 | static void rt61pci_config_duration(struct rt2x00_dev *rt2x00dev, | ||
942 | struct rt2x00lib_conf *libconf) | ||
943 | { | ||
944 | u32 reg; | ||
945 | |||
946 | rt2x00pci_register_read(rt2x00dev, TXRX_CSR0, ®); | ||
947 | rt2x00_set_field32(®, TXRX_CSR0_TSF_OFFSET, IEEE80211_HEADER); | ||
948 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR0, reg); | ||
949 | |||
950 | rt2x00pci_register_read(rt2x00dev, TXRX_CSR4, ®); | ||
951 | rt2x00_set_field32(®, TXRX_CSR4_AUTORESPOND_ENABLE, 1); | ||
952 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR4, reg); | ||
953 | |||
954 | rt2x00pci_register_read(rt2x00dev, TXRX_CSR9, ®); | ||
955 | rt2x00_set_field32(®, TXRX_CSR9_BEACON_INTERVAL, | ||
956 | libconf->conf->beacon_int * 16); | ||
957 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, reg); | ||
958 | } | ||
959 | |||
960 | static void rt61pci_config_ps(struct rt2x00_dev *rt2x00dev, | 948 | static void rt61pci_config_ps(struct rt2x00_dev *rt2x00dev, |
961 | struct rt2x00lib_conf *libconf) | 949 | struct rt2x00lib_conf *libconf) |
962 | { | 950 | { |
@@ -1016,8 +1004,6 @@ static void rt61pci_config(struct rt2x00_dev *rt2x00dev, | |||
1016 | rt61pci_config_txpower(rt2x00dev, libconf->conf->power_level); | 1004 | rt61pci_config_txpower(rt2x00dev, libconf->conf->power_level); |
1017 | if (flags & IEEE80211_CONF_CHANGE_RETRY_LIMITS) | 1005 | if (flags & IEEE80211_CONF_CHANGE_RETRY_LIMITS) |
1018 | rt61pci_config_retry_limit(rt2x00dev, libconf); | 1006 | rt61pci_config_retry_limit(rt2x00dev, libconf); |
1019 | if (flags & IEEE80211_CONF_CHANGE_BEACON_INTERVAL) | ||
1020 | rt61pci_config_duration(rt2x00dev, libconf); | ||
1021 | if (flags & IEEE80211_CONF_CHANGE_PS) | 1007 | if (flags & IEEE80211_CONF_CHANGE_PS) |
1022 | rt61pci_config_ps(rt2x00dev, libconf); | 1008 | rt61pci_config_ps(rt2x00dev, libconf); |
1023 | } | 1009 | } |