$Id: README,v 1.12 2004/08/13 22:26:13 jbicket Exp $

This driver is a fork of the madwifi driver; it is the basic driver
without the 802.11 management module (basically the wlan dir).

It does no management functions like scanning, or even 802.11
encapsulation or decapsulation.  You can do basic things like set the
channel, mode, bitrate, and a few other things.  If you want to send
packets on it, you should send raw 802.11 frames.

It is designed to be used with a kernel that runs with with click
modular router.  See http://pdos.lcs.mit.edu/click/
Look in the wifi elements for the modules that support 802.11.

To get this driver to build, you will have to run a kernel that has
been patched with the general click patch.

See the etc directory for sample click configurations.
There is a README in that dir also.


INSTALL:

First, install click: patch your kernel.

Next, to make and install the driver, do the following:
gmake
cp ath_hal/ath_hal.o driver/ath_pci.o /lib/modules/YOUR_KERNEL_HERE/net/wireless
depmod -ae

RUNNING:

To start the driver, run
modprobe ath_pci

you can use iwconfig to set the essid and the bssid, although these
really won't do anything.

FEATURES:

promiscuous mode - running "ifconfig ath0 promisc" will set the 
device in promiscuous mode (usually known as "monitor mode").


To receive phy errors (crc errors and the like) from the card, run
"sysctl -w dev.ath.phyerr=1".  Packets with phy errors will be marked
with the WIFI_RX_STATUS_ANNO and WIFI_RX_ERR_ANNO annotations set.
You can use the PhyErrFilter element to distinguish between phy err 
packets and packets that were received intact.


Registers:

You can read and write registers using iwpriv.
Here are some examples to set the RSSI_THRESHOLD register.

sudo iwpriv ath0 getreg `hex 0x8018` 
sudo iwpriv ath0 setreg `hex 0x8018` `hex 0x700`

SUPPORTED HARDWARE:

(this is from the old readme)
There are currently 3 generations of Atheros 802.11 wireless devices:

5210	supports 11a only
5211	supports both 11a and 11b
5212	supports 11a, 11b, and 11g

These parts have been incorporated in a variety of retail products
including cardbus cards from DLink, Linksys, Netgear, Orinoco,
Proxim, and 3Com; and mini-pci cards from some of these same vendors.
In addition many laptop vendors use Atheros mini-pci cards for their
builtin wireless support.  For an up-to-date list of cards based
on Atheros parts visit:

http://customerproducts.atheros.com/customerproducts

In general, if a device is identified as ``11a only'' it is almost
certain to contain an Atheros 5210 part in it.  All retail a+b
products use the 5211.  The latest generation of universal a+b+g
combo products use the 5212.  When in doubt check the PCI vendor
id with a tool like lspci, the Atheros vendor id is 0x168c; e.g.

   00:13.0 Ethernet controller: Unknown device 168c:0012 (rev 01)

but beware that come vendors use alternate vendor id's (e.g 3Com).
The file hal/ah_devid.h has a list of known PCI id's.


Wireless tools cribsheet:

iwconfig ath0 essid "foo"	set the ssid to foo
iwpriv ath0 mode 1		lock operation to 11a only
iwpriv ath0 mode 2		lock operation to 11b only
iwpriv ath0 mode 3		lock operation to 11g only
iwpriv ath0 mode 0		autoselect from 11a/b/g (default)

There are some debugging mechanisms for the curious/masochistic:

sysctl -w dev.ath.debug=1	enable console msgs from the driver
sysctl -w dev.ath.dump="hal"	dump h/w register state to the console
echo 1>/proc/net/wlan0/debug	enable console msgs from the wlan module



FEEDBACK

Please don't email the madwifi people about this driver.
If you have questions, email jbicket@amsterdam.lcs.mit.edu

bug reports are welcome, and patches with them are very much appreciated.

When sending a problem report be sure to include the version of the
driver and the part identification the driver prints to the console when
the module is loaded.  For example,

ath_hal: 0.8.2.0
wlan: 0.7.0.0
ath_pci: 0.8.2.0
PCI: Found IRQ 11 for device 00:13.0
ath0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
ath0: 802.11 address: 00:05:5d:6f:99:5f
ath0: Atheros 5211: mem=0xfebf0000, irq=11

This says the HAL module is version 0.8.2, the wlan module is version
0.7, the driver is version 0.8.2 and the hardware uses an Atheros
5211 chip (which supports 11a and 11b modes).




