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

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

On Thu, 2006-04-13 at 02:00 -0700, Pete Zaitcev wrote:
> On Tue, 11 Apr 2006 10:58:06 +0200, [email-masked] wrote:
> 
> > Below patch was developed after discussion with Daniel Drake who
> > mentioned to me that wireless tools expect an EAGAIN return from getscan
> > so that they can wait for the scan to finish before printing out the
> > results.
> 
> This sounds completely wrong. Do you guys remember the Subject: string
> of this discussion by any chance?

Maybe it's wrong now, but it's how the CLI tools have operated for quite
a while AFAIK.

There are two options for tools: (a) request scan and block on GIWSCAN
until it doesn't return EAGAIN, or (b) request a scan, enter a loop,
wait for the GIWSCAN netlink message to come back.  The point here is
that if you have to write a tool with 100 lines of netlink message
processing code _just_ to get the "scan done!" message, that's a bitch.
More complicated programs can obviously do this, but simple tools don't
want or need to.

airo, atmel, and orinoco all do this.  ipw does not, and prism54 does
not because it does background scanning.  I believe that the patch for
softmac/bcm43xx EAGAIN is correct.

Dan