All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Guy, Wey-Yi" <wey-yi.w.guy@intel.com>
To: "Luis R. Rodriguez" <mcgrof@gmail.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"j@w1.fi" <j@w1.fi>, Kalle Valo <kalle.valo@nokia.com>
Subject: Re: [PATCH v3 1/1] mac80211: tell driver when dtim change detected
Date: Fri, 22 Jan 2010 16:11:34 -0800	[thread overview]
Message-ID: <1264205494.7208.7.camel@wwguy-ubuntu> (raw)
In-Reply-To: <43e72e891001221544j1b1bd67ao8dfcf4d0dd12dd81@mail.gmail.com>

On Fri, 2010-01-22 at 15:44 -0800, Luis R. Rodriguez wrote:
> On Fri, Jan 22, 2010 at 11:46 AM, Johannes Berg
> <johannes@sipsolutions.net> wrote:
> > On Fri, 2010-01-22 at 11:20 -0800, Luis R. Rodriguez wrote:
> >
> >> > Previously, we would switch the channel completely to the new operating
> >> > channel before even probing the AP. That way, we would virtually always
> >> > receive a beacon from the new AP between the time we started the
> >> > association process (probe,auth,assoc) and configuring the driver.
> >> >
> >> > Now with the new changes that use the off-channel work, we may return to
> >> > the old "operating" channel, which may be no particular channel, between
> >> > all these steps. Thus, if there's no beacon between any of probe
> >> > request/response, auth "request"/"response", assoc request/response, we
> >> > never get one, and this situation happens.
> >> >
> >> > I see two solutions, apart from this special-case patch fixing
> >> >
> >> > First, we could go back to the original behaviour if we have just one
> >> > virtual interface. But that still leaves us with the race, we might do
> >> > all three frame exchanges within a beacon interval and still miss the
> >> > beacon, we just tend to not do that and get a beacon.
> >>
> >> Curious, what symptoms were seen when the dtim was not propagated
> >> prior to association, did the STA just not wake up for the right dtim
> >> interval when in PS mode?
> >
> > Yes, I don't really know exactly what happens,
> 
> OK -- Wey, can you elaborate a little as to how you found this and
> what you were seeing? Does the device not go into PS mode at all?

We are doing Power consumption test with different DTIM value, the test
is based on test scripts, so we disable the NetworkManager to make sure
we can control which AP we need to associated with. During the test, we
notice when AP change it DTIM value, a lot time STA will used the old
DTIM value in Power Save mode which cause problem.

We believe the correct fix is mac80211 should wait for both probe
response and beacon arrived before start the association process.

Hope this explain what we found.

> 
> >  but if you look at
> > Wey-Yi's patch you'll see most of the problem was that we calculated the
> > maximum powersaving interval wrong.
> 
> I see..
> 
> >> Wouldn't we get the dtim interval on
> >> eventual beacons later or do we disregard all that information after
> >> associated?
> >
> > As you can see from the patch, we currently disregard any "update" in
> > that information -- this patch changes it.
> 
> Got it.
> 
> >> If so what if the AP changes the dtim interval?
> >
> > I believe the AP is not allowed to do that without turning off and back
> > on completely.
> 
> OK. Still curious, if in practice would funky APs ever tune DTIM
> dynamically and not kick you off, and if they do is it fair to ignore
> that and blame the AP?
> 
> >> I take it this can easily be reproduced with a long beacon interval?
> >
> > Easier, yes. The easiest way to reproduce it is to associate using just
> > "iw", no NM or wpa_supplicant -- make sure the scan list is empty before
> > you associate -- and with a long beacon interval. We then scan, but that
> > will only give us a probe response with high probability, and then we do
> > all the switching as I explained and we don't ever get a beacon. If you
> > use NM it may scan more often and increase the probability of us having
> > a beacon at some point in time.
> 
> OK thanks.
> 
> >> > The other solution I see is that we add a new step before or after the
> >> > direct probe step, which would just be "wait for a beacon". This would
> >> > ensure we have both probe and beacon information always ready. It would
> >> > also ensure we have both probe and beacon info for our new userspace
> >> > reporting of that.
> >>
> >> This seems cleaner.
> >
> > I agree. And since we already keep track of this since 34a6eddb, we
> > should be able to fairly easily determine whether we still need probe
> > response or beacon, and only do either the direct probe or wait for
> > beacon step.
> 
>   Luis


  parent reply	other threads:[~2010-01-23  0:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-21 21:39 [PATCH v3 1/1] mac80211: tell driver when dtim change detected wey-yi.w.guy
2010-01-22 19:03 ` Johannes Berg
2010-01-22 19:20   ` Luis R. Rodriguez
2010-01-22 19:46     ` Johannes Berg
2010-01-22 23:44       ` Luis R. Rodriguez
2010-01-22 23:45         ` Luis R. Rodriguez
2010-01-23  0:11         ` Guy, Wey-Yi [this message]
2010-01-23  0:23           ` Luis R. Rodriguez
2010-01-23  0:22             ` Guy, Wey-Yi
2010-01-23 12:46               ` Johannes Berg
2010-01-25 18:18                 ` Luis R. Rodriguez
2010-01-25 18:33                   ` Johannes Berg
2010-01-25 19:55                     ` Luis R. Rodriguez
2010-01-25 20:06                       ` Johannes Berg
2010-01-26  8:41                         ` Kalle Valo
2010-01-25 18:32         ` Jouni Malinen
2010-01-25 18:36           ` Johannes Berg
2010-01-25 18:38             ` Johannes Berg
2010-01-23  8:23   ` Kalle Valo
2010-01-25 18:35   ` Jouni Malinen
2010-01-25 20:11     ` Johannes Berg
2010-01-25 20:46       ` Guy, Wey-Yi

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=1264205494.7208.7.camel@wwguy-ubuntu \
    --to=wey-yi.w.guy@intel.com \
    --cc=j@w1.fi \
    --cc=johannes@sipsolutions.net \
    --cc=kalle.valo@nokia.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mcgrof@gmail.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 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.