Re: Required sequence to set wireless parameters? (was:2.6.29-rc8: Reported regressions from 2.6.28)

From: Johannes Berg
Date: Thu Mar 19 2009 - 14:00:36 EST


On Thu, 2009-03-19 at 16:02 +0100, Frans Pop wrote:

> Mostly just curious, but is that actually required by some wireless
> standard? If not, is it really reasonable to ask userland to do things in
> that particular order?

Wext is a mess, and we've known that for a long time... But no, the
sequence should _not_ be required, it's just _easier_ for the kernel,
and as such has a better probability of succeeding if there are
problems, it should still work though.

However, one thing that will _not_ work is this:

iwconfig wlan0 essid xyz
iwconfig wlan0 key s:xyz

you still need

iwconfig wlan0 ap any

or anything similar after setting the key to trigger the kernel to do
something.

> Reason I ask is that for example when writing wireless support for e.g. a
> distro installation system, it seems most logical to *first* ask the user
> what network (ESSID) he wants to connect to. Next to check if we can
> connect to that network without additional authentication and only then,
> if needed, ask for keys etc.
> If it's not possible to set that info in that logical order that seems
> rather restrictive to me and would probably mean that you'd have to reset
> AP, ESSID and possibly other settings before each incremental attempt.

That's a pretty wrong argument, nothing says your software cannot
collect all the information and then give it to the kernel at once
later, I think... In fact, this is required anyway when you use RSN or
WPA (wpa_supplicant needs all information at once), for example.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part