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/rt73usb.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/rt73usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index 270dd4e59f7f..211a3d6bc054 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -566,15 +566,22 @@ static void rt73usb_config_erp(struct rt2x00_dev *rt2x00dev, | |||
566 | 566 | ||
567 | rt2x00usb_register_read(rt2x00dev, TXRX_CSR0, ®); | 567 | rt2x00usb_register_read(rt2x00dev, TXRX_CSR0, ®); |
568 | rt2x00_set_field32(®, TXRX_CSR0_RX_ACK_TIMEOUT, erp->ack_timeout); | 568 | rt2x00_set_field32(®, TXRX_CSR0_RX_ACK_TIMEOUT, erp->ack_timeout); |
569 | rt2x00_set_field32(®, TXRX_CSR0_TSF_OFFSET, IEEE80211_HEADER); | ||
569 | rt2x00usb_register_write(rt2x00dev, TXRX_CSR0, reg); | 570 | rt2x00usb_register_write(rt2x00dev, TXRX_CSR0, reg); |
570 | 571 | ||
571 | rt2x00usb_register_read(rt2x00dev, TXRX_CSR4, ®); | 572 | rt2x00usb_register_read(rt2x00dev, TXRX_CSR4, ®); |
573 | rt2x00_set_field32(®, TXRX_CSR4_AUTORESPOND_ENABLE, 1); | ||
572 | rt2x00_set_field32(®, TXRX_CSR4_AUTORESPOND_PREAMBLE, | 574 | rt2x00_set_field32(®, TXRX_CSR4_AUTORESPOND_PREAMBLE, |
573 | !!erp->short_preamble); | 575 | !!erp->short_preamble); |
574 | rt2x00usb_register_write(rt2x00dev, TXRX_CSR4, reg); | 576 | rt2x00usb_register_write(rt2x00dev, TXRX_CSR4, reg); |
575 | 577 | ||
576 | rt2x00usb_register_write(rt2x00dev, TXRX_CSR5, erp->basic_rates); | 578 | rt2x00usb_register_write(rt2x00dev, TXRX_CSR5, erp->basic_rates); |
577 | 579 | ||
580 | rt2x00usb_register_read(rt2x00dev, TXRX_CSR9, ®); | ||
581 | rt2x00_set_field32(®, TXRX_CSR9_BEACON_INTERVAL, | ||
582 | erp->beacon_int * 16); | ||
583 | rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, reg); | ||
584 | |||
578 | rt2x00usb_register_read(rt2x00dev, MAC_CSR9, ®); | 585 | rt2x00usb_register_read(rt2x00dev, MAC_CSR9, ®); |
579 | rt2x00_set_field32(®, MAC_CSR9_SLOT_TIME, erp->slot_time); | 586 | rt2x00_set_field32(®, MAC_CSR9_SLOT_TIME, erp->slot_time); |
580 | rt2x00usb_register_write(rt2x00dev, MAC_CSR9, reg); | 587 | rt2x00usb_register_write(rt2x00dev, MAC_CSR9, reg); |
@@ -834,25 +841,6 @@ static void rt73usb_config_retry_limit(struct rt2x00_dev *rt2x00dev, | |||
834 | rt2x00usb_register_write(rt2x00dev, TXRX_CSR4, reg); | 841 | rt2x00usb_register_write(rt2x00dev, TXRX_CSR4, reg); |
835 | } | 842 | } |
836 | 843 | ||
837 | static void rt73usb_config_duration(struct rt2x00_dev *rt2x00dev, | ||
838 | struct rt2x00lib_conf *libconf) | ||
839 | { | ||
840 | u32 reg; | ||
841 | |||
842 | rt2x00usb_register_read(rt2x00dev, TXRX_CSR0, ®); | ||
843 | rt2x00_set_field32(®, TXRX_CSR0_TSF_OFFSET, IEEE80211_HEADER); | ||
844 | rt2x00usb_register_write(rt2x00dev, TXRX_CSR0, reg); | ||
845 | |||
846 | rt2x00usb_register_read(rt2x00dev, TXRX_CSR4, ®); | ||
847 | rt2x00_set_field32(®, TXRX_CSR4_AUTORESPOND_ENABLE, 1); | ||
848 | rt2x00usb_register_write(rt2x00dev, TXRX_CSR4, reg); | ||
849 | |||
850 | rt2x00usb_register_read(rt2x00dev, TXRX_CSR9, ®); | ||
851 | rt2x00_set_field32(®, TXRX_CSR9_BEACON_INTERVAL, | ||
852 | libconf->conf->beacon_int * 16); | ||
853 | rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, reg); | ||
854 | } | ||
855 | |||
856 | static void rt73usb_config_ps(struct rt2x00_dev *rt2x00dev, | 844 | static void rt73usb_config_ps(struct rt2x00_dev *rt2x00dev, |
857 | struct rt2x00lib_conf *libconf) | 845 | struct rt2x00lib_conf *libconf) |
858 | { | 846 | { |
@@ -906,8 +894,6 @@ static void rt73usb_config(struct rt2x00_dev *rt2x00dev, | |||
906 | rt73usb_config_txpower(rt2x00dev, libconf->conf->power_level); | 894 | rt73usb_config_txpower(rt2x00dev, libconf->conf->power_level); |
907 | if (flags & IEEE80211_CONF_CHANGE_RETRY_LIMITS) | 895 | if (flags & IEEE80211_CONF_CHANGE_RETRY_LIMITS) |
908 | rt73usb_config_retry_limit(rt2x00dev, libconf); | 896 | rt73usb_config_retry_limit(rt2x00dev, libconf); |
909 | if (flags & IEEE80211_CONF_CHANGE_BEACON_INTERVAL) | ||
910 | rt73usb_config_duration(rt2x00dev, libconf); | ||
911 | if (flags & IEEE80211_CONF_CHANGE_PS) | 897 | if (flags & IEEE80211_CONF_CHANGE_PS) |
912 | rt73usb_config_ps(rt2x00dev, libconf); | 898 | rt73usb_config_ps(rt2x00dev, libconf); |
913 | } | 899 | } |