Fix all instances of unused variables reported by gcc 4.6.0.
[madwifi/.git] / INSTALL
1 MADWIFI: Multimode Atheros Driver for WiFi on Linux
2 ===================================================
3
4 * Copyright (c) 2002-2005 Sam Leffler.  All rights reserved.
5
6 Read the file COPYRIGHT for the complete copyright.
7
8
9 Requirements
10 ------------
11
12 - Configured kernel sources of the target kernel.  Most Linux
13   distributions provide a kernel development package - it should
14   suffice.
15
16 - Wireless Extensions support - option CONFIG_NET_RADIO or
17   CONFIG_WIRELESS_EXT in kernel .config file, whichever is available.
18
19 - Sysctl support - option CONFIG_SYSCTL in kernel .config file.
20
21 - Crypto API support - option CONFIG_CRYPTO in kernel .config file (AES
22   support is used if present, otherwise the AES-CCMP cipher module falls
23   back to a private implementation).
24
25 - gcc of the same version that was used to compile the kernel.  At least
26   make sure that the first two version numbers or the compiler are the
27   same (e.g. it's OK to use gcc 3.4.6 to compile MadWifi if the kernel
28   was compiled by gcc 3.4.2).  Ignoring this rule will cause "Invalid
29   module format" errors during module load.
30
31 Linux 2.4.x kernels starting with 2.4.22 and 2.6 kernels should work
32 without problems.  Due to quick pace of Linux development, there is no
33 way compatibility with the future 2.6 kernels can be ensured.  However,
34 the latest 2.6 kernel at the time of the release should be expected to
35 work.  For AHB support, Linux 2.6.19 or newer is required.
36
37 Automatic module loading support (CONFIG_KMOD) is highly recommended;
38 otherwise, you'll need to load all required modules manually.
39
40
41 Building the driver
42 -------------------
43
44 The driver is built using the Linux kernel build mechanism.  This means
45 you must have some part of the kernel source distribution installed on
46 the machine where you want to build the driver.  In particular, the
47 kernel include files, makefiles, build scripts and configuration must be
48 available.
49
50 This will be present if you built your kernel from source.  Otherwise
51 you may need to install an additional kernel development package from
52 your distribution that would match your kernel.  For example, the
53 development package for the default kernel is called linux-headers on
54 Debian and kernel-devel on Fedora Core.  Installing a package with full
55 kernel sources should not be generally necessary.
56
57 Note: in the following examples "$" stands for your system prompt;
58 you're not expected to type that as part of the actual command.  "#"
59 stands for the command prompt when the commands must be executed by
60 root.
61
62 Most people can just type:
63
64   $ make
65
66 in the top-level MadWifi source directory to build all the modules for
67 the currently running system.
68
69 You MUST do a "make clean" before compiling for a different version of
70 Linux, e.g. building for 2.6 after building for 2.4.
71
72 If you want to compile MadWifi for a different kernel, you need to
73 specify the location of the kernel build tree, e.g.:
74
75   $ make KERNELPATH=/usr/src/linux-2.6.3
76
77 Note that you can also specify this path by setting an environment
78 variable; e.g.
79
80   $ export KERNELPATH=/usr/src/linux-2.6.3
81   $ make
82
83 If the kernel was built outside the source directory, KERNELPATH should
84 point to the output directory where .config is located, not to the
85 sources.
86
87
88 Cross-compiling
89 ---------------
90
91 The build system is designed to support cross-compiling without any
92 modification to the distribution files.  It should be sufficient to
93 specify any parameters on the make command line.
94
95 In most cases, only KERNELPATH, ARCH and CROSS_COMPILE need to be
96 defined.  ARCH is the architecture of the kernel.  CROSS_COMPILE is the
97 prefix for cross-compiling tools.  For instance, if compiling for ARM
98 and the cross compiler is called arm-linux-gcc, set ARCH to "arm" and
99 CROSS_COMPILE to "arm-linux-":
100
101   $ make KERNELPATH=/usr/src/linux-arm ARCH=arm CROSS_COMPILE=arm-linux-
102
103 If the compiler needs additional flags to compile userspace binaries,
104 you can redefine CC to include those flags.
105
106 When installing MadWifi, set DESTDIR to the root of the target
107 filesystem, so that the cross-compiled binaries don't overwrite the
108 native ones.
109
110
111 Loading the modules
112 -------------------
113
114 Building the software will generate numerous loadable modules:
115
116   ath_pci               Atheros driver for PCI/Cardbus devices
117   ath_hal               Atheros HAL
118   wlan                  802.11 support layer
119   wlan_wep              WEP cipher support
120   wlan_tkip             TKIP cipher support
121   wlan_ccmp             AES-CCMP cipher support
122   wlan_xauth            external authenticator
123   wlan_acl              MAC ACL support for AP operation
124   wlan_scan_ap          AP scanning support
125   wlan_scan_sta         station scanning support
126   ath_rate_onoe         ONOE rate control
127   ath_rate_amrr         AMRR rate control
128   ath_rate_sample       SAMPLE rate control
129
130 The ath_pci module must be loaded either manually or by the system, e.g.
131 through the hotplug or card manager support.  The remaining modules are
132 loaded automatically as needed, so after doing a "make install" you only
133 need to run following:
134
135   # modprobe ath_pci
136
137 For automatic module loading you may need to modify your system's
138 configuration files so the necessary modules are loaded when an Atheros
139 device is recognized.  The exact procedure varies from system to system.
140
141 There are module parameters available to fit your needs, e.g. you can
142 set the countrycode manually if your card's EEPROM does not contain the
143 correct one for your location.  See
144 http://www.unicode.org/onlinedat/countries.html to find your code.
145
146 To activate German frequencies you would specify:
147
148   # modprobe ath_pci countrycode=276
149
150 MadWifi currently provides four different rate control algorithms,
151 ONOE, AMRR, SAMPLE and MINSTREL.  SAMPLE and MINSTREL are both very
152 advanced, but MINSTREL is quite new.  Consequently, SAMPLE is used by
153 default.  In order to make MadWifi use e.g. AMRR instead, you have to
154 specify that as the module parameter e.g.
155
156   # modprobe ath_pci ratectl=amrr
157
158 NOTE: Changing the rate control is only required (and recommended) for
159       users who want to setup an access point using MadWifi in difficult
160       (e.g. lossy) environments and who know what they are doing.
161
162 To see all available module parameters type:
163
164   $ modinfo ath_pci
165
166
167 Integrating into the kernel sources
168 -----------------------------------
169
170 It is also possible to patch Linux kernel sources to integrate MadWifi
171 directly into the kernel tree.  This allows building MadWifi as part of
172 the kernel.  This could be useful for embedded systems that don't
173 support loadable modules.  Please refer to patch-kernel/README for
174 details.
175
176
177 Further information
178 -------------------
179
180 Further information on how to work with the driver can be found in the
181 file README.  In addition, the project's wiki has a lot of valuable
182 information:
183
184 http://madwifi-project.org/