Subject: introducing ath(4) and the FreeBSD 802.11 layer
To: None <,>
From: David Young <>
List: tech-net
Date: 10/13/2003 04:36:22
I have just committed my port of FreeBSD's Atheros chipset driver,
ath(4). The driver supports 802.11a/b/g multimode cards made by
manufacturers such as D-Link and Linksys. Virtually every 802.11a radio
manufactured today contains the Atheros chipset.

The Atheros driver is partly open source, partly closed source. The
closed-source part is the Hardware Abstraction Layer (HAL). The HAL
is only available in closed-source so that the details of tuning the
Atheros radio are concealed from programmers who would tune Atheros cards
to interfere with radars operating between 4.9 and 5.8GHz.  Because the
HAL is distributed under a different license than the rest of the NetBSD
sources, it is located in src/contrib/.

To support multi-mode devices, it was necessary to bring over Sam
Leffler's improvements to the 802.11 layer, which is located in
sys/net80211/. Besides multi-mode support, the new 802.11 layer is more
"object-oriented" than the old, and it contains improved AP scanning code.

Drivers atw, awi, and awi made heavy use of our previous 802.11 layer. It
was necessary to adapt each to use the new 802.11 layer. Also, I added
support for frequency-hopping PHYs to the new 802.11 layer so that awi
could be completely supported.

ifconfig(8) has a new option, 'mode', which sets the PHY mode. Available
modes are 802.11a mode (act as an 802.11a AP, only, or else associate
only to 802.11a APs), .11g, or .11b mode. There is also mode 'auto',
where the driver chooses the PHY mode automatically.  There are also
several new 802.11 media subtypes for you to set using ifconfig(8),
for example, ofdm54 for .11a and .11g radios.

Many source files were very slightly changed to #include the header
files from the new 802.11 layer: sources for an(4), ray(4), wiconfig(8),
were affected by changes of this sort,

-#include <net/if_ieee80211.h>
+#include <net80211/ieee80211.h>
+#include <net80211/ieee80211_ioctl.h>

Possibly there are programs in pkgsrc that will need those changes.

These changes pass my tests on the following hardware,


    atw at pci
    ath at pci
    wi at pci


    atw at cardbus
    wi at obio

I am limited to testing awi on macppc using BayStack 650 frequency-hopping
radios. I have never had any luck with the 650s on macppc, and I do not
have any easy way to test them on i386. I tested and debugged until awi(4)
was no worse broken on macppc than it was before. I am determined to make
awi work on both i386 and macppc, but I estimate that there is one awi
user in the NetBSD universe, compared to at least three or four people
who want to use their Atheros cards with NetBSD. I hope that it is not
intolerable to anybody if there is temporary awi breakage in -current.


David Young             OJC Technologies      Urbana, IL * (217) 278-3933