aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2011-04-18 09:28:04 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-04-19 15:39:19 -0400
commit15a533c47f9ebb8dec8e440275136cbf9c493a1f (patch)
treeffa8be5e0b67f2ce0ca128bd55630bb297361a27 /drivers/net/wireless/rt2x00
parent10e11568ca8b8a15f7478f6a4ceebabcbdba1018 (diff)
rt2x00: Use correct TBTT_SYNC config in AP mode
This seems to fix problems with some powersaving clients since a positive value in TBTT_SYNC_CFG_TBTT_ADJUST introduces beacon skew, which is not wanted in AP mode. Also update the rest of the TBTT_SYNC config according to the legacy drivers in AP mode. 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/wireless/rt2x00')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index c6f5584128e9..e0fa559bfa39 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -1245,6 +1245,25 @@ void rt2800_config_intf(struct rt2x00_dev *rt2x00dev, struct rt2x00_intf *intf,
1245 rt2800_register_read(rt2x00dev, BCN_TIME_CFG, &reg); 1245 rt2800_register_read(rt2x00dev, BCN_TIME_CFG, &reg);
1246 rt2x00_set_field32(&reg, BCN_TIME_CFG_TSF_SYNC, conf->sync); 1246 rt2x00_set_field32(&reg, BCN_TIME_CFG_TSF_SYNC, conf->sync);
1247 rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg); 1247 rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg);
1248
1249 if (conf->sync == TSF_SYNC_AP_NONE) {
1250 /*
1251 * Tune beacon queue transmit parameters for AP mode
1252 */
1253 rt2800_register_read(rt2x00dev, TBTT_SYNC_CFG, &reg);
1254 rt2x00_set_field32(&reg, TBTT_SYNC_CFG_BCN_CWMIN, 0);
1255 rt2x00_set_field32(&reg, TBTT_SYNC_CFG_BCN_AIFSN, 1);
1256 rt2x00_set_field32(&reg, TBTT_SYNC_CFG_BCN_EXP_WIN, 32);
1257 rt2x00_set_field32(&reg, TBTT_SYNC_CFG_TBTT_ADJUST, 0);
1258 rt2800_register_write(rt2x00dev, TBTT_SYNC_CFG, reg);
1259 } else {
1260 rt2800_register_read(rt2x00dev, TBTT_SYNC_CFG, &reg);
1261 rt2x00_set_field32(&reg, TBTT_SYNC_CFG_BCN_CWMIN, 4);
1262 rt2x00_set_field32(&reg, TBTT_SYNC_CFG_BCN_AIFSN, 2);
1263 rt2x00_set_field32(&reg, TBTT_SYNC_CFG_BCN_EXP_WIN, 32);
1264 rt2x00_set_field32(&reg, TBTT_SYNC_CFG_TBTT_ADJUST, 16);
1265 rt2800_register_write(rt2x00dev, TBTT_SYNC_CFG, reg);
1266 }
1248 } 1267 }
1249 1268
1250 if (flags & CONFIG_UPDATE_MAC) { 1269 if (flags & CONFIG_UPDATE_MAC) {