diff options
author | Helmut Schaa <helmut.schaa@googlemail.com> | 2010-07-11 06:30:13 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-07-12 16:05:37 -0400 |
commit | ab8966ddc2f7fa3e631efa7478ea2c76d6c9942f (patch) | |
tree | 748aed346dd13e8c423430a3077d61fa2cec8c84 /drivers/net | |
parent | 8544df327c4c1c2bc6f2f6bf2997980d0d9a29f0 (diff) |
rt2x00: Add missing TSF sync mode for AP operation
Currently rt2x00 uses the TSF_SYNC_BEACON mode for all beaconing
interface types. However, TSF_SYNC_BEACON is meant for IBSS networks and
thus implements TSF merging in the hardware. Rename TSF_SYNC_BEACON to
TSF_SYNC_ADHOC to better express its purpose and introduce the missing
TSF sync mode TSF_SYNC_AP_NONE which should be used for beaconing modes
that don't need TSF merging.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800lib.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00config.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00reg.h | 3 |
3 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index cfe199bb36a3..9587236b5d51 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c | |||
@@ -805,7 +805,8 @@ void rt2800_config_intf(struct rt2x00_dev *rt2x00dev, struct rt2x00_intf *intf, | |||
805 | rt2x00_set_field32(®, BCN_TIME_CFG_TSF_TICKING, 1); | 805 | rt2x00_set_field32(®, BCN_TIME_CFG_TSF_TICKING, 1); |
806 | rt2x00_set_field32(®, BCN_TIME_CFG_TSF_SYNC, conf->sync); | 806 | rt2x00_set_field32(®, BCN_TIME_CFG_TSF_SYNC, conf->sync); |
807 | rt2x00_set_field32(®, BCN_TIME_CFG_TBTT_ENABLE, | 807 | rt2x00_set_field32(®, BCN_TIME_CFG_TBTT_ENABLE, |
808 | (conf->sync == TSF_SYNC_BEACON)); | 808 | (conf->sync == TSF_SYNC_ADHOC || |
809 | conf->sync == TSF_SYNC_AP_NONE)); | ||
809 | rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg); | 810 | rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg); |
810 | 811 | ||
811 | /* | 812 | /* |
@@ -813,7 +814,7 @@ void rt2800_config_intf(struct rt2x00_dev *rt2x00dev, struct rt2x00_intf *intf, | |||
813 | */ | 814 | */ |
814 | rt2800_register_read(rt2x00dev, INT_TIMER_EN, ®); | 815 | rt2800_register_read(rt2x00dev, INT_TIMER_EN, ®); |
815 | rt2x00_set_field32(®, INT_TIMER_EN_PRE_TBTT_TIMER, | 816 | rt2x00_set_field32(®, INT_TIMER_EN_PRE_TBTT_TIMER, |
816 | (conf->sync == TSF_SYNC_BEACON)); | 817 | (conf->sync == TSF_SYNC_AP_NONE)); |
817 | rt2800_register_write(rt2x00dev, INT_TIMER_EN, reg); | 818 | rt2800_register_write(rt2x00dev, INT_TIMER_EN, reg); |
818 | 819 | ||
819 | } | 820 | } |
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c index 8dbd634dae27..953dc4f2c6af 100644 --- a/drivers/net/wireless/rt2x00/rt2x00config.c +++ b/drivers/net/wireless/rt2x00/rt2x00config.c | |||
@@ -41,10 +41,12 @@ void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev, | |||
41 | 41 | ||
42 | switch (type) { | 42 | switch (type) { |
43 | case NL80211_IFTYPE_ADHOC: | 43 | case NL80211_IFTYPE_ADHOC: |
44 | conf.sync = TSF_SYNC_ADHOC; | ||
45 | break; | ||
44 | case NL80211_IFTYPE_AP: | 46 | case NL80211_IFTYPE_AP: |
45 | case NL80211_IFTYPE_MESH_POINT: | 47 | case NL80211_IFTYPE_MESH_POINT: |
46 | case NL80211_IFTYPE_WDS: | 48 | case NL80211_IFTYPE_WDS: |
47 | conf.sync = TSF_SYNC_BEACON; | 49 | conf.sync = TSF_SYNC_AP_NONE; |
48 | break; | 50 | break; |
49 | case NL80211_IFTYPE_STATION: | 51 | case NL80211_IFTYPE_STATION: |
50 | conf.sync = TSF_SYNC_INFRA; | 52 | conf.sync = TSF_SYNC_INFRA; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00reg.h b/drivers/net/wireless/rt2x00/rt2x00reg.h index 055501c355a5..cef94621cef7 100644 --- a/drivers/net/wireless/rt2x00/rt2x00reg.h +++ b/drivers/net/wireless/rt2x00/rt2x00reg.h | |||
@@ -63,7 +63,8 @@ enum led_mode { | |||
63 | enum tsf_sync { | 63 | enum tsf_sync { |
64 | TSF_SYNC_NONE = 0, | 64 | TSF_SYNC_NONE = 0, |
65 | TSF_SYNC_INFRA = 1, | 65 | TSF_SYNC_INFRA = 1, |
66 | TSF_SYNC_BEACON = 2, | 66 | TSF_SYNC_ADHOC = 2, |
67 | TSF_SYNC_AP_NONE = 3, | ||
67 | }; | 68 | }; |
68 | 69 | ||
69 | /* | 70 | /* |