I just stuck the following line in my cron.d directory.
17 05 * www-data /etc/init.d/atheros stop; /etc/init.d/atheros start
What this does is to restart the Linux driver for my Atheros PCI card every night. I'm trying this because the driver seems only able to stay up for about 36 hours. This is my latest and most desperate attempt to date to actually have this card act as a working Linux AP… I, like many people, purchased my Atheros HW several years ago because it was cheap, and because it worked really well with Linux. Atheros, unlike most of its competitors at the time, wanted to encourage open source drivers. However, for complex reasons it was unwilling to release specification for its hardware. Their solution was to release a binary-only Hardware Abstraction Layer that open source drivers could be written atop. The MadWifi project did so.
The resulting driver was quite cool. It enabled some really useful functionality, such as running multiple stations on the same piece of hardware. It always had reliability issues, but eventually stabilized by early Linux 2.6 as something that was of production quality.
However, because of the dependency on the binary HAL, it was politically difficult to get MadWifi into the mainline Linux kernel. Vendors were concerned about shipping a binary blob in a GPL'ed product, and the FSF was not encouraging in this regard. Thus, someone started to reverse engineer the Atheros hardware with the goal of writing a fully open-source driver.
The result of these efforts was the ath5k Linux driver. The MadWifi team made the decision in 2007 to declare their existing driver legacy and work on ath5k. During this time period, there was also a bunch of copyright and licensing dispute over the reverse-engineered code, which was originally written for BSD by several parties and licensed under an eclectic collection of licenses. This dispute now appears to be largely resolved, if not entirely amicably. The ath5k driver is now in mainline.
...
Unfortunately, two years later ath5k still doesn't work. Vital functionality is still missing. The mainline version as of kernel 2.6.30 does not even support station mode. The development version reportedly does, but it has a number of bad outstanding bugs in this regard.
Meanwhile, the legacy MadWifi bits have bit-rotted. MadWifi, in every incarnation I have tried, now regularly hangs itself at best, and the kernel at worst. Only a couple of patches in the development tree over the last couple of years even try to address these problems; the MadWifi developers have truly moved on.
Thus, I am left with no workable driver for a PCI card that I had adopted as an important part of my Linux infrastructure. Worse yet, the Atheros chipset still appears to be the best-supported Wifi chipset for Linux, so I can't just replace the hardware and move on.
What I will probably do this week is what everyone else does: set up an external WAP and kill my Atheros card. I'm still trying to figure out whether I need one or two WAPs as replacements. I was running two stations on my old card, so I have to decide whether it's worth trying to keep them both. Alternatively, I might be able to find a WAP that supports multiple station mode, but I don't know of one offhand.
This being open source and all, in principle what I should do is fix MadWifi or ath5k, or at least provide detailed bug reports that might enable an ath5k fix. However, this is quite complicated hardware and software; I would guess I'm looking at 20 or 30 hours of work to get any kind of resolution to my problems. I just don't have that kind of time right now. [Turns out I was wrong. Thanks to help from Luis Rodriguez (see comments below) it took me about five hours to get ath5k going. So far, no bugs, and I don't particularly expect any given the apparently newly-mature state of ath5k.]
As you can tell, I am quite frustrated. Regressions are always frustrating; regressions on a critical and largely irreplaceable piece of hardware are worse. I really wish some folks had done things differently over the past few years. I hope that something was learned from this train wreck, but I see little evidence of that right now. All I see is broken stuff scattered across the tracks. (B)