linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Vivek Natarajan <vnatarajan@atheros.com>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
Subject: Re: [PATCH v3] mac80211: Retry null data frame for power save.
Date: Tue, 09 Feb 2010 08:57:24 +0100	[thread overview]
Message-ID: <1265702244.3783.16.camel@johannes.berg> (raw)
In-Reply-To: <1265631421-2574-1-git-send-email-vnatarajan@atheros.com>

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

On Mon, 2010-02-08 at 17:47 +0530, Vivek Natarajan wrote:

> diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
> index 3067fbd..f50a17a 100644
> --- a/net/mac80211/ieee80211_i.h
> +++ b/net/mac80211/ieee80211_i.h
> @@ -316,6 +316,7 @@ enum ieee80211_sta_flags {
>  	IEEE80211_STA_CSA_RECEIVED	= BIT(5),
>  	IEEE80211_STA_MFP_ENABLED	= BIT(6),
>  	IEEE80211_STA_UAPSD_ENABLED	= BIT(7),
> +	IEEE80211_STA_NULLFUNC_ACKED	= BIT(8),

Good idea :)

> +	if (ieee80211_is_nullfunc(fc) && ieee80211_has_pm(fc) &&
> +		(local->hw.flags & IEEE80211_HW_TX_STATUS) &&
> +		local->ps_sdata && !(local->scanning)) {
> +		if (info->flags & IEEE80211_TX_STAT_ACK) {
> +			local->ps_sdata->u.mgd.flags |=
> +					IEEE80211_STA_NULLFUNC_ACKED;
> +			ieee80211_queue_work(&local->hw,
> +					 &local->dynamic_ps_enable_work);
> +		} else
> +			mod_timer(&local->dynamic_ps_timer, jiffies +
> +					msecs_to_jiffies(10));
> +	}

I think this needs to check against injected frames as well [and
personally, I'd prefer if you only indented the stuff belonging into the
first if by 4 spaces to match up with the "if ("].

Also, you're still missing documentation on IEEE80211_HW_TX_STATUS.

Thanks,
johannes

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

  parent reply	other threads:[~2010-02-09  7:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-08 12:17 [PATCH v3] mac80211: Retry null data frame for power save Vivek Natarajan
2010-02-08 12:17 ` [PATCH] mac80211: Reset dynamic ps timer in Rx path Vivek Natarajan
2010-02-08 12:42 ` [PATCH v3] mac80211: Retry null data frame for power save Christian Lamparter
2010-02-08 13:13   ` Vivek Natarajan
2010-02-08 16:24     ` Johannes Berg
2010-02-08 20:30       ` Christian Lamparter
2010-02-08 21:02         ` Christian Lamparter
2010-02-09  7:57 ` Johannes Berg [this message]
2010-02-09  8:36   ` Vivek Natarajan
2010-02-09  8:57     ` Johannes Berg

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=1265702244.3783.16.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --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;
as well as URLs for NNTP newsgroup(s).