From: Dan Williams <dcbw@redhat.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Sam Leffler <sleffler@chromium.org>,
"John W . Linville" <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH 3/3] cfg80211: add support for flushing old scan results
Date: Thu, 27 Sep 2012 09:54:15 -0500 [thread overview]
Message-ID: <1348757655.32301.6.camel@dcbw.foobar.com> (raw)
In-Reply-To: <1348737359.10353.8.camel@jlt4.sipsolutions.net>
On Thu, 2012-09-27 at 11:15 +0200, Johannes Berg wrote:
> On Fri, 2012-09-21 at 11:08 -0700, Sam Leffler wrote:
>
> > void ___cfg80211_scan_done(struct cfg80211_registered_device *rdev, bool leak)
> > {
> > struct cfg80211_scan_request *request;
> > @@ -47,8 +50,16 @@ void ___cfg80211_scan_done(struct cfg80211_registered_device *rdev, bool leak)
> >
> > if (request->aborted)
> > nl80211_send_scan_aborted(rdev, wdev);
> > - else
> > + else {
> > + if (request->flags & CFG80211_SCAN_FLAG_FLUSH) {
> > + /* flush entries from previous scans */
> > + spin_lock_bh(&rdev->bss_lock);
> > + __cfg80211_bss_expire(rdev,
> > + jiffies - request->scan_start);
>
> I wonder if we should pass an absolute time instead? jiffies will
> continue to advance while we iterate the list etc., if we pass the
> absolute time in both cases we can avoid this small race condition.
>
> The race really isn't important, but it still seems a bit cleaner to me
> overall.
jiffies are also complicated by suspend/resume. Absolute time would be
better.
Dan
prev parent reply other threads:[~2012-09-27 14:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-21 18:08 [PATCH 3/3] cfg80211: add support for flushing old scan results Sam Leffler
2012-09-27 9:15 ` Johannes Berg
2012-09-27 14:54 ` Dan Williams [this message]
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=1348757655.32301.6.camel@dcbw.foobar.com \
--to=dcbw@redhat.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=sleffler@chromium.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).