aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2400pci.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2007-10-06 08:14:29 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:55:12 -0400
commitfeb24691e3e87a740caec4568be1a202db786f20 (patch)
tree76192bf145e989e0e7715a10f0da3c7417cfc254 /drivers/net/wireless/rt2x00/rt2400pci.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/rt2400pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2400pci.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index 28999ffaba2e..0e345659f421 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -265,9 +265,9 @@ static void rt2400pci_config_bssid(struct rt2x00_dev *rt2x00dev,
265 (2 * sizeof(__le32))); 265 (2 * sizeof(__le32)));
266} 266}
267 267
268static void rt2400pci_config_type(struct rt2x00_dev *rt2x00dev, int type) 268static void rt2400pci_config_type(struct rt2x00_dev *rt2x00dev, const int type,
269 const int tsf_sync)
269{ 270{
270 struct interface *intf = &rt2x00dev->interface;
271 u32 reg; 271 u32 reg;
272 272
273 rt2x00pci_register_write(rt2x00dev, CSR14, 0); 273 rt2x00pci_register_write(rt2x00dev, CSR14, 0);
@@ -287,13 +287,7 @@ static void rt2400pci_config_type(struct rt2x00_dev *rt2x00dev, int type)
287 rt2x00_set_field32(&reg, CSR14_TSF_COUNT, 1); 287 rt2x00_set_field32(&reg, CSR14_TSF_COUNT, 1);
288 rt2x00_set_field32(&reg, CSR14_TBCN, 1); 288 rt2x00_set_field32(&reg, CSR14_TBCN, 1);
289 rt2x00_set_field32(&reg, CSR14_BEACON_GEN, 0); 289 rt2x00_set_field32(&reg, CSR14_BEACON_GEN, 0);
290 if (is_interface_type(intf, IEEE80211_IF_TYPE_IBSS) || 290 rt2x00_set_field32(&reg, CSR14_TSF_SYNC, tsf_sync);
291 is_interface_type(intf, IEEE80211_IF_TYPE_AP))
292 rt2x00_set_field32(&reg, CSR14_TSF_SYNC, 2);
293 else if (is_interface_type(intf, IEEE80211_IF_TYPE_STA))
294 rt2x00_set_field32(&reg, CSR14_TSF_SYNC, 1);
295 else
296 rt2x00_set_field32(&reg, CSR14_TSF_SYNC, 0);
297 rt2x00pci_register_write(rt2x00dev, CSR14, reg); 291 rt2x00pci_register_write(rt2x00dev, CSR14, reg);
298} 292}
299 293