zd1211rw
A large proportion of USB-wireless devices on the consumer market are based on the ZyDAS ZD1211. Production seems to have slowed since the [http://www.atheros.com/news/ZyDAS.html Atheros acquisition], but these devices are still being sold and are very widespread. Just recently Atheros has introduced the name AR5007UG for the device.
zd1211rw is a community effort to rewrite [http://zd1211.ath.cx/wiki/VendorDriver ZyDAS's ZD1211 driver]. zd1211rw has been included in the kernel since [http://kernelnewbies.org/Linux_2_6_18 Linux 2.6.18].
On January 11th 2006, a few developers announced a very early version of a rewritten driver, which had been under development for a few days. Soon after doing so, Ulrich Kunitz announced that he had already been working on a rewrite driver for a few weeks. Ulrich's design was clean and was at a further stage in development, so became the base of the future rewrite effort.
On April 5th 2006, we gave a short [http://www.deine-taler.de/zd1211/zd1211-wisu.pdf presentation] at the Linux Wireless developers summit. LWN has a [http://lwn.net/Articles/179305/ report] of the summit ([http://johannes.sipsolutions.net/wireless.php photo here])
On April 17th 2006, we [http://www.nabble.com/Rewritten-driver-partially-functional-t1462616.html announced initial zd1211rw usability] on the mailing list.
On July 4th 2006, an early version of zd1211rw was merged into Linus' kernel, just in time for 2.6.18-rc1
On December 2nd 2006, Michael Wu [http://article.gmane.org/gmane.linux.network/51000/ ported zd1211rw] to the cutting-edge mac80211 wireless stack which will be merged into mainline Linux at some point in the near future. The ported driver is being maintained in John Linville's wireless-dev.git tree. Also, Daniel and Michael attended the [http://developer.osdl.org/dev/desktop_architects/index.php/Wireless_Summit_2 2nd Linux Wireless Summit].
Supported Devices
Please see the ["en/users/Drivers/zd1211rw/devices" device list].
Status
- Usable and stable in managed mode, provided that you are able to run a recent kernel
- The following table indicates the feature set for the in-kernel zd1211rw driver
Feature |
Status |
ZyDAS chips supported |
ZD1211 and ZD1211B (in one kernel module) |
[http://zd1211.ath.cx/wiki/RfTypes RF types] supported (ZD1211) |
AL2230, AL2230S, RF2959, AL7230B (802.11b/g only) |
[http://zd1211.ath.cx/wiki/RfTypes RF types] supported (ZD1211B) |
AL2230, AL2230S |
Support for multiple concurrent devices |
yes |
Connecting to open networks |
working |
Connecting to WEP networks |
working |
Connecting to WPA networks/wpa_supplicant |
working |
Monitor mode |
working |
Master mode |
not yet |
Ad-hoc mode |
not yet |
802.11a support |
not yet |
Hardware encryption |
not yet |
Largepacket + TX-burst support |
not yet |
Automatic rate selection/management |
not yet |
iwconfig parameters supported |
essid, mode, key, channel, ap, rate |
Ability to change [http://en.wikipedia.org/wiki/MAC_address MAC address] |
yes |
Power management support |
? (probably not yet) |
Automatic TX power calibration |
not yet (fixed TX power currently) |
Complying with local regulations |
yes (channel masks implemented) |
Architectures tested |
x86, PPC32, x86-64, ARM |
ChangeLog
Linux 2.6.22
- AL2230S RF support
- More device ID's added
Linux 2.6.21
- More device ID's added
Linux 2.6.20
- Multicast/IPv6 support
- More device ID's added
- Advanced ERP handling
- ifconfig now reports packet statistics
- Bug fixes
Linux 2.6.19
- LED support
- Support for driverless devices
- AL7230B RF support
- Many more device ID's added
Linux 2.6.18
- zd1211rw added to mainline kernel
Firmware
Firmware is pulled from userspace, get the files [http://sourceforge.net/project/showfiles.php?group_id=129083 here]
Debian users beware: don't use the the zd1211-firmware package, as this is for Debian's fork of the [http://zd1211.ath.cx/wiki/VendorBasedDriver vendor-based driver]
The location the firmware has to be put to varies from distribution to distribution. See dmesg output if loading firmware fails.
Requirements
- Linux 2.6.18-rc1 or newer, with the ieee80211, ieee80211softmac, and firmware_class modules (CONFIG_IEEE80211, CONFIG_IEEE80211_SOFTMAC, CONFIG_FW_LOADER)
- There is no backwards compatibility with older kernels
- Device firmware (see above)
Known issues
No automatic rate management means that the user must select a sensible rate through 'iwconfig'.
Bring the interface up before using it at all: # ifconfig <INTERFACE> up
On some distributions (e.g., Debian) dhclient scripts do an ifconfig down/up before trying to get an IP which causes the driver to disassociate. Add iface eth1 inet dhcp to your /etc/networking/interfaces and bring up the interface with ifup eth1.
- zd1211rw has to be built as a module as otherwise the driver may try to upload firmware before the filesystem is up.
RF UW2453 support - Aldi/Medion Notebooks
ZD1211 devices have two chips that need to be controlled by the driver: the ZD1211 chip and the RF chip. The RF chip is responsible for transforming the signal to the 2.4 GHz or 5.1 GHz bands and amplifies the transmission and reception signals.
Devices with the UW2453 chip have appeared on the market at the start of 2007. Haoyu Cheng sent a device with the chip to Daniel Drake at the end of February. Daniel started to work on it immediately. However the control of the chip appears to be more complex than the other RFs the zd1211rw driver is already supporting. So there is no working driver at this point in time. As a result the zd1211rw driver doesn't support the Airlink101 device AWLL3025V2 and the Medion notebooks 9700, 98200 and 98300 also known as Aldi-Notebooks. We are not happy about the situation and we are doing everything we can to change it.
You can help by providing Uli Kunitz (kune@deine-taler.de) with a ZD1211/UW2453 device or start working on the driver itself, see [#trees Trees].
Performance
- RX performance is about half that of vendor driver, will be improved (probably better now, needs re-measure)
- TX speed should be OK, can be optimized to remove memory allocations in critical path
Debugging
- To enable debugging, enable the CONFIG_ZD1211_DEBUG kernel option
You can keep an eye on softmac's activity by running iwevent in another console while you work.
USB ID's and RF types
We have *not* copied over the list of USB ID's from the ZyDAS driver. We wish to confirm that the RF is supported for each device, and that the device actually works with our driver, before we add the USB ID.
For an explanation of RF types, see [http://zd1211.ath.cx/wiki/RfTypes this page]. We'll add support for more RFs if we see them included in devices available on the market (i.e. if you tell us!).
Since we only list a few ID's at the moment, you might have to add your own before testing this. Please send success and failure reports to this list. Add your own ID into the usb_ids table near the top of zd_usb.c. There are more detailed instuctions [http://zd1211.ath.cx/wiki/UntestedWithRewrite here].
Patches
If you wish to contribute, send patches to the [:developers/MailingLists:linux-wireless mailing list] with Daniel and Ulrich on CC (no subscription required). Note there are some [http://zd1211.ath.cx/wiki/Bounties bounties] available for patches!
Please [http://sosdg.org/~coywolf/lxr/source/Documentation/SubmittingPatches#L270 sign off] on your patches, because your patch will probably end up in the kernel source.
zd1211rw-softmac vs zd1211rw-mac80211
There are now two versions of zd1211rw available.
1. zd1211rw-softmac
This is the driver included in mainline Linux. All of the above information refers to this version of the driver. Unless you have jumped through the appropriate hoops to run the mac80211 version, you are running this driver.
This driver uses the ieee80211 wireless stack included in mainline Linux (originally contributed by Intel) and the ieee80211softmac addon (originally contributed by bcm43xx driver developers). This stack lacks many features. It is one of the main reasons why many features are not available in the driver (master mode, ad-hoc, ...) – there is no stack-level support for these. However, it does do a good job of hiding most of the protocol-level details and allows us to maintain a nice small driver which works well in managed mode.
For developers: zd1211rw-softmac is maintained in Daniel's out-of-tree git repo. Patches are then emailed upstream to John Linville's wireless-2.6 git tree who pushes them towards Linus.
2. zd1211rw-mac80211
ieee80211/softmac stack development is almost entirely halted (and has been for a while) as it was decided in 2006 that we will be replacing the entire wireless stack (and all drivers) with a new one: mac80211. mac80211 was formely known as d80211.
mac80211 is a fully featured 802.11 stack originally developed by Devicescape and opened up to the community later. Although some driver-level code is still required, it does fill in many blanks in our feature table: it has stack-level support for master mode, ad-hoc, automatic rate adjustment, ...
However, like any large body of code developed away from the community, it requires a lot of work to get it in a form suitable for mainline Linux inclusion. This work is still underway. We anticipate mac80211 being merged into mainline Linux in the next few months.
Thanks to Michael Wu, zd1211rw has been ported to this new stack and this is where all new driver development is happening. However, Daniel is continuing to backport fixes and features (where possible) to the zd1211rw-softmac version so that mainline Linux users are not left in the dark.
The main new features supported in zd1211rw-mac80211 are:
- Automatic rate adjustment
- Virtual interfacing: you can be associated to a network through a managed mode interface while additionally running a monitor mode interface on the same channel
Features such as ad-hoc and master mode are not supported yet, but it is not a big job to add the driver-level code to do this. Additionally, the mac80211 port has currently dropped these features in comparison to the softmac driver:
- Advanced ERP handling (this probably needs implementing in mac80211)
[http://dsd.object4.net/git/?p=zd1211.git;a=commitdiff;h=2c1784a975f39b49037358b061d4f94ed9ffcac2 Detailed error statistics] (need to check how mac80211 does this)
- iwconfig doesn't report current TX rate
- Signal level/strength/quality/noise values are wrong (maybe fixed, need to recheck)
- No regulatory domain control (channel masks not implemented)
There is currently not really any documentation explaining how users can download and use the mac80211 kernel tree - this is still aimed at developers only. Questions should be asked on the linux-wireless mailing list. Intel do maintain [http://www.intellinuxwireless.org/?p=mac80211 some brief documentation] about how to check out the kernel from git.
For developers: zd1211rw-mac80211 is developed in Daniel's development kernel git tree and Ulrich's development kernel git tree. Daniel emails patches to John Linville's wireless-dev.git tree after both Daniel and Ulrich signify acceptance of patches.
Trees (for developers only)
Ulrich's driver development kernel git tree (mac80211): http://www.deine-taler.de/zd1211/wireless-dev.git (see the zd1211rw branch) ([http://www.deine-taler.de/git/?p=wireless-dev.git;a=summary viewable on the web])
Daniel's driver development kernel git tree (mac80211, pull only): http://www.deine-taler.de/~dsd/git/wireless-dev.git (see the zd1211rw branch)
John Linville's development kernel git tree (mac80211): git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-dev.git (also [http://www2.kernel.org/git/?p=linux/kernel/git/linville/wireless-dev.git;a=summary viewable on the web])
Daniel's out-of-kernel zd1211rw-softmac git tree for mainline driver maintenance: http://dsd.object4.net/git/zd1211.git (also [http://dsd.object4.net/git/?p=zd1211.git;a=summary viewable on the web])
John Linville's upstream kernel git tree (softmac): git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git (also [http://git.kernel.org/?p=linux/kernel/git/linville/wireless-2.6.git viewable on the web])
Contact
Daniel Drake (dsd@gentoo.org)
Ulrich Kunitz (kune@deine-taler.de)
- Please don't mail us with questions directly, use the mailing list.
[:developers/MailingLists:linux-wireless mailing list]
[http://sourceforge.net/mail/?group_id=129083 zd1211-devs mailing list] (subscribers only) ([http://www.nabble.com/zd1211-devs-f3221.html web interface])
- We are not affiliated with ZyDAS. Do not contact them if you are using this driver.
- We are on IRC: Freenode, #zd1211