From: Luciano Coelho <coelho@ti.com>
To: Johannes Berg <johannes@sipsolutions.net>,
Eyal Shapira <eyal@wizery.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH v2 0/2] report stop sched scan when actually done
Date: Fri, 23 Dec 2011 10:46:06 +0200 [thread overview]
Message-ID: <1324629966.2182.317.camel@cumari> (raw)
In-Reply-To: <1324480244.3401.6.camel@jlt3.sipsolutions.net>
On Wed, 2011-12-21 at 16:10 +0100, Johannes Berg wrote:
> On Wed, 2011-12-21 at 12:11 +0200, Eyal Shapira wrote:
> > Changes in mac/cfg80211 to notify userspace
> > of NL80211_CMD_SCHED_SCAN_STOPPED only when the driver
> > actually reported back that it was stopped. Also
> > blocks other attempts until we're really done.
> >
> > This fixes a scenario where stop sched scan
> > is issued and immediately afterwards a new sched scan
> > is requested (e.g. with other parameters).
> > Current state caused a race where the driver started
> > stopping the sched scan but didn't finish and got
> > another sched scan request which it couldn't handle.
>
> Luca really needs to take a close look at this, and I think you should
> also take a look to see if this kind of API change can be avoided.
I had discussed this with Eyal briefly and at first it seemed ok. But
actually I now agree that this is an API change.
Looking closer, I see that in the current documentation, there's nothing
stating that after sending sched_scan_stop the userspace needs to wait
for the stopped event. It just says that "[this] event is also sent
when the %NL80211_CMD_STOP_SCHED_SCAN command is received [...]".
Applications may assume that after the stop command completes, it is
really stopped, without waiting for the stopped event.
Could the code be changed so that we delay the STOP_SCHED_SCAN command
completion instead? Then userspace can rely on that (as it should
anyway, because the command can fail) instead of having to wait for the
stopped event (which is a change in the API).
--
Cheers,
Luca.
next prev parent reply other threads:[~2011-12-23 8:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-21 10:11 [PATCH v2 0/2] report stop sched scan when actually done Eyal Shapira
2011-12-21 10:11 ` [PATCH v2 1/2] mac80211: mark stopped sched scan only after driver does Eyal Shapira
2011-12-21 10:11 ` [PATCH v2 2/2] nl80211: report " Eyal Shapira
2011-12-21 15:10 ` [PATCH v2 0/2] report stop sched scan when actually done Johannes Berg
2011-12-23 8:46 ` Luciano Coelho [this message]
[not found] ` <CAF8O4-wpjuV6j-beXn8d7bNA7jvSeCXMhV=kXDHNYKPgxQUbyw@mail.gmail.com>
2011-12-24 23:49 ` Eyal Shapira
2011-12-25 8:22 ` Luciano Coelho
2011-12-25 10:16 ` Eyal Shapira
2011-12-25 11:31 ` Luciano Coelho
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=1324629966.2182.317.camel@cumari \
--to=coelho@ti.com \
--cc=eyal@wizery.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.