linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arend van Spriel" <arend@broadcom.com>
To: "Seth Forshee" <seth.forshee@canonical.com>
Cc: "Johannes Berg" <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org,
	"John W. Linville" <linville@tuxdriver.com>,
	"Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>,
	"Jouni Malinen" <jouni@qca.qualcomm.com>,
	"Vasanthakumar Thiagarajan" <vthiagar@qca.qualcomm.com>,
	"Senthil Balasubramanian" <senthilb@qca.qualcomm.com>,
	"Christian Lamparter" <chunkeey@googlemail.com>,
	"Ivo van Doorn" <IvDoorn@gmail.com>,
	"Gertjan van Wingerde" <gwingerde@gmail.com>,
	"Helmut Schaa" <helmut.schaa@googlemail.com>,
	"Larry Finger" <Larry.Finger@lwfinger.net>,
	"Chaoming Li" <chaoming_li@realsil.com.cn>,
	"Wey-Yi Guy" <wey-yi.w.guy@intel.com>,
	"Intel Linux Wireless" <ilw@linux.intel.com>,
	"Luciano Coelho" <coelho@ti.com>,
	ath9k-devel@venema.h4ckr.net, brcm80211-dev-list@broadcom.com,
	users@rt2x00.serialmonkey.com
Subject: Re: [PATCH 1/4] mac80211: Convert PS configuration from a binary flag to a set of modes
Date: Wed, 13 Feb 2013 22:43:14 +0100	[thread overview]
Message-ID: <511C08F2.6040008@broadcom.com> (raw)
In-Reply-To: <20130213192519.GD22867@thinkpad-t410>

On 02/13/2013 08:25 PM, Seth Forshee wrote:
> On Wed, Feb 13, 2013 at 07:54:19PM +0100, Arend van Spriel wrote:
>> On 02/13/2013 06:04 PM, Seth Forshee wrote:
>>>> Is all this really worth it? It seems a quick fix for brcmsmac might be
>>>>> to always set the powersave bit when IEEE80211_CONF_OFFCHANNEL is
>>>>> enabled in the config, and then go implement a real solution like I
>>>>> described earlier with powersave being separated out of the core
>>>>> mac80211 routines, and actually made possible for multiple interfaces?
>>> Using IEEE80211_CONF_OFFCHANNEL won't work. When the nullfunc to enable
>>> PS is sent the flag won't be set, as we're still on the operating
>>> channel. When we're actually off-channel the value of PM doesn't matter
>>> for the types of frames which are being sent. The only quick fix I've
>>> found is to watch out for frames with PM set and set the powersave bit
>>> while they're being transmitted.
>>
>> I actually don't see that one fly. The frames are posted on a DMA fifo
>> towards the hardware so in the driver we have no clue when that frame is
>> being processes/transmitted hence no way of knowing when to write the
>> register(s).
> 
> There's a couple of ways of doing it. I had a working patch at one point
> but can't seem to find it now, so I'm not sure which way I used. You're
> right though that we can't tell when the hardware is actually processing
> or transmitting the frame, so in either case MCTL_HPS has to be set
> before you put the frame in the tx fifo.
> 
> The first option is that for any frame with PM set, set MCTL_HPS when
> mac80211 hands off the frame and clear it once it has finished
> transmitting.
> 
> The second option is to look specifically for nullfunc frames and set or
> clear MCTL_HPS based on the value of PM.
> 
> Either of these should work fine with the current mac80211 code, but
> overall the second one is probably a little safer.

So you have verified that the last packet mac80211 sends before going
off-channel is the nullfunc frame with PM bit set. I have seen packets
coming in our driver during the .flush() callback, but never checked
whether the last of those packets is indeed the nullfunc.

Gr. AvS



  parent reply	other threads:[~2013-02-13 21:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-06 21:01 [PATCH 0/4] Add support for off-channel powersave state in mac80211 Seth Forshee
2013-02-06 21:01 ` [PATCH 1/4] mac80211: Convert PS configuration from a binary flag to a set of modes Seth Forshee
2013-02-13 15:06   ` Johannes Berg
2013-02-13 17:04     ` Seth Forshee
2013-02-13 18:54       ` Arend van Spriel
2013-02-13 19:09         ` Johannes Berg
2013-02-13 19:25         ` Seth Forshee
2013-02-13 21:36           ` Seth Forshee
2013-02-13 21:43           ` Arend van Spriel [this message]
2013-02-13 22:00             ` Seth Forshee
2013-02-15 12:20       ` Johannes Berg
2013-02-06 21:01 ` [PATCH 3/4] mac80211: Add off-channel PS state Seth Forshee
2013-02-06 21:01 ` [PATCH 4/4] brcmsmac: Add support for off-channel powersave Seth Forshee
2013-02-06 21:32 ` [PATCH 0/4] Add support for off-channel powersave state in mac80211 Johannes Berg
2013-02-07 18:15   ` Seth Forshee
2013-02-07 20:01     ` Arend van Spriel
2013-02-07 20:10       ` 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=511C08F2.6040008@broadcom.com \
    --to=arend@broadcom.com \
    --cc=IvDoorn@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=ath9k-devel@venema.h4ckr.net \
    --cc=brcm80211-dev-list@broadcom.com \
    --cc=chaoming_li@realsil.com.cn \
    --cc=chunkeey@googlemail.com \
    --cc=coelho@ti.com \
    --cc=gwingerde@gmail.com \
    --cc=helmut.schaa@googlemail.com \
    --cc=ilw@linux.intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=jouni@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mcgrof@qca.qualcomm.com \
    --cc=senthilb@qca.qualcomm.com \
    --cc=seth.forshee@canonical.com \
    --cc=users@rt2x00.serialmonkey.com \
    --cc=vthiagar@qca.qualcomm.com \
    --cc=wey-yi.w.guy@intel.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).