Search Linux Wireless

Re: [PATCH w-t] iwlwifi: rewrite iwl-scan.c to avoid race conditions

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

 



On Wed, 2010-09-01 at 16:16 +0200, Stanislaw Gruszka wrote:

> > > +void iwl_wait_for_scan_end(struct iwl_priv *priv)
> > > +{
> > > +	unsigned long timeout = jiffies + IWL_SCAN_WAIT_END;
> > > +
> > > +	while (time_before_eq(jiffies, timeout)) {
> > > +		if (!test_bit(STATUS_SCANNING, &priv->status))
> > > +			break;
> > > +		msleep(20);
> > > +	}
> > 
> > this seems like it could use a completion?
> 
> We don't know is scanning is currently performed or not,
> so we nobody could ever call complete(). Above code works
> fine if no scan is running. 

Then I guess it should be a waitqueue?

johannes

--
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 Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux