
Intel PRO/Wireless 2100 802.11b Linux Driver
Copyright (C) 2004, Intel Corporation
For additional information, contact James Ketrenos <jketreno@linux.intel.com>

COMPILER REQUIREMENTS - GCC 3.x
---------   ------     ----       ---    --       --       -          -

You need to be using GCC v 3.0 or higher in order to build the ipw2100 project.
Using older versions will result in several compilation errors.


KERNEL REQUIREMENTS - Wireless Tools
---------   ------     ----       ---    --       --       -          -

If you are building the IPW2100 driver outside of the kernel build system then
you need to ensure that you have enabled wireless capabilities within your
kernel (CONFIG_NET_RADIO=y).  

Failure to do this will result in the Wireless Tools (iwconfig, iwlist, etc.) 
not functioning.

You can check if your kernel is configured with CONFIG_NET_RADIO by running:

% grep CONFIG_NET_RADIO \
	/lib/modules/2.4.20/build/include/linux/autoconf.h

You should see the line:

#define CONFIG_NET_RADIO 1

If you have to turn on CONFIG_NET_RADIO in your kernel configuration, make sure
you also rebuild, install, and reboot to the new kernel image.  For help or
instructions on configuring and building the kernel please consult the 
documentation contained in your distribution.


OTHER REQUIREMENTS - hostap-driver-0.1.3
---------- --------  ---------    -----     -----      ---      --        -
IPW2100 uses the WEP encryption and decryption algorithsm from the Host AP
project.  Therefore, in order to enable WEP you must have the following modules
from that project installed:

    hostap
    hostap_crypt_wep

To install those modules, download hostap-driver-0.1.3 from 
http://hostap.epitest.fi.  You can then follow these steps:

 % tar xzvf hostap-driver-0.1.3.tgz
 % cd hostap-driver-0.1.3
 % make 
 % sudo make install

If attempting to load the IWP2100 driver results in the following message:

  Unresolved symobl 'hostap_get_crypt_ops'

Then the hostap module is not being automatically loaded by your kernel when 
you try and load the IPW2100 driver.  Try manually loading the hostap module 
via:

 % modoprobe hostap



INSTALLING THE BITS
------------ -----   -----       ----       ---       --         -     

There are two ways to build the IPW2100 driver--the easiest way is to build it
external to the kernel build system.  If you want to configure and build the
driver using the full kernel build and configuration system, then skip to the
section BUILDING INTERNAL.


BUILDING EXTERNAL
----------- -----   ----   ----      ---       --       -             -

First, you need to unpackage the source code:

% tar xzvf ipw2100-0.43.tgz
% cd ipw2100-0.43

The driver package contains a Makefile that can be used for building the
driver outside of the kernel tree.  To build it for the currently running
kernel, simply type:

% make HOSTAP=/path/to/hostap-driver-0.1.3

If you have Host AP configured internally to your kernel (CONFIG_HOSTAP is 
set), just running 'make' will look for the Host AP tree in:

  $(KSRC)/drivers/net/wireless

If you do not have Host AP internal to your kernel (CONFIG_HOSTAP is not set), 
running 'make' will look for Host AP tree in:

  $(PWD)/hostap-driver-0.1.3

If you supply the HOSTAP parameter to make, it checks to see if the path 
provided is absolute or relative.  If absolute, it will look for the Host AP
tree in:

  $(HOSTAP)

eg: make HOSTAP=/usr/src/modules/hostap-source

If you supply a relative path, the Makefile will look for the Host AP tree in:

  $(PWD)/$(HOSTAP)

eg: make HOSTAP=../hostap-driver-0.1.3

NOTE:  The HOSTAP should point to the base of the Host AP source tree--not to 
the directory that contains the hostap_crypt.h.  This is to ensure that if 
we have to add other directories to the build system from the Host AP source 
tree we can do so without people needing to adjust how they execute the 
Makefile.

For Debian users who have installed and unpacked the 'hostap-source' package, 
use:

  % HOSTAP=/usr/src/modules/hostap-source
  % make HOSTAP=$(HOSTAP)

If you have uncompressed the Host AP project within the IPW2100 directory
then you do not need to provide the HOSTAP parameter to the build system.

If you see any errors during the build process be sure to check the 
Issues section on the http://ipw2100.sf.net website as a patch may be 
available for your specific kernel configuration.  You can now install the 
ipw2100 module:

# HOSTAP=/usr/src/modules/hostap-source
# make HOSTAP=$(HOSTAP) install  <--- You need to run this as root

To build it for a different kernel than the running one, use the KSRC
parameter:

% HOSTAP=/path/to/hostap-driver-0.1.3
% make KSRC=/path/to/kernel HOSTAP=/path/to/hostap-driver-0.1.3 
# make HOSTAP=$(HOSTAP) install   <--- You need to run this as root


Thanks to Peter Johanson for the original Makefile, and several others on the
ipw2100-devel mailing list for helping to enhance it.

If you have previously tried to build the driver internal to the kernel build
system and now wish to use the external method described above, you need to 
remove any trace of IPW2100 from the kernel build system or options configured
there will override the Makefile.  

To do this, remove any lines containing the partial string CONFIG_IPW2100 from 
$KSRC/.config and $KSRC/include/linux/autoconf.h

In addition, you will need to remove the reference to ipw2100 from 
$KSRC/drivers/net/wireless/Makefile.

Now proceed to LOADING THE DRIVER


BUILING IN THE KERNEL SOURCE TREE
-------- ------  -----   ----  ---    ---      --          -        -

To install the driver within the kernel build tree, uncompress the archive and
move it into your kernel build tree:

% KSRC=/usr/src/linux   <--- Change this to point to your kernel tree
% tar xzvf ipw2100-0.43.tgz
% mv ipw2100-0.43 $KSRC/drivers/net/wireless/ipw2100

At this point you need to patch your kernel's build scripts to include the
IPW2100 source directory.  For instructions on doing this, see the
file patches/README.


CONFIGURING THE KERNEL
------------ -----   -----       ----       ---       --         -     

# Configure the kernel
% make menuconfig

# Enable Intel PRO/Wireless 2100 under Network Devices => Wireless
#
# NOTE:  You must have EXPERIMENTAL turned on to see the Intel PRO/Wireless
#        option.  You can set this in Code Maturity Setting Options.
#
# ALSO NOTE:  
#        You only need the av5100 module if you have an Averatec laptop.
#        You only need the pbe5 module if you have a Packard Bell EasyNote E5 
#	 laptop.
#


BUILDING THE MODULE
------------ -----   -----       ----       ---       --         -     

# Build the kernel module

% make modules modules_install

If you built as a module and didn't change any other kernel options, you are 
ready to go.  Proceed to LOADING THE DRIVER


LOADING THE FIRMWARE
------------ -----   -----       ----       ---       --         -     

Before you can load the driver, you need the firmware image.  You can find
instructions for obtaining the firmware by going to 
http://ipw2100.sf.net/firmware.php.

Once you have the firmware, uncompress the archive (it may be a .zip which 
in turn contains a .tgz that you need to uncompress).  You should find a file
named ipw2100-1.0.fw.  

NOTE:  Loading the firmware image will not affect the IPW2100 in any other
operating systems you may boot.  The firmware is loaded onto the hardware every
time the card is initialized--regardless of the operating system.


LOADING FIRMWARE VIA HOTPLUG... (new 0.33)
------- ----    --    -      -        -
As of v0.33, the IPW2100 supports loading of firmware via the Linux firmware 
hotplug capability.  In order to use this, you must enable CONFIG_FW_LOADER in
your kernel configuration.  In 2.6.x this option is enabled via: 

	Device Drivers -> 
		Generic Driver Options -> 
			Hotplug firmware loading support

In 2.4.x, it can be found here:
	Library Routines ->
		Hotplug firmware loading support

In addition, you will need the Linux hotplug scripts dated later than 
2003_10_07 (if you do not have /etc/hotplug/firmware.agent then you need to 
upgrade).  

You will also need to have sysfs mounted.  You can do this by adding an entry
to /etc/fstab similar to this:

none            /sys            sysfs   defaults                0       0

If the directory /sys does not already exist, you will need to create it:

# mkdir /sys

You can then mount the sysfs partition via:

# mount -a

You can obtain the latest hotplug scripts via the following link:

http://sourceforge.net/project/showfiles.php?group_id=17679

Once set up, you can copy ipw2100-1.0.fw into /usr/lib/hotplug/firmware/ (you 
may need to create that directory).  When the driver requests the firmware, 
the hotplug agent will then push the firmware image to it.


LOADING THE LEGACY WAY... 
------- ----    --    -      -        -
If, for some reason, you do not wish to use the hotplug system, IPW2100 still 
provides a direct mechanism for loading the firmware.  To use this, simply 
configure your kernel to use the CONFIG_IPW2100_LEGACY_FW_LOAD option. 

You can then place a copy of ipw2100-1.0.fw into /etc/firmware.  The driver will
then load the firmware directly from the file system.


LOADING THE DRIVER
------------ -----   -----       ----       ---       --         -     

You need to configure the device for your particular distribution.  The steps
below will work on Red Hat, Fedora, and other similar distributions.  

First, create a file in /etc/sysconfig/network-scripts/ called ifcfg-eth1 
(or eth2, etc. as appropriate).  Place the following within it:

DEVICE=eth1
ONBOOT=yes
BOOTPROTO=dhcp
TYPE=Wireless

% modprobe ipw2100
% ifup eth1

If you have DHCP configured on your network, and you have a wireless access
point nearby, you should be up and running.

You can check and see if your interface is up by running 

% ifconfig eth1

To test the connection, you can ping a machine using the wireless interface:

% ping ipw2100.sf.net -I eth1

If you want to use the wireless interface for all traffic, set up the default
gateway to go through it.  I usually perform the following:

# Disable eth0 completely
% ifdown eth0

# Configure the routing table to go through the wireless NIC
% route add default gw 192.168.1.1 eth1

If you had brought down eth0 before you load the ipw2100 module, the system
should set up your routes for you.

