Installation and configuration instructions for the rt2x00 Modules

===============================================================================
Minimal requirements:
====================

 - Kernel
	# Only kernel 2.6.13 or higher containing Wireless Extensions V18
	# or higher are supported.
	# Make sure your kernel sources match your running kernel.
	# When using kernel sources installed from a rpm from your distro,
	# it might be required to configure your kernel sources, this can be
	# done by doing (as root):
	# $ cd /usr/src/linux
	# $ make cloneconfig
	# $ make prepare

 - ieee80211 stack
	# rt2x00 depends on the ieee80211 stack developed by Devicescape.
	# And is currently maintained by Jiri Benc.
	# The latest ieee80211 stack can be found in the ieee80211/ folder
	# in the rt2x00 module source.

===============================================================================
Build Instructions:
====================

 Before starting the building of the drivers, it is recomended to read the
 config file. In this file several configuration options can be set to
 optimize the build for the user. It is for example possible to enable or
 disable the build of the rt2x00 drivers seperately.
 To build rt2x00 simply do:

 	# $ make

 All modules (.ko files) will be created in the current directory.

===============================================================================
Module installation:
====================

 The modules can be installed by doing:

	 # $ make install

 This will create a new folder named 'rt2x00' inside the kernel modules
 directory usually /lib/modules/$(uname -r)/, all modules
 (including the ieee80211 stack will be installed into that directory.
 Some distributions however do not comply with the kernel guidelines
 which causes the kernel to install the modules into the wrong directory.
 Thus users of the following distributions must manually install the modules:
 - Debian & derivatives (i.e. Ubuntu)
 - Mandriva
 When manually installig the drivers you will have to find out how
 and where these distrobutions wish kernel modules to be installed
 and install all .ko files to the required location.

===============================================================================
Module loading:
====================

 When the modules have been installed, the module handlers (i.e. modprobe)
 will automicly resolve all module dependencies.
 When loading the modules manually with insmod,
 you should load them in the following order:

 - 80211.ko
	# Main ieee80211 stack module.

 - rate_control.ko
	# Add support for improved TX rate control.

 - radiobtn.ko (optional, needed for hardware radio support)
	# Add support for hardware button support.

 - rt2400pci.ko (optional, needed for rt2400 support)
	# rt2400pci module, support RT2460 chipsets on PCI & PCMCIA cards.

 - rt2500pci.ko (optional, needed for rt2500 support)
	# rt2500pci module, support RT2560 chipsets on PCI & PCMCIA cards.

 - rt2500usb.ko (optional, needed for rt2570 support)
	# rt2500usb module, support RT2570 chipsets on USB sticks.

 - rt61pci.ko (optional, needed for rt61 support)
	# rt2500pci module, support rt2561(turbo) and rt2600 chipsets
	# on PCI & PCMCIA cards.

 - rt73usb.ko (optional, needed for rt73 support)
	# rt2500pci module, support RT2573 chipsets on USB sticks.

===============================================================================
Module options:
====================

 - debug={0,1}
	# This 'debug' module option is only available when the modules are
	# build with debug capabilities (Which is the default build option).
	# debug=0 (default) will disable debug output.
	# debug=1 will enable debug output.
	# After the module is loaded this variable can be changed by writing
	# either N (or 0)  to disable or Y (or 1) to enable debug to
	# to the /sys/module/<modulename>/parameters/debug file.
	# Where <modulename> can be rt2400pci, rt2500pci, rt2500usb, rt61pci
	# or rt73usb.

 - poll_delay={in ms}
	# The 'poll_delay' module option is only available when the driver
	# has been build with the hardware button capabilities enabled.
	# The value passed is in ms, and indicates the time between each check
	# for the status of the hardware button.

===============================================================================
Input events:
====================

 - Hardware button
	# When the pci card contains a hardware button for the Wireless device,
	# and the driver has been build with hardware button capabilities
	# enabled, the card will send out events for the input device
	# radiobtn/<modulename> which was created when the radiobtn module
	# was loaded.

===============================================================================
Firmware:
====================

 rt61pci and rt73usb require firmware to be available when loading the module.
 The latest firmware files are available in a seperate .zip archive and can be
 downloaded from the support page on the ralink website at
 http://www.ralinktech.com.
 The following firmware files are available for each driver:

 - rt61pci
	# rt2561.bin
	# rt2561s.bin
	# rt2661.bin

 - rt73usb
	# rt73.bin

 The firmware file needed for the device depends on the RT chip of the device.
 Usually the correct firmware file can also be found on the installation medium
 that was shipped with your device.
 After obtaining the firmware file it should be placed in the firmware folder
 specific for your distribution (Usually /lib/firmware/)

===============================================================================
Devices:
====================

 When unsure about which driver specific module should be used for a particular
 device, the best approach is to grab the Windows drivers for that device
 and check the name. Below follows the list of driver names long with the
 device specific module that should be used for that device.

 - rt2400.inf
	# rt2400pci.ko

 - rt2500.inf
	# rt2500pci.ko

 - rt2570.inf
	# rt2500usb.ko

 - rt61.inf
	# rt61pci.ko

 - rt73.inf
	# rt73usb.ko

===============================================================================
Interfaces:
====================

 After loading the modules 2 interfaces will now be visible in ifconfig and
 iwconfig, namely wmaster0 and wlan0. The first device is the so called master
 device which is can be used by some userspace tools, but can normally be
 ignored by the user self.
 The second interface wlan0 is the client interface which the user can
 configure. With rt2x00 it is possible to run multiple client interfaces with
 only 1 single device. 1 client interface can run in adhoc, managed or master
 mode while a second or more client interface can run in monitor mode
 at the same time. To add more client interfaces the following command
 should be run from the shell:

 	# $ echo -n $NAME > /sys/class/ieee80211/$DEV/add_iface

 where the variable $NAME is the name of the client interface that should be
 added (i.e. wlan1), and $DEV is the physical device where the new client
 interface should be attached to (i.e. phy0).

===============================================================================
Configuration:
====================

 After loading the modules the device should be configured for proper behaviour.
 Before bringing the client interface up, the working mode should be set:

	# $ iwconfig wlan0 mode managed

 Configuration parts like essid and channel can be set before or after the
 client interface has been brought up.
 It is usually a good idea to set the essid:

	# $ iwconfig wlan0 essid myessid

 In some situations the device also requires the channel to be manually set:

	# $ iwconfig wlan0 channel mychannel

 To bring the client interface up:

	# $ ifconfig wlan0 up

 After the client interface has been brought up, scanning can be performed
 to check if the desired AP is being detected.

	# $ iwlist wlan0 scan

 To start an authentication/association attempt, the AP address should be set:

	# $ iwconfig wlan0 ap mybssid

===============================================================================
Ethtool:
====================

 Support for several ethtool functions is supported in rt2x00.
 When using ethtool, the master interface and not the client interface should
 be passed to ethtool.
 The features rt2x00 provide are:

 - ethtool -i
	# Information about the driver.

 - ethtool -d
	# A dump of the devices CSR register is returned.

 - ethtool -e
	# A dump of the devices EEPROM contents is returned.

 - ethtool -s msglvl X
	# This option is only available when the driver was build with debug
	# enabled. Replace X with 1 or 0 to enable or disable respectively
	# the rt2x00 debug output. This is an alternative for setting the
	# module parameter.

===============================================================================
Bug reporting:
====================

 When reporting a bug or problem with the rt2x00 module,
 make sure you report the following information:
	# How to reproduce
	# RT2x00 debug output, usually found in /var/log/messages.
	# Module version.
	# Wireless card chipset, model and manufacturer.
	# Kernel version (i.e. 2.6.13)
	# Hardware architecture (i.e. x86, AMD64, Sparc)
	# Anything else you may think will help us resolve the issue.

===============================================================================
Contact us:
====================

 - Website
	# http://rt2x00.serialmonkey.com/
	# http://rt2x00.serialmonkey.com/wiki/index.php/Rt2x00_beta

 - Forums:
	# http://rt2x00.serialmonkey.com/phpBB2/

 - Mailing list:
	# general: rt2400-general@lists.sourceforge.net
	# developers: rt2400-devel@lists.sourceforge.net

 - Sourceforge:
	# http://sourceforge.net/projects/rt2400
