LWN.net Logo

The final wireless extension?

"Wireless extensions" is an ioctl()-based API which allows user space to control parameters specific to wireless network interfaces - ESSID, encryption passwords, channels, etc. This API has long been maintained by Jean Tourrilhes; the last few kernel releases have had version 20 of this API. As of this writing, version 21 has been merged into the pre-2.6.19 mainline, but at least some of it may be on its way back out again.

The problem is that version 21 is a real API change, in that sufficiently old tools will no longer operate properly. In particular, the formatting of the ESSID passed into the kernel has changed, so configurations which associated with a given network under version 20 will not do so under version 21. There is a workaround (add a space to the ESSID string), but many users will not know that, and, in any case, will only discover the need after upgrading their kernel and finding that the network is no longer there.

Since this problem came to light, many kernel developers (including Linus) have made it clear that they see this sort of API breakage as unacceptable. So they want the ESSID change backed out. There are, of course, real reasons for that change - the way those strings are handled in the protocols has evolved over time. But the right solution is to add a new ioctl() which can handle the new string format; the older version would continue to be supported indefinitely. Done in this way, the format change would be acceptable.

That seems like a good solution, except for one little hitch. It seems that Jean has foreseen this problem for some time. To help minimize the pain, he has been shipping versions of the wireless tools which understand the version 21 API for about six months. A number of distributors have picked up - and shipped - these new tools; affected distributions include Slackware 11 and Mandriva 2007. If those tools see a wireless extensions version greater than 20, they expect to use the new ESSID string format; if that change is backed out, those tools will break.

So wireless extensions 21 is now guaranteed to break some systems whether the ESSID change is included or not. At this point, the only way to avoid breaking deployed systems is to keep the wireless extensions version at 20 indefinitely. The wireless extensions, it seems, may be extended no more.

If that is how things work out, there will be some short-term pain, since needed enhancements will not find their way into the API. The long-term plan, however, is to replace the wireless extensions anyway; to that end, a new, netlink-based API called nl80211 is under development. That API, however, is tightly tied to the Devicescape 802.11 stack, which has been taking rather longer than expected to reach a state where it can be considered for merging. So the Linux wireless API may be stuck for a little while.


(Log in to post comments)

nl80211 is not tied to d80211

Posted Oct 5, 2006 9:59 UTC (Thu) by johill (subscriber, #25196) [Link]

That's actually a common misconception, but is just not true. Any card can register a cfg80211 operations structure and be configured with nl80211 (and WE through it too soon!). In fact, I wrote cfg80211/nl80211 very much with that in mind.

Incremental, or all-at-once migration?

Posted Oct 5, 2006 13:57 UTC (Thu) by pizza (subscriber, #46) [Link]

So does every 802.11 driver now have to implement nl80211 independently, and in addition to WE?

And will this result in the same "every implementation is slightly different and buggy" mess that WE had for so long?

Incremental, or all-at-once migration?

Posted Oct 6, 2006 8:52 UTC (Fri) by johill (subscriber, #25196) [Link]

Well, first of all, drivers are expected to implement cfg80211 which is (I hope!) a clearly defined interface using structs and callbacks instead of the SIOCxIWxxx madness.

Secondly, I just posted a patch yesterday (though netdev rejected it) to make it possible to use WE as a userspace interface to cfg80211, and make it possible to convert drivers one by one (even one configuration call at a time!).

Yes, it is now necessary to convert each driver, however, the semantics are hopefully much clearer defined. It was never clear, for example, what SIOCGIWAP was supposed to return because it was overloaded for two purposes, so drivers did it differently. cfg80211 separates it out into two calls, and tries to do a best-effort for WE-userspace.

The final wireless extension?

Posted Oct 5, 2006 14:02 UTC (Thu) by pizza (subscriber, #46) [Link]

It's not just WirelessTools, Jean has also been coordinating this API change with nearly every application and driver that speaks WE. He got all affected parties on-board.

The sad thing is that his libwext stuff transparently handles all of this stuff, and if more people used it, this wouldn't have been a problem..

This problem is going to bite linux-wireless many more times in the future, given how fast the wireless world changes. There's going to be a LOT of backwards-compatiblity cruft in the kernel as the 802.11 standards continue to evolve -- it's not just "API" changes, but behaivoral changes too, and that's where the real pain lies.

The final wireless extension?

Posted Oct 5, 2006 16:11 UTC (Thu) by NAR (subscriber, #1313) [Link]

If those tools see a wireless extensions version greater than 20, they expect to use the new ESSID string format; if that change is backed out, those tools will break.

Maybe next time these tools will use some kind of 'capability-synchronizing' handshake instead of simply checking the version...

Bye,NAR

Humor

Posted Oct 5, 2006 21:47 UTC (Thu) by simonl (subscriber, #13603) [Link]

> The wireless extensions, it seems, may be extended no more.

Jon, you are a brilliant writer.

Humor

Posted Oct 6, 2006 1:05 UTC (Fri) by jstAusr (guest, #27224) [Link]

Seconded. I'm just a dumb user yet I understand, in general, most everything Jon writes. How does he do that?

"The wireless extensions, it seems, may be extended no more"

Posted Oct 13, 2006 2:26 UTC (Fri) by slamb (guest, #1070) [Link]

It's good writing, but I don't think it's actually true. Couldn't the existing version number be frozen
at 20 and a "real" version number added as another ioctl()? The behavior on unknown ioctl()s is
well-defined, so there'd be a reliable way to know if the API was extended in a different way than
originally planned for version 21.

This would make the check-for-21-or-higher tools think it's 20, yet newly written tools know
it's something else. They could even negotiate a version to use.

it's an ugly solution and perhaps not worthwhile, but it's possible.

Copyright © 2006, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds