Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Vivek Natarajan <vnatarajan@atheros.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC PATCH] mac80211: Send null data frame after disabling power save in Tx path.
Date: Wed, 25 Nov 2009 11:21:01 +0100	[thread overview]
Message-ID: <1259144461.3491.58.camel@johannes.local> (raw)
In-Reply-To: <1259132754-18164-1-git-send-email-vnatarajan@atheros.com>

[-- Attachment #1: Type: text/plain, Size: 1586 bytes --]

On Wed, 2009-11-25 at 12:35 +0530, Vivek Natarajan wrote:
> For drivers setting IEEE80211_HW_PS_NULLFUNC_STACK, a null data frame
> with PM bit off has to be sent before sending normal data frames.
> If it is done in ps_disable_work, the actual data frame would be
> queued first before this work is executed and hence null data frame
> will be queued later. And also, this null data frame has to be sent
> only after clearing CONF_PS.
> Hence, directly clearing CONF_PS and sending null data frame in
> ieee80211_xmit seems to function properly.
> 
> Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
> ---
>  net/mac80211/tx.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
> index 943def2..51f537c 100644
> --- a/net/mac80211/tx.c
> +++ b/net/mac80211/tx.c
> @@ -1433,10 +1433,10 @@ static void ieee80211_xmit(struct ieee80211_sub_if_data *sdata,
>  
>  	if (need_dynamic_ps(local)) {
>  		if (local->hw.conf.flags & IEEE80211_CONF_PS) {
> -			ieee80211_stop_queues_by_reason(&local->hw,
> -					IEEE80211_QUEUE_STOP_REASON_PS);
> -			ieee80211_queue_work(&local->hw,
> -					&local->dynamic_ps_disable_work);
> +			local->hw.conf.flags &= ~IEEE80211_CONF_PS;
> +			ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
> +			if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)
> +				ieee80211_send_nullfunc(local, sdata, 0);

Regardless of Kalle's comment I thought I'd point out that you cannot do
this anyway as _hw_config() must be able to sleep.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

      parent reply	other threads:[~2009-11-25 11:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-25  7:05 [RFC PATCH] mac80211: Send null data frame after disabling power save in Tx path Vivek Natarajan
2009-11-25  8:37 ` Kalle Valo
2009-11-25  9:50   ` Vivek Natarajan
2009-11-25 10:21 ` Johannes Berg [this message]

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=1259144461.3491.58.camel@johannes.local \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=vnatarajan@atheros.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox