linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Seth Forshee <seth.forshee@canonical.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC] Fixes for problems with off-channel powersave
Date: Wed, 16 Jan 2013 23:35:28 -0600	[thread overview]
Message-ID: <20130117053528.GD31449@thinkpad-t410> (raw)
In-Reply-To: <1358382542.15012.109.camel@jlt4.sipsolutions.net>

On Thu, Jan 17, 2013 at 01:29:02AM +0100, Johannes Berg wrote:
> Ok and now that I've typed it all up, I think it points to how we can do
> it much more easily without a separate module and without really
> changing the drivers.
> 
> Do a few things:
>  * introduce IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL
>  * stop all queues, using the new reason, before going offchannel
>  * then flush
>  * then *directly* tell the driver to transmit the nulldata packets,
>    checking only if the driver has the queue stopped, in which case we
>    have IEEE80211_QUEUE_STOP_REASON_DRIVER set; if it does, fail going
>    off channel
>  * similarly, *directly* tell the driver to transmit probe requests and
>    offchannel packets from cfg80211, if it fails (stop reason driver)
>    then do nothing (probe request) or return a failure to userspace
>    (offchannel TX)
> 
> In fact the last two bullets should probably be implemented by passing
> some sort of "offchan_tx_ok" to ieee80211_tx_skb() and friends, and
> checking queue_stop_reasons more carefully in ieee80211_tx_frags().

That looks like it would work well. I'll start working on these changes.

> I'll address powersave another day, but it also needs major rework.

I can't completely ignore powersave if I want to get brcmsmac working
properly. The hardware seems to be actively setting or clearing PM based
on its configuration, so I need a way to tell the driver that PM should
be set. Making off-channel an explicit powersave state lets me do this,
and while it doesn't fix any of the other powersave problems I do think
it make the code clearer than the psuedo-state used now for off-channel.

What I've got locally now for this is code to expand the PS config flag
to two bits to support three PS states: disabled, enabled, and
off-channel. Doing this is working well enough with the two machines
I've been testing with (brcmsmac and ath9k). There's an odd side effect
on brcmsmac of having PM set in probe request frames during scans, but
according to the spec PM should be reserved in those frames anyway.

I pushed the changes to the following if you're interested in taking a
look:

  git://kernel.ubuntu.com/sforshee/linux.git mac80211-offchannel

I'm possibly still missing some driver updates that would need to be
done, but otherwise the changes should be fairly complete. A major
rework of the powersave code is likely to take some time, so is there
any chance of getting something like this in place to fix things in the
short term?

Seth

  reply	other threads:[~2013-01-17  5:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-08 18:10 [RFC] Fixes for problems with off-channel powersave Seth Forshee
2013-01-08 18:10 ` [RFC 1/3] mac80211: Add flushes to ensure off-channel PS is enabled during sw scans Seth Forshee
2013-01-16 23:34   ` Johannes Berg
2013-01-17  5:34     ` Seth Forshee
2013-01-08 18:10 ` [RFC 2/3] mac80211: Convey information about off-channel powersave to drivers Seth Forshee
2013-01-08 18:10 ` [RFC 3/3] mac80211: Disable off-channel powersave when software scans are suspended Seth Forshee
2013-01-09 11:03   ` Stanislaw Gruszka
2013-01-09 13:27     ` Seth Forshee
2013-01-09 13:40 ` [RFC] Fixes for problems with off-channel powersave Seth Forshee
2013-01-16 23:32   ` Johannes Berg
2013-01-17  5:34     ` Seth Forshee
2013-01-25 21:36       ` Johannes Berg
2013-01-25 22:11         ` Adrian Chadd
2013-01-16 23:31 ` Johannes Berg
2013-01-17  5:32   ` Seth Forshee
2013-01-17  0:29 ` Johannes Berg
2013-01-17  5:35   ` Seth Forshee [this message]
2013-01-25 21:34     ` Johannes Berg
2013-01-25 22:16       ` Seth Forshee

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=20130117053528.GD31449@thinkpad-t410 \
    --to=seth.forshee@canonical.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /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).