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: linux-wireless@vger.kernel.org
Subject: Re: [RFC PATCH 1/2] mac80211: Retry null data frame for power save.
Date: Thu, 04 Feb 2010 09:25:03 +0100	[thread overview]
Message-ID: <1265271903.29119.107.camel@johannes.local> (raw)
In-Reply-To: <1265266442-6273-1-git-send-email-vnatarajan@atheros.com>

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

On Thu, 2010-02-04 at 12:24 +0530, Vivek Natarajan wrote:

> @@ -275,6 +274,18 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
>  			local->dot11FailedCount++;
>  	}
>  
> +	if (ieee80211_is_nullfunc(fc) && ieee80211_has_pm(fc) &&
> +			(local->hw.conf.flags & IEEE80211_CONF_PS)) {
> +		if (!(info->flags & IEEE80211_TX_STAT_ACK)) {
> +			ieee80211_stop_queues_by_reason(&local->hw,
> +					IEEE80211_QUEUE_STOP_REASON_PS);
> +			ieee80211_queue_work(&local->hw,
> +					&local->dynamic_ps_disable_work);
> +			mod_timer(&local->dynamic_ps_timer, jiffies +
> +					msecs_to_jiffies(10));
> +		}
> +	}
> +

This will still lose packets in the time between frame tx and status
report. And in fact, it'll also lose packets from lower-priority queues,
since ath9k doesn't implement flushing yet. It really should :)

On the other hand, there is hardware (even from Atheros/Zydas!) that
will not provide status reports for every frame.

Also, I'm not entirely sure why the AP would lose the frame? It's a
unicast frame that will be retransmitted quite a number of times. Is it
really actually going out on the air or is there something else wrong?
Maybe just the queue priority inversion issue since this frame goes out
as higher priority as most data frames?

If you really need to provide this functionality I think you should
probably do it "properly" in the sense that you react to the "frame
acked" by enabling PS, rather than the other way around. That requires a
hardware flag though that enables mac80211 to know that all frames will
get a status report unless something is seriously wrong, since otherwise
we'd *never* go into PS.

johannes

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

  parent reply	other threads:[~2010-02-04  8:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-04  6:54 [RFC PATCH 1/2] mac80211: Retry null data frame for power save Vivek Natarajan
2010-02-04  6:54 ` [RFC PATCH 2/2] mac80211: Reset dynamic ps timer in Rx path Vivek Natarajan
2010-02-04  8:14   ` Johannes Berg
2010-02-04 10:15     ` Vivek Natarajan
2010-02-04  8:59   ` Kalle Valo
2010-02-04 10:12     ` Vivek Natarajan
2010-02-05 12:25       ` Kalle Valo
2010-02-04  8:25 ` Johannes Berg [this message]
2010-02-04  9:14   ` [RFC PATCH 1/2] mac80211: Retry null data frame for power save Kalle Valo
2010-02-04  9:00 ` 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=1265271903.29119.107.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;
as well as URLs for NNTP newsgroup(s).