aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2010-06-09 02:51:52 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-15 16:00:48 -0400
commitff61638105db6f5832ef8700436ba6aa6d3a2fda (patch)
treeff55ef6186cd46d87ca4e54efbbe82f5ecc68f1e /net/mac80211/cfg.c
parent685429623f88d84f98bd5daffc3c427c408740d4 (diff)
mac80211: Fix ps-qos network latency handling
The ps-qos latency handling is broken. It uses predetermined latency values to select specific dynamic PS timeouts. With common AP configurations, these values overlap with beacon interval and are therefore essentially useless (for network latencies less than the beacon interval, PSM is disabled.) This patch remedies the problem by replacing the predetermined network latency values with one high value (1900ms) which is used to go trigger full psm. For backwards compatibility, the value 2000ms is still mapped to a dynamic ps timeout of 100ms. Currently also the mac80211 internal value for storing user space configured dynamic PSM values is incorrectly in the driver visible ieee80211_conf struct. Move it to the ieee80211_local struct. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 59f597d0c6a0..003b6addf5fa 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1446,7 +1446,6 @@ static int ieee80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,
1446{ 1446{
1447 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 1447 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
1448 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); 1448 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
1449 struct ieee80211_conf *conf = &local->hw.conf;
1450 1449
1451 if (sdata->vif.type != NL80211_IFTYPE_STATION) 1450 if (sdata->vif.type != NL80211_IFTYPE_STATION)
1452 return -EOPNOTSUPP; 1451 return -EOPNOTSUPP;
@@ -1455,11 +1454,11 @@ static int ieee80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,
1455 return -EOPNOTSUPP; 1454 return -EOPNOTSUPP;
1456 1455
1457 if (enabled == sdata->u.mgd.powersave && 1456 if (enabled == sdata->u.mgd.powersave &&
1458 timeout == conf->dynamic_ps_forced_timeout) 1457 timeout == local->dynamic_ps_forced_timeout)
1459 return 0; 1458 return 0;
1460 1459
1461 sdata->u.mgd.powersave = enabled; 1460 sdata->u.mgd.powersave = enabled;
1462 conf->dynamic_ps_forced_timeout = timeout; 1461 local->dynamic_ps_forced_timeout = timeout;
1463 1462
1464 /* no change, but if automatic follow powersave */ 1463 /* no change, but if automatic follow powersave */
1465 mutex_lock(&sdata->u.mgd.mtx); 1464 mutex_lock(&sdata->u.mgd.mtx);