Host AP driver for Intersil Prism2

Introduction | Download | Supported environment | Installation | Bridging wireless/wired

Introduction

This is a Linux driver for wireless LAN cards based on Intersil's Prism2 chipset. The driver supports a so called Host AP mode, i.e., it takes care of IEEE 802.11 management functions in the host computer and acts as an access point. This does not require any special firmware for the wireless LAN card. In addition to this, it has support for normal station operations in BSS and possible also in IBSS.

Intersil's station firmware for Prism2 chipset supports a so called Host AP mode in which the firmware takes care of time critical tasks like beacon sending and frame acknowledging, but leaves other management tasks to host computer driver. This driver implements basic functionality needed to initialize and configure Prism2-based cards, to send and receive frames, and to gather statistics. In addition, it includes an implementation of following IEEE 802.11 functions: authentication (and deauthentication), association (reassociation, and disassociation), data transmission between two wireless stations, power saving (PS) mode signaling and frame buffering for PS stations. The driver has also various features for development debugging and for researching IEEE 802.11 environments like access to hardware configuration records, I/O registers, and frames with 802.11 headers.

Download

Copyright (c) 2001-2002, SSH Communications Security Corp
Author: Jouni Malinen, <jkm@ssh.com> or <jkmaline@cc.hut.fi>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. See COPYING for more details.

Note!
This development version is mainly for research use; it has not been thoroughly tested and may contain various bugs. This is not for production use and use of this driver may require thorough knowledge of IEEE 802.11, pcmcia-cs, Linux, etc.

Distribution package: Prism2-2002-04-13.tar.gz

Please see README.prism2 for updated documentation of the driver.

ChangeLog

Known issues in this version:

Older versions:

Feedback, comments, mailing list

Any comments, reports on success/failure, ideas for further improvement, feature requests, etc. are welcome at jkm@ssh.com and/or jkmaline@cc.hut.fi. Please note, that I may not always have time for replying emails quickly, but I'll try to go through my mail when ever time permits. There is also a mailing list for Host AP related messages. Since this list has a broader audience, you might even get an answer.. Anyway, this list is recommended for general questions about Host AP driver and its development. In addition, I will send release notes to it whenever a new version is available.

The mailing list address is hostap@lists.ssh.com (i.e., messages send to this address will be delivered to subscribers). You can subscribe by sending a message to hostap-subscribe@lists.ssh.com. The list is managed with Ezmlm and its features like archive retrieval can be used via email. You can also browse the messages at a web archive.

Supported environment

Hardware

The driver should work with wireless LAN cards that are based on Intersil's Prism2 chipset and especially its MAC processor (HFA3841 or HFA3842). This version has been successfully tested with couple of different models, e.g., Compaq WL100 and WL200, D-Link DWL-650, and Linksys WPC11, but there may still be issues with other models. If you happen to have a wireless LAN card that is based on Prism2, but does not seem to work with this driver, please let me know the model and I can try to come up with a solution for any problems. This will be easier if I have access to the non-functioning card model, but I might also be able to solve some cases based on debug logs and other easily collectible information.

In addition to Intersil's Prism2 chipset, this driver may partly support other chipsets. As far as I know, other chipsets do not have Host AP mode, so this is not supported, but managed mode (i.e., being a station in a BSS) seems to work with Prism1 (e.g., Intel, 3Com, and Symbol cards) and Lucent WaveLAN. I would like to add support for AP functionality also with these cards, but I'm not sure whether it can be done without special firmware. Please let me know, if you have further information about this.

The driver should be portable to different host CPUs. I have tested it with ix86 and PowerPC platforms; other platforms will probably need some changes at least to the I/O macros.

Software

This driver is developed in Linux 2.4.x environment, but it may also work with Linux 2.2.x kernels (I have tested it few times with 2.2.x kernel successfully, but I'm not really used those kernel versions anymore so there may be some compatibility problems).

Installation and configuration

Systems using kernel tree PCMCIA modules

'Makefile' includes commands for compiling and installing Host AP driver for systems using kernel tree PCMCIA support (i.e., kernel modules are not compiled with external pcmcia-cs package). Edit KERNEL_PATH in Makefile to match your system. Run 'make' (this compiles the sources; this step can be run as non-root user). After the compilation has finished, you can install prism2.o by running 'make install' (as root). You will then need to restart cardmgr to load new configuration from /etc/pcmcia/prism2.conf.

Systems using external pcmcia-cs modules

Copy everything from 'driver' subdirectory on top of root pcmcia-cs directory, i.e., so that driver/modules/prism2.c ends up in pcmcia-cs's 'modules' directory, like so:

cp -a driver/* /usr/src/pcmcia-cs-3.1.31

After this you should be able to build and install pcmcia-cs with this driver (prism2.o) using normal commands ('make config', 'make all', and 'make install').

pcmcia-cs need to know which driver to use for each PC Card. This driver has its own file (/etc/pcmcia/prism2.conf) that lists few PC Cards that are supported. It does not include every Prism2-based card, so you may need to add your model to prism2.conf in order to get the driver started.

The driver support Linux Wireless Extensions and certain configuration items can be viewed and changed with iwconfig(8) and iwpriv(8) from wireless utilities, e.g., mode (AP/station; iwconfig's 'mode'), channel (iwconfig's 'freq' or 'channel'), WEP (encryption; iwconfig's 'key'; however, WEP is not supported in Host AP mode), beacon interval (iwpriv's 'beacon_int'), and pseudo vs. normal IBSS (ad-hoc) mode (iwpriv's 'pseudo_ibss').

Bridging between wireless and wired networks

Prism2 AP driver controls a wireless device (wlan#), but does not take care of bridging between wireless and wired networks. If this AP feature is required, it has to be implemented using an external software.

Linux kernels support Ethernet bridging (code already present in 2.4.x kernels and also as a separate patch for 2.2.x kernels). This can be used to easily build an AP between the wired and wireless networks. Below is an example of a simple setup in which the AP has one Ethernet interface and one wireless interface. If needed, see http://bridge.sourceforge.net/ for more information on Linux kernel's Ethernet bridging.

Example:

(after loading Prism2 AP driver)

brctl addbr br0
brctl addif br0 eth0
brctl addif br0 wlan0
ifconfig eth0 0.0.0.0
ifconfig wlan0 0.0.0.0
ifconfig br0 192.168.100.200 up

(the AP bridges packets between Ethernet and wireless LAN and can be reached with IP address 192.168.100.200 from either network; stations associated to this AP can then communicate with other wireless LAN stations and with the hosts in the wired network)

IEEE 802.11 monitoring

Prism2 cards have a test mode that can be used for monitoring wireless networks. In this mode the driver receives all raw IEEE 802.11 frames (including management frames). Monitoring mode can be started using iwpriv(8):

iwpriv wlan0 monitor 1
start monitor mode and send received frames (including Prism2 RX structure and 802.11 header) to user space using netlink socket
iwpriv wlan0 monitor 2
start monitor mode and send received frames (including 802.11 header) to user space using normal netdevice. This changes the device type to ARPHRD_IEEE80211 so that user space programs know how to handle different header type.
iwpriv wlan0 monitor 0
disable monitor mode and return to Host AP mode

Example programs in 'sniff' directory can be used to receive monitored frames send using netlink socket (monitor 1 mode above). wlansniff.c is a simple 802.11 frame parser that shows both the Prism2-specific data from the RX frame and parsed contents of the 802.11 frame. prism2ethereal is a utility that writes receives frames into a dump file that can be read, e.g., to Ethereal for further analysis.

Latest versions of libpcap and Ethereal support ARPHDR_IEEE80211 so monitor 2 mode above can be used with them for real time IEEE 802.11 network monitoring.


Jouni Malinen
Last modified: Sat Apr 13 19:02:54 EEST 2002