summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00config.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2007-10-06 14:14:29 +0200
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 16:55:12 -0700
commitfeb24691e3e87a740caec4568be1a202db786f20 (patch)
tree76192bf145e989e0e7715a10f0da3c7417cfc254 /drivers/net/wireless/rt2x00/rt2x00config.c
parent81873e9ccd5731ca77027bdb32b34904e7af25d0 (diff)
[PATCH] rt2x00: Move TSF sync values into rt2x00config
All drivers use the same values for TSF sync, this will move the value determination into rt2x00config.c, and the definition for the values to rt2x00reg.h 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/rt2x00config.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00config.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c
index aeeaa0c1424..f8e87aa8633 100644
--- a/drivers/net/wireless/rt2x00/rt2x00config.c
+++ b/drivers/net/wireless/rt2x00/rt2x00config.c
@@ -74,10 +74,24 @@ void rt2x00lib_config_bssid(struct rt2x00_dev *rt2x00dev, u8 *bssid)
rt2x00dev->ops->lib->config_bssid(rt2x00dev, &reg[0]);
}
-void rt2x00lib_config_type(struct rt2x00_dev *rt2x00dev, int type)
+void rt2x00lib_config_type(struct rt2x00_dev *rt2x00dev, const int type)
{
- if (type != INVALID_INTERFACE)
- rt2x00dev->ops->lib->config_type(rt2x00dev, type);
+ int tsf_sync;
+
+ switch (type) {
+ case IEEE80211_IF_TYPE_IBSS:
+ case IEEE80211_IF_TYPE_AP:
+ tsf_sync = TSF_SYNC_BEACON;
+ break;
+ case IEEE80211_IF_TYPE_STA:
+ tsf_sync = TSF_SYNC_INFRA;
+ break;
+ default:
+ tsf_sync = TSF_SYNC_NONE;
+ break;
+ }
+
+ rt2x00dev->ops->lib->config_type(rt2x00dev, type, tsf_sync);
}
void rt2x00lib_config(struct rt2x00_dev *rt2x00dev,