Linux: Wireless State of the Union

Submitted by Jeremy
on January 10, 2006 - 9:42am

Jeff Garzik offered an interesting status summary on the current state of Wireless drivers in the Linux Kernel. He begins, "another banner year has passed, with Linux once again proving its superiority in the area of crappy wireless (WiFi) support. Linux oldsters love the current state of wireless, because it hearkens back to the heady days of Yuri Gagarin, Sputnik and Linux kernel 0.99, when getting hardware to work under Linux required either engineering knowledge or luck (or both)."

Jeff pointed out that there's still a need for an official wireless maintainer, "I'm just the defacto guy, with no interest in the job." He also noted the importance of finally picking a stack [story] and sticking with it, rather than continually coming up with new stacks. He continued on to suggest that this stack and all the wireless drivers should be maintained in the kernel tree, rather than externally as is common now, "the whole point of working in-tree, the whole point of this open source thing is that everybody works on the same code, and the entire Internet is your test bed. Quality improves the more people work together." He concluded that while things are rough now, there's still hope for the future.


From: Jeff Garzik [email blocked]
To:  netdev
Subject: State of the Union: Wireless
Date:	Thu, 5 Jan 2006 23:22:18 -0500



		State of the Union - Wireless
		      January 5, 2006


Another banner year has passed, with Linux once again proving
its superiority in the area of crappy wireless (WiFi) support.
Linux oldsters love the current state of wireless, because it hearkens
back to the heady days of Yuri Gagarin, Sputnik and Linux kernel 0.99,
when getting hardware to work under Linux required either engineering
knowledge or luck (or both).

Linux has made remarkable progress in the area of hardware support,
in the past five years, reaching a state where it is unusual for
mainstream hardware to -not- be supported by Linux as soon as it
is released.  Unfortunately, this does not extend to wireless.

Wireless drivers today are scattered to the four winds:  many
are in-tree, but for older hardware, and lack active maintainers.
They work.  A few drivers exist for "relatively" modern WiFi hardware
in-tree; they work, but they don't have active maintainers either.
Current hardware, many of it "softmac", is driven by a wild variety of
drivers, for a wide variety of wireless stacks, none of them in-tree.
Or, the in-tree drivers are simply out of date versions of actively
maintained out-of-tree drivers.  In one or two cases, users have turned
to awful emulation solutions like NdisWrapper.  But can you blame them?
They just want their hardware to work.

Twelve months ago, the community consensus was that the best basis for
a wireless stack was HostAP, or as it turned out, a HostAP derivative
whose sole users are the Intel ipw drivers.  So that got merged.
Now, twelve months later, fashion has changed, ieee80211 lost a lot of
momentum, and it seems that the DeviceScape wireless stack is all the
rage, and there are convincing arguments for merging the DeviceScape
code floating about.

But you -- I'm talking to all you wireless kernel hackers -- need to
come up with some solutions for some key issues:

* We really have no wireless maintainer.  I'm just the defacto guy,
  with no interest in the job.  The ideal maintainer knows 802.11 well,
  uses git, and isn't an asshole with no taste.  I'm just the guy who
  wants to make sure the net driver portion doesn't turn out to be a
  stinker (read: review and pass up the chain).

* Once you pick your favorite stack, STICK WITH IT.  In Linux, there
  is collectively very little patience with a rewrite every 12 months,
  particularly one that is dropped in out of the blue rather then
  evolved out of existing code.

In Linux, today's wireless code will probably live at least 10 years,
if not more.  Long term maintainability is paramount.  This is
why we prefer to evolve code, rather than constantly rewrite it.
Rewrites are often improvements, but bring in their own wave of
bugs and incompatibilities, while eliminating years of carefully
culminated knowledge buried in the existing code.  As a solution,
pragmatic users wind up running both the pre-rewrite code and the
new code -- duplicate code.  Code duplication in turn brings in its
own wave of bugs, and assaults on open source's economies of scale.

* Wireless drivers and the wireless stack need to be maintained IN-TREE
  as a COLLECTIVE ENTITY, not piecemeal maintenance as its done now.

The whole point of working in-tree, the whole point of this open source
thing is that everybody works on the same code, and the entire Internet
is your test bed.  Quality improves the more people work together.
The entire Linux kernel engineering process is focused on getting core
kernel code out to distributions (then to end users) and power users.
Out-of-tree code breaks that model, breaking the It Just Works(tm)
theme applicable to other Linux-supported hardware.

* Release early, release often.  Pushing from an external repository to
  the official kernel tree every few months creates more problems
  than it solves.  Out-of-tree drivers fail to take advantage of
  recent kernel changes and coding practices, which leads to bugs and
  incompatibilities.  Slow pushing leads to huge periodic updates,
  which are awful for debugging, testing, and general use.

* Wireless management, in particular the wireless kernel<->user
  interface, needs some thinking.  Wireless Extensions (WE) isn't
  cutting it, but I haven't seen any netlink work yet (or some
  other interface).  Whatever the userspace interface is, it will be
  basically carved in stone for years (unlike kernel APIs), so this
  needs a lot more thought than people have been giving it.

* ALL wireless stacks need work.  It is currently fashionable to laud
  DeviceScape and trash in-kernel ieee80211, but outside of the
  cheerleading, BOTH have real technical issues that need addressing.
  IOW, no matter what code is chosen, _somebody_ is on the hook for
  a fair amount of work.  A switch is not without its costs.

* I would prefer that people patch the in-tree ieee80211 code,
  probably in the direction of Jiri Benc's proposed ieee80211_device
  direction.  I take patches from all parties, not just Intel.

* However, if the engineering reasons for switching to DeviceScape
  or another wireless stack are powerful enough to overcome Linux's
  "no big patches, evolve it" maxim, great!  But make sure to work
  on converting drivers to this new stack.  The wireless drivers and
  wireless stack should evolve in tandem.  Otherwise, drivers get
  left behind, grow moldy, and Linux users suffer.

* Feel free to submit radical changes -- wireless is yet young --
  just make sure all drivers keep working from release to release.

* Long term, wireless should go from being a library of common code to a
  "real" wireless stack, as shown in the template developed by David Miller:
  http://kernel.org/pub/linux/kernel/people/jgarzik/patchkits/2.6/davem-p80211.tar.bz2
  Zhu Yi @ Intel and Vladmir @ somewhere both independently did some
  work in this area.

* Please CC wireless stack/driver discussions to [email blocked]
  mailing list, rather than everybody hiding in their own little
  corner.

* I prefer GPL-only code.  Dual licensing has proven in practice to
  be a logistical nightmare that concentrates power in the hands of
  a few.  Dual licensing, BSD licensing works for some, but GPL-only
  code is quite simply the least amount of flamewars, headaches
  and worry.  IOW, the P.I.T.A. level of GPL-only code is lowest.

Open source is about not only merit, but lack of control.  If I am
being a knucklehead, or you just don't like me, you can always go
through Andrew Morton, David Miller, Linus, ...  With dual licensed
code, engineers are really really really really encouraged to submit
code through a single channel for legal rather than merit reasons.

Dual licensed code gives kernel hackers yet more legal crapola to
worry about, which is never a good thing.



Patches welcome from all motivated, clueful parties.  Jiri Benc has a
long series of patches that looks nice.  Johannes Berg has done some
work on the ieee80211 softmac stuff and hw WEP.  But maybe DeviceScape
is what people like now.

So... there it is.  We suck.  There's hope.  No Luke Skywalker in sight.
I hope we can avoid being slaves to fashion, by merging a rewrite, but
that way be the way to go.

	Jeff

Related Links:

dual licensing

Anonymous22 (not verified)
on
January 10, 2006 - 4:46pm

Can anyone clarify what the issue with dual licensed code is? I thought it was no more difficult than picking one of the licenses that is to apply to the code within your project, and by doing that, excluding all other licenses.

One Issue

on
January 11, 2006 - 7:13am

* You write a kernel module thats Duel GPL/BSD

* It gets included in the Kernel

* Someone sends in a GPL (The Kernel License) patch that touches your modules.

* You now have a Kernel module that is Duel GPL/BSD with some GPL only bits.

In summary, its more hassle than its worth in the Kernel. Thats not to say Duel licensing isn't valid but is creates pain the kernel developers don't want. When you control the whole project (e.g. Mozilla) people know (or should know!) that the code they submit has to be Duel/Triple whatever licensed.

--
Alex

s/Duel/Dual/g

Anonymous (not verified)
on
January 11, 2006 - 1:23pm

s/Duel/Dual/g

Right, that kinda gets it, but not completely

on
January 11, 2006 - 2:34pm

If a given driver is dual-licensed, say GPL and EvilLicense, the kernel maintainers can choose to take the GPL copy and ignore EvilLicense entirely. Suppose EvilLicense isn't GPL compatible. That doesn't hurt or taint the kernel, because the kernel only needs to heed the GPL. (I chose a fictional non-GPL-compatible EvilLicense over BSD to avoid some of the grey-area that arises with the no-advert-clause BSD license.)

Who suffers then? For one, people who are using the code outside the terms of the GPL but within the terms of EvilLicense. As you point out, any GPL'd patches to the GPL copy can't be moved to the EvilLicense version. The two versions will get out of sync.

Now, depending on the nature of EvilLicense, it could be the EvilLicensed version also evolves, and its EvilLicensed patches can't come to the GPLed side. The GPL folks then miss out. In effect, the two versions become forks of a common ancestor. As a result, the dual-licensing issue is a non-issue if you treat the dually-licensed release as a forking point.

Where the real trouble comes in is that whoever provides the initial code under a dual license usually does NOT wish to fork the code at that point. Rather, they want a single evolving codebase, with all patches taking on the same dual-license. Look at Mozilla with its multiple-license. Anyone can take the GPL version and run with it, but if you want your patch accepted into the main-line Mozilla tree, you have to agree to license it under all the licenses Mozilla's offered under.

This has a strong centralizing effect on development, building a control structure around the "official version" of some hunk of code, and I believe this is what Jeff's worried about. Linus' kernel tree should be the central point for all in-tree code. Moving the center of development for various dual-licensed wireless drivers out-of-tree hurts the drivers and hurts Linux.

Learn from OpenBSD

Anonymous (not verified)
on
January 10, 2006 - 5:29pm

I think in this area Linux could learn from OpenBSD. Its wireless support is extremely great now. One simple framework, free drivers and firmwares and perhaps most important: one clear list with devices that work.

Theo and his team did a very great Job, that other free OS could and already do (see other BSDs) benefit from.

Correct, but it's also, on so

Anonymous (not verified)
on
January 10, 2006 - 6:14pm

Correct, but it's also, on some specific wireless cards, limited to basic functionality, while the distributable closed-source proprietary firmware on linux can do more with these cards. OpenBSD's wireless framework is fine clean code, but limited by their stance on licenses. Correct me if I'm wrong though, I haven't looked at it recently...

Madwifi and ndis-wrapper seems to work well on Linux, but the article seems to differ :) A unified framework for wireless (802.11/bluetooth/zigbee/...) stuff would be cool...
>Long term, wireless should go from being a library of common code to
>a "real" wireless stack, as shown in the template developed by David
>Miller
With this and the BSD-licensed OpenBSD code, they have a nice start.

I think your understanding of

Anonymous (not verified)
on
January 10, 2006 - 8:36pm

I think your understanding of 'firmware' is flawed. At least the way you state it.

Because in order for the OBSD drivers to work they need the same firmware. Firmware is hardware-dependant. In all actuality it should be part of the hardware, but many manufacturers have loadable firmware to reduce the costs. (no need to have flash storage on the device.)

It's OS independant and platform independent.

For example on my Ibook I had to rip the firmware out of a Windows driver to get my broadcom "airport extreme" wifi card to work.

What madwifi has is not firmware. It's a binary blob. Similar to nvidia drivers.

A binary blob is kernel code that is written to be generic across various Linux kernels and you have to compile some 'glue' code to make it work.

Basicly you can't use the same binary blobs for x86 Linux on OS X, PowerPC Linux, or Windows. Firmware you can.

ndiswrapper

Anonymous (not verified)
on
January 11, 2006 - 1:13am

If the Linux kernel goes to 4K stacks ndiswrapper won't work so well any more.

No argument

on
January 11, 2006 - 7:15am

Its not exactly a winning argument for the kernel deveopers. Keep feature X (which they have technical reasons for removing) so we can run binary only module Y.

--
Alex

I interpreted that differently.

on
January 11, 2006 - 6:01pm

I interpreted that comment to be an argument *against* ndiswrapper, not an argument *for* 8K stacks.

ndiswrapper vs. 4K stacks

Anonymous (not verified)
on
January 12, 2006 - 12:21am

Ndiswrapper is useful to me. I'm less excited about 4K stacks. Maybe someone could educate me?

4k stacks are important for p

Anonymous (not verified)
on
January 12, 2006 - 6:31am

4k stacks are important for people who run many many processes.
As in high-end computing. ndiswrapper on the other hand is for running unfree and x86 only drivers. I couldn't care less about it... ;)

Not just many processes...

on
January 12, 2006 - 9:55am

It's not just a memory footprint issue but also a memory fragmentation issue. On machines with significant uptime, it can be difficult to find two contiguous 4K pages to make a new 8K stack. So, process creation might fail with the reason "Out of memory" when really it was just that the kernel couldn't allocate the stack.

This definitely feels like a laptop-vs-desktop tradeoff. Laptops with oddball WiFi cards will benefit more from ndiswrapper. Desktops with long uptimes or heavy process loading will benefit more from 4K stacks.

As it stands, it's currently a config option, and the first step in the transition process seems to be just changing the default for that config option. I imagine it'd stay a config option for awhile.

Yeah, guess it's both. Otherw

Anonymous (not verified)
on
January 12, 2006 - 10:19am

Yeah, guess it's both. Otherwise you could simpy always just handout 8Kb-pages. I guess that wouldn't even impact performance that much, since most of those pages could be paged out..

It's not just "oddball WiFi c

Anonymous (not verified)
on
January 12, 2006 - 10:42am

It's not just "oddball WiFi cards". Try to find a 802.11g card that has decent drivers in Linux. Even the models that used to work are limited to early versions of the product, because everyone and their dog moving to Broadcom chipsets. :-(

Working 802.11g cards include

Colin Leroy (not verified)
on
January 13, 2006 - 6:09am

Working 802.11g cards include cards with chipsets from:

Intel
Atheros
Ralink
Zydas
Prism54

Broadcom and TI chipsets are being reverse-engineered.

couldn't care less

Anonymous (not verified)
on
January 13, 2006 - 8:50pm

I didn't realize you didn't care about ndiswrapper - I'm sorry I even brought it up.

The archive link is broken

Marius Gedminas (not verified)
on
January 11, 2006 - 7:24am

The archive link opens the front page of kerneltrap.org instead of the mailing list archive. And it opens a new browser window. How rude!

Uhmmm... I'm using a Centrino

Anonymous (not verified)
on
January 11, 2006 - 11:44am

Uhmmm... I'm using a Centrino notebook. No problems with wireless. Never.

Using wireless on a desktop PC? Buy Netgear's WGE111 wireless bridge. Don't need no stinkin' driver for that.

If you use Linux, you should always check if there is GOOD support in Linux BEFORE buying something as you should always assume that it won't work.

Wireless stack? Never cared for it. But, well, to make software work is the task of distribution creators -- not kernel managers.

PLEASE: do not start to post pointless stories like it is done on /..

If you want to do something about end-user support, we can do two things:

First, take Gentoo Linux and put a user-friendly portage tree overlay on top of it. That way we could effectively have our own distribution and nevertheless benefit from the Gentoo developers' work.

Second, put up a website which tells users which hardware to buy. Put a section 'recommended hardware' in it. Tell them to only buy wireless LAN bridges and Centrino chipsets or some specific products which are known to work for sure.

I guess you missed Garzik's p

Anonymous (not verified)
on
January 11, 2006 - 1:34pm

I guess you missed Garzik's point, which was that "hardware known to work with linux" has become an artifact of the past for many things. I bought a CD burner and SATA hdd without worrying whether they were "linux compatible."

There are two big areas where this isn't exactly the case: video cards and wireless drivers. Video cards vary greatly from vendor to vendor, and I don't expect OSS drivers for the latest any time soon. On the other hand, wireless technology is largely subject to certain protocols, aka the wireless stack. I'm not a wireless dev, or even a kernel dev, but I'm pretty sure the intel ieee802.11 is derived from your own Centrino drivers. So I'd certainly hope they work, but I don't think its a bad idea to pursue ubiquitos support of hardware. Garzik seems to believe that a significant number of barriers between where we are now and where we'd like to be lie in fixable procedures.

Your commentary appears disingenious and alltogether exemplary of the /. mindset you derided.

> There are two big areas whe

Anonymous (not verified)
on
January 11, 2006 - 9:14pm

> There are two big areas where this isn't exactly the case: video cards and wireless drivers.

And printers, too.

...and scanners. And digital

Anonymous (not verified)
on
January 13, 2006 - 12:06am

...and scanners. And digital cameras.

Really, is that so? At my

Anonymous (not verified)
on
January 13, 2006 - 4:27am

Really, is that so?

At my worklplace we have a multitude of printers and none of them made any problems. The only "hurdle" was to select the right printer name in the configuration dialog and a HP Colorjet 450 had to be switched into Postscript mode.

When I attach my digicam to my computer, an icon appears on my KDE-desktop which lets me browse the pictures on it.

As for scanners, I never tried using one.

Consumer Inkjets vs Office lasers

Anonymous (not verified)
on
January 15, 2006 - 11:27am

Office laser printers work very well in Linux, and allways have.

The problem is consumer inkjets models, which do not have postscript/PCL/any standard support. You need a model-specific driver, which usually isn't worth writing, since in a few months the model is depreceated and replaced with another model.

Ofcourse, I think the whole inkjet industry is a scam designed to sell overexpensive ink. High quality paper and color ink is more expensive than printing photos in a photo shop.

Hmmm, in fact I've never seen

Anonymous (not verified)
on
January 13, 2006 - 11:10am

Hmmm, in fact I've never seen a digicam not working for Linux, and I've tried quite a few...

Minolta Dimage 2300 USB dosn'

Anonymous (not verified)
on
February 1, 2006 - 12:46pm

Minolta Dimage 2300 USB dosn't work in linux, nobody ever reported it to work

Digital cameras are just USB

Anonymous (not verified)
on
January 13, 2006 - 11:52am

Digital cameras are just USB storage devices. The only one I've seen fail is a weird thing from canon a relative picked up on the cheap, and that was years ago.

But even oddball Canons tend

Anonymous (not verified)
on
January 14, 2006 - 5:24pm

But even oddball Canons tend to work with gphoto2.

Except...

Sam Morris (not verified)
on
February 10, 2006 - 12:49am

Except when they only support the Picture Transfer Protocol with proprietry extensions. :(

Only a few (non-multi functio

Anonymous (not verified)
on
January 13, 2006 - 11:09am

Only a few (non-multi function) doesn't work properly today.

> to make software work is th

on
January 11, 2006 - 5:03pm

> to make software work is the task of distribution creators -- not kernel managers.

Uh? You should try to think a little bit before posting such stupid remark like this one.

"If you use Linux, you should

J. J. Ramsey (not verified)
on
September 22, 2006 - 6:44pm

"If you use Linux, you should always check if there is GOOD support in Linux BEFORE buying something as you should always assume that it won't work."

That is much easier said than done. For example, I bought a new Thinkpad with the ipw3945 (Intel PRO/Wireless 3945) wireless card, specifically because there was a native driver for it. And indeed the *driver* seems to work. I can certainly run "iwlist scan" and see the access points out there at my university. *Connecting* to them is a whole other story.

It was only after I bought the laptop that I learned what a pain in the butt wireless authentication--or at least LEAP authentication--is under Linux. I don't know if it's the software, or if the documentation for the various supplicants (e.g. wpa_supplicant) is just bad at dealing with subtle configuration issues, or what, but it's a mess. I have none of these problems under Windows. My choices seem to be to find a Linux guru at the university and hope he can help in his Copious Spare Time(TM), buy an old Cisco Aironet 340/350 card (and it has to be an old card since Cisco seems to have abandoned Linux support for its newer cards, or at least provides no utilities for them), or just use Windows and Cygwin on the laptop. It's ugly all around.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.