All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Eliad Peller <eliad@wizery.com>
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	David Spinadel <david.spinadel@intel.com>
Subject: Re: [PATCH] mac80211: stop scan before connection
Date: Wed, 18 Mar 2015 20:22:41 +0100	[thread overview]
Message-ID: <1426706561.3001.25.camel@sipsolutions.net> (raw)
In-Reply-To: <CAB3XZEdJTjRS9tek_KnR9t_HT5+AHjvcjKuBavY2KSrHj9jLkw@mail.gmail.com> (sfid-20150318_111123_601058_E60EC6E5)

On Wed, 2015-03-18 at 12:11 +0200, Eliad Peller wrote:

> i'm not sure. the AP will probably have some retransmissions, 

It hopefully will, but they'll be real retransmissions (with retry bit),
usually occurring within a very short period of time.

> so the
> station should have good chances to get the frames (assuming the
> hardware will give this interface some airtime during the scan).

So the normal dwell time during even an active scan (say 30ms) will mean
that all of those retries will not be heard once you miss the first one.

> > So in a sense you could say deferring the handling doesn't make sense,
> > but I'd still argue you shouldn't start this process while you're in the
> > middle of scanning, hence this patch.
> >
> i agree the patch makes sense anyway, i just noted that mac80211
> behavior seems wrong.
> you should avoid scanning while connecting in first place, not defer
> the handling.

Yeah, agree.

> btw, note that both this patch and ieee80211_iface_work() don't count
> for the sched scan case, which is basically the same.

True, except we can't really cover that case since we don't even know
when we're really scanning while sched scan is enabled.

I'd expect drivers to either abort the scheduled scan in that case, or
protected the authentication/association in some way (like iwlwifi does,
for example, by giving a few hundred ms of guaranteed channel time in
the mgd_prepare_tx method)

> > We may have to do more exclusions (e.g. don't start a scan while
> > authenticating or associating) here though, and ultimately not
> > *processing* the frames will be irrelevant as they shouldn't be coming
> > in anyway.
> that's true for auth/assoc frames. but some other frames (e.g. deauth)
> can come anytime, and i don't see why we should defer processing in
> this case.

Yeah, true. This seems like something we should take a closer look at,
think about the design more and document the expectations better.

Still, I think this patch is one step along that way.

johannes


  reply	other threads:[~2015-03-18 19:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-17 17:58 [PATCH] mac80211: stop scan before connection Emmanuel Grumbach
2015-03-18  9:36 ` Eliad Peller
2015-03-18  9:46   ` Johannes Berg
2015-03-18 10:11     ` Eliad Peller
2015-03-18 19:22       ` Johannes Berg [this message]
2015-03-30  8:19 ` 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=1426706561.3001.25.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=david.spinadel@intel.com \
    --cc=eliad@wizery.com \
    --cc=emmanuel.grumbach@intel.com \
    --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.