Thread (21 messages) 21 messages, 4 authors, 2008-12-02

Re: [RFC v3 4/4] mac80211: move dynamic_ps_timeout to hw.conf

From: Kalle Valo <hidden>
Date: 2008-12-01 20:30:45

Luis R. Rodriguez [off-list ref] writes:
On Fri, Nov 28, 2008 at 11:49 AM, Kalle Valo [off-list ref] wrote:
quoted
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index b3ee0dc..95455d0 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -962,7 +962,7 @@ static int ieee80211_ioctl_siwpower(struct net_device *dev,

       if (wrq->disabled) {
               ps = false;
-               local->dynamic_ps_timeout = 0;
+               local->hw.conf.dynamic_ps_timeout = 0;
               goto set;
       }
@@ -977,7 +977,7 @@ static int ieee80211_ioctl_siwpower(struct net_device *dev,
       }

       if (wrq->flags & IW_POWER_TIMEOUT)
-               local->dynamic_ps_timeout = wrq->value / 1000;
+               local->hw.conf.dynamic_ps_timeout = wrq->value / 1000;

       if (ps == local->powersave)
               return ret;
@@ -986,9 +986,9 @@ set:
       local->powersave = ps;

       if (ifsta->flags & IEEE80211_STA_ASSOCIATED) {
-               if (local->dynamic_ps_timeout > 0)
+               if (conf->dynamic_ps_timeout > 0)
                       mod_timer(&local->dynamic_ps_timer, jiffies +
-                                 msecs_to_jiffies(local->dynamic_ps_timeout));
+                                 msecs_to_jiffies(conf->dynamic_ps_timeout));
               else {
                       if (local->powersave)
                               conf->flags |= IEEE80211_CONF_PS;
Would it be too much trouble to add this via cfg80211/nl80211 instead
or at least add both? The more we can push in that direction the
better.
I definitely would like to see nl80211 support for power save. For
example, I think currently there's no way for the user space to know
dtim period of the bss. (If I'm wrong here, please let me know). We
definitely should fix that in nl80211 to make it easier for the user
space decide on correct power save settings.

Let's start to work on nl80211 after client power save features in
mac80211 are in better shape. At that time we also have a better
understanding of what's needed for the user space interface. Now
things are a bit sketchy still.

-- 
Kalle Valo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help