diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-04-16 11:17:24 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-04-22 20:57:15 (GMT) |
commit | 965bedadc01d34027455d5d5b67063ef0209c955 (patch) | |
tree | 012bb04559011498e0bdb5db1ba6ffad0ec8b89a /net/mac80211/scan.c | |
parent | dc7d243d75b906cc964c12caa3b2eebe953a69be (diff) | |
download | linux-fsl-qoriq-965bedadc01d34027455d5d5b67063ef0209c955.tar.xz |
mac80211: improve powersave implementation
When you have multiple virtual interfaces the current
implementation requires setting them up properly from
userspace, which is undesirable when we want to default
to power save mode. Keep track of powersave requested
from userspace per managed mode interface, and only
enable powersave globally when exactly one managed mode
interface is active and has powersave turned on.
Second, only start the dynPS timer when PS is turned
on, and properly turn it off when PS is turned off.
Third, fix the scan_sdata abuse in the dynps code.
Finally, also reorder the code and refactor the code
that enables PS or the dynps timer instead of having
it copied in two places.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/scan.c')
-rw-r--r-- | net/mac80211/scan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 4ec1bfc..20df861 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -253,7 +253,7 @@ static void ieee80211_scan_ps_disable(struct ieee80211_sub_if_data *sdata) { struct ieee80211_local *local = sdata->local; - if (!local->powersave) + if (!local->ps_sdata) ieee80211_send_nullfunc(local, sdata, 0); else { /* |