public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: wey-yi.w.guy@intel.com
Cc: linux-wireless@vger.kernel.org, j@w1.fi
Subject: Re: [PATCH v3 1/1] mac80211: tell driver when dtim change detected
Date: Fri, 22 Jan 2010 20:03:01 +0100	[thread overview]
Message-ID: <1264186981.2593.10.camel@johannes.local> (raw)
In-Reply-To: <1264109996-15995-1-git-send-email-wey-yi.w.guy@intel.com>

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

[adding Jouni]

On Thu, 2010-01-21 at 13:39 -0800, wey-yi.w.guy@intel.com wrote:
> From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
> 
> In current implementation, mac80211 send dtim_period update to driver
> during association, but if no NetworkManager or similar application
> perform scan operation, plus tim_ie is not part of probe response; mac80211 will
> not get beacon with dtim information later, then  mac80211 will not pass the
> information to driver for update.
> 
> Call ieee80211_hw_config() with IEEE80211_CONF_CHANGE_PS flag set to
> allow driver make correct dtim adjustment if dtim_period change
> detected. Also perform recalc_ps operation if needed.

This seems fine.

However, I think it's indicative of a bigger problem. I gave it some
thought, and came to the conclusion that it previously didn't happen
because we always won the race. Let me explain.

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.

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.

johannes

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

  reply	other threads:[~2010-01-22 19:03 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 [this message]
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
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=1264186981.2593.10.camel@johannes.local \
    --to=johannes@sipsolutions.net \
    --cc=j@w1.fi \
    --cc=linux-wireless@vger.kernel.org \
    --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