All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kalle.valo@iki.fi>
To: Vivek Natarajan <vivek.natraj@gmail.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC] mac80211: Enhancements to dynamic power save.
Date: Tue, 23 Dec 2008 22:33:41 +0200	[thread overview]
Message-ID: <873aged42i.fsf@litku.valot.fi> (raw)
In-Reply-To: <20081223044424.GC11534@myhost.users.atheros.com> (Vivek Natarajan's message of "Mon\, 22 Dec 2008 20\:44\:24 -0800")

Vivek Natarajan <vivek.natraj@gmail.com> 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

  parent reply	other threads:[~2008-12-23 20:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-23  4:44 [RFC] mac80211: Enhancements to dynamic power save Vivek Natarajan
2008-12-22 17:12 ` Johannes Berg
2008-12-23 12:50   ` Vivek Natarajan
2008-12-23 20:33 ` Kalle Valo [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-12-02  1:17 Vivek Natarajan
2008-12-01 11:53 ` Johannes Berg
2008-12-01 15:08   ` Vivek Natarajan
2008-12-01 15:55     ` Kalle Valo
2008-12-01 15:52   ` Kalle Valo
2008-12-01 23:53   ` Luis R. Rodriguez
2008-12-01 12:05 ` Johannes Berg
2008-12-01 16:17   ` Kalle Valo
2008-12-01 17:00     ` Tomas Winkler
2008-12-02 12:58       ` Vivek Natarajan
2008-12-02 14:29         ` Tomas Winkler
2008-12-01 15:42 ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=873aged42i.fsf@litku.valot.fi \
    --to=kalle.valo@iki.fi \
    --cc=linux-wireless@vger.kernel.org \
    --cc=vivek.natraj@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.