Subject: Re: [patch 1/3] softmac: return -EAGAIN from getscan while scanning

From: Dan Williams <[email-masked]>
Date: Thu, 13 Apr 2006 08:14:01 -0400

On Thu, 2006-04-13 at 11:34 +0200, Johannes Berg wrote:
> On Thu, 2006-04-13 at 11:06 +0200, Johannes Berg wrote:
> 
> > > It's very likely that tools do indeed loop when they see EAGAIN, but
> > > this is a workaround, not the main mode of operation. It seems obvious
> > > to me that the get method should wait until the scan results are
> > > available. Perhaps the discussion had a specific scenario where
> > > EAGAIN would make sense, but I cannot imagine what it might be.
> > 
> > Right, they do loop, but they don't have a method to indicate
> > completion. Thus we'd have to actually wait for the completion in the
> > kernel. Jean, what is the intended use here?
> 
> Hah, never mind, I guess we're just supposed to send SIOCGIWSCAN. Will
> send a patch in a minute.

No, you should be doing both really.  If you don't do EAGAIN, then tools
like iwlist and other simple ones that don't want to spend 100 lines of
code in netlink message processing just to receive the wireless event
won't work very well.

Dan