diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2010-06-09 02:51:52 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-15 16:00:48 -0400 |
commit | ff61638105db6f5832ef8700436ba6aa6d3a2fda (patch) | |
tree | ff55ef6186cd46d87ca4e54efbbe82f5ecc68f1e /net/mac80211/mlme.c | |
parent | 685429623f88d84f98bd5daffc3c427c408740d4 (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/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 74479c2d12d4..1c0d8fce08dd 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -561,23 +561,19 @@ void ieee80211_recalc_ps(struct ieee80211_local *local, s32 latency) | |||
561 | beaconint_us = ieee80211_tu_to_usec( | 561 | beaconint_us = ieee80211_tu_to_usec( |
562 | found->vif.bss_conf.beacon_int); | 562 | found->vif.bss_conf.beacon_int); |
563 | 563 | ||
564 | timeout = local->hw.conf.dynamic_ps_forced_timeout; | 564 | timeout = local->dynamic_ps_forced_timeout; |
565 | if (timeout < 0) { | 565 | if (timeout < 0) { |
566 | /* | 566 | /* |
567 | * Go to full PSM if the user configures a very low | ||
568 | * latency requirement. | ||
567 | * The 2 second value is there for compatibility until | 569 | * The 2 second value is there for compatibility until |
568 | * the PM_QOS_NETWORK_LATENCY is configured with real | 570 | * the PM_QOS_NETWORK_LATENCY is configured with real |
569 | * values. | 571 | * values. |
570 | */ | 572 | */ |
571 | if (latency == 2000000000) | 573 | if (latency > 1900000000 && latency != 2000000000) |
572 | timeout = 100; | ||
573 | else if (latency <= 50000) | ||
574 | timeout = 300; | ||
575 | else if (latency <= 100000) | ||
576 | timeout = 100; | ||
577 | else if (latency <= 500000) | ||
578 | timeout = 50; | ||
579 | else | ||
580 | timeout = 0; | 574 | timeout = 0; |
575 | else | ||
576 | timeout = 100; | ||
581 | } | 577 | } |
582 | local->hw.conf.dynamic_ps_timeout = timeout; | 578 | local->hw.conf.dynamic_ps_timeout = timeout; |
583 | 579 | ||