NOTE: this page is for archival only, see the note at the end of the page.

zd1211rw

A large proportion of USB-wireless devices on the consumer market are based on the ZyDAS ZD1211. Several months after the acquisition, Atheros rebranded the chip to AR5007UG.

zd1211rw is a community effort to rewrite ZyDAS's ZD1211 driver. zd1211rw has been included in the kernel since 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 presentation at the Linux Wireless developers summit. LWN has a report of the summit (photo here)

On April 17th 2006, we 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 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 2nd Linux Wireless Summit.

In May 2007, Atheros rebranded the ZD1211B chip but don't appear to have made other changes. The new chip name is Atheros AR5007UG (alternatively known as AR2524/AR5524). The hardware is supported by the current driver, except all known AR5007UG devices are based on UW2453 radio which won't be supported until Linux 2.6.23.

Subcontent

Supported Devices

zd1211rw supports devices based on the following chipsets:

  • ZyDAS ZD1211
  • ZyDAS ZD1211B
  • Atheros AR5007UG

For a complete listing of supported products, see the 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)

RF types supported (ZD1211)

AL2230, AL2230S, RF2959, AL7230B, UW2453

RF types supported (ZD1211B)

AL2230, AL2230S, AL7230B, UW2453

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

Mesh mode

working, see o11s project site

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 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.23

  • UW2453 RF support
  • Firmware load deferred to interface up time (as opposed to device detection time: you can now build zd1211rw into your kernel image)
  • More device ID's added

Linux 2.6.22

  • AL7230B/ZD1211B support
  • More AL2230S support
  • More device ID's added

Linux 2.6.21.5

  • AL2230S RF support

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 here

    • Debian users beware: don't use the the zd1211-firmware package, as this is for Debian's fork of the 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.

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 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!).

We currently support most of the IDs listed in the vendor and vendor-based drivers, but not all. You may have to add your own ID before using the driver – there are more detailed instructions available.

Patches

If you wish to contribute, send patches to the linux-wireless mailing list with Daniel and Ulrich on CC (no subscription required). Note there are some bounties available for patches!

Please 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. mac80211 is merged into mainline Linux as of version 2.6.22, but we aren't quite ready to move zd1211rw away from softmac yet.

Thanks to Michael Wu, zd1211rw has been ported to this new stack and this is where all new driver development is happening. This fork is known as zd1211rw-mac80211 and is being developed outside of the mainline Linux tree. 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.

The mac80211 port has dropped some features in comparison with the softmac driver. For more info, see the mac80211 issues page.

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 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)

Contact


This is a static dump of the old wiki, taken after locking it in January 2015. The new wiki is at https://wireless.wiki.kernel.org/.
versions of this page: last, v41, v40, v39, v38, v37, v36, v35, v34, v33, v32, v31, v30, v29, v28, v27, v26, v25, v24, v23, v22, v21, v20, v19, v18, v17, v16, v15, v14, v13, v12, v11, v10, v9, v8, v7, v6, v5, v4, v3, v2, v1