From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org,
Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Subject: Re: [PATCH 3.14] mac80211: fix AP powersave TX vs. wakeup race
Date: Thu, 20 Feb 2014 10:40:58 +0100 [thread overview]
Message-ID: <20140220094057.GE23439@redhat.com> (raw)
In-Reply-To: <1392888468.5073.11.camel@jlt4.sipsolutions.net>
On Thu, Feb 20, 2014 at 10:27:48AM +0100, Johannes Berg wrote:
> On Thu, 2014-02-20 at 10:21 +0100, Stanislaw Gruszka wrote:
> > On Thu, Feb 20, 2014 at 09:52:45AM +0100, Johannes Berg wrote:
> > > +
> > > + /* sync with ieee80211_sta_ps_deliver_wakeup */
> > > + spin_lock(&sta->ps_lock);
> > > + /*
> > > + * STA woke up the meantime and all the frames on ps_tx_buf have
> > > + * been queued to pending queue. No reordering can happen, go
> > > + * ahead and Tx the packet.
> > > + */
> > > + if (!test_sta_flag(sta, WLAN_STA_PS_STA)) {
> > > + spin_unlock(&sta->ps_lock);
> >
> > Actually I'm not sure if we should check if both WLAN_STA_PS_DRIVER
> > and WLAN_STA_PS_STA flags are clear ?
>
> This area is a bit confusing, but I don't think WLAN_STA_PS_STA will be
> clear until after WLAN_STA_PS_DRIVER is?
Hmm, actually looks like we call ps_deliver_wakeup() with WLAN_STA_PS_STA
flag currently cleared.
tatic void sta_unblock(struct work_struct *wk)
{
if (!test_sta_flag(sta, WLAN_STA_PS_STA)) {
local_bh_disable();
ieee80211_sta_ps_deliver_wakeup(sta);
local_bh_enable();
so on TX we should rather check WLAN_STA_PS_DRIVER flag .
Stanislaw
next prev parent reply other threads:[~2014-02-20 9:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-20 8:52 [PATCH 3.14] mac80211: fix AP powersave TX vs. wakeup race Johannes Berg
2014-02-20 9:15 ` Stanislaw Gruszka
2014-02-20 9:21 ` Stanislaw Gruszka
2014-02-20 9:27 ` Johannes Berg
2014-02-20 9:29 ` Johannes Berg
2014-02-20 9:40 ` Stanislaw Gruszka [this message]
2014-02-20 9:42 ` Johannes Berg
2014-02-20 10:06 ` Johannes Berg
2014-02-20 10:09 ` Stanislaw Gruszka
2014-02-20 10:08 ` Johannes Berg
2014-06-04 2:05 ` Luis R. Rodriguez
2014-06-04 6:59 ` 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=20140220094057.GE23439@redhat.com \
--to=sgruszka@redhat.com \
--cc=emmanuel.grumbach@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.