Search Linux Wireless

Re: [RFC] mac80211: Enhancements to dynamic power save.

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

 



Vivek Natarajan <vivek.natraj@xxxxxxxxx> writes:

> This patch enables mac80211 to send a null frame and also to
> check for tim in the beacon if power save is enabled.

I would like to see a separate hw flag for disabling this feature. Not
all drivers need this, for example iwlwifi.

> diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
> index 673c5d7..6470614 100644
> --- a/net/mac80211/wext.c
> +++ b/net/mac80211/wext.c
> @@ -871,12 +871,17 @@ set:
>  			mod_timer(&local->dynamic_ps_timer, jiffies +
>  				  msecs_to_jiffies(local->dynamic_ps_timeout));
>  		else {
> -			if (local->powersave)
> +			if (local->powersave) {
> +				ieee80211_send_nullfunc(local, sdata, 1);
>  				conf->flags |= IEEE80211_CONF_PS;
> -			else
> +				ret = ieee80211_hw_config(local,
> +						IEEE80211_CONF_CHANGE_PS);
> +			} else {
>  				conf->flags &= ~IEEE80211_CONF_PS;
> -			ret = ieee80211_hw_config(local,
> -					IEEE80211_CONF_CHANGE_PS);
> +				ret = ieee80211_hw_config(local,
> +						IEEE80211_CONF_CHANGE_PS);
> +				ieee80211_send_nullfunc(local, sdata, 0);

Maybe add a helper function for checking the new flag I proposed and
sending the null frame?

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