Search Linux Wireless

Re: [PATCH] mac80211: add ieee80211_set_dyn_ps_timeout()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 20, 2011 at 3:13 PM, Johannes Berg
<johannes@xxxxxxxxxxxxxxxx> wrote:
> On Tue, 2011-09-20 at 15:05 +0300, Eliad Peller wrote:
>
>> > It'd be interesting to see if we can just treat this as a "minimum awake
>> > time", kinda like going back to the range I thought about earlier.
>> >
>> do you mean something like:
>> diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
>> index 4274e94..57695e3 100644
>> --- a/net/mac80211/mlme.c
>> +++ b/net/mac80211/mlme.c
>> @@ -702,11 +702,12 @@ void ieee80211_recalc_ps(struct ieee80211_local
>> *local, s32 latency)
>>                         if (latency > (1900 * USEC_PER_MSEC) &&
>>                             latency != (2000 * USEC_PER_SEC))
>>                                 timeout = 0;
>> -                       else if (local->dynamic_ps_driver_timeout >= 0)
>> -                               timeout = local->dynamic_ps_driver_timeout;
>>                         else
>>                                 timeout = 100;
>>                 }
>> +               if (timeout && local->dynamic_ps_driver_timeout > timeout)
>> +                       timeout = local->dynamic_ps_driver_timeout;
>> +
>>                 local->dynamic_ps_user_timeout = timeout;
>>                 if (!local->disable_dynamic_ps)
>>                         conf->dynamic_ps_timeout =
>>
>> ?
>>
>> i don't find it much different.
>
> I did mean something like that, yes, but I was thinking we actually
> calculate the timeout based on latency requirements :)
>
i think that f(max_latency) -> dynamic_ps_timeout is not well defined,
so that's probably why we have to use hardcoded values here.

with the current code, i think the original patch is a bit better, as
the driver (for whatever reason) will also be able to decrease the
timeout.
however, i don't mind for either of them.

hopefully, the whole ps stuff should be redesigned at some point :)

Eliad.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux