Search Linux Wireless

Re: [PATCH 3/3] cfg80211: add support for flushing old scan results

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux