Search Linux Wireless

Re: [PATCH 2/3] mac80211: fix dynamic power save for devices which have nullfunc support

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

 



Johannes Berg <johannes@xxxxxxxxxxxxxxxx> writes:

> On Wed, 2009-08-12 at 17:52 +0300, Kalle Valo wrote:
>
>>  static bool is_dynamic_ps_enabled(struct ieee80211_local *local)
>>  {
>> -	if (!(local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK))
>> +
>> +	if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_PS))
>>  		/* driver doesn't support power save */
>>  		return false;
>
> Why the blank line?

A mistake, will remove.

>> +	if (local->hw.flags & IEEE80211_HW_SUPPORTS_DYNAMIC_PS)
>> +		/* hardware does dynamic power save */
>> +		return false;
>
> FWIW, also applies to patch 1, I think I prefer
>
> 	/* check if hardware does dynamic power save */
> 	if (local->hw.flags & ...)
> 		return false;
>
> (wrt. comment location)

I'll change that.

> and you should probably rename the function to do_software_dynamic_ps()
> or something like that?

I had problems coming up with a good name. "do" in a sense is confusing
because the function only checks the state, it doesn't have any code to
change the timer or anything like that. I'll think of this a bit more.
Suggestions are welcome.

I'll send v2 later this week. John, please drop these three patches.

-- 
Kalle Valo
--
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