~ubuntu-branches/ubuntu/hardy/linux-backports-modules-2.6.24/hardy-security

« back to all changes in this revision

Viewing changes to updates/wireless/iwlwifi/mac80211/stubs/README

  • Committer: Bazaar Package Importer
  • Author(s): , Ben Collins
  • Date: 2008-04-02 06:59:04 UTC
  • Revision ID: james.westby@ubuntu.com-20080402065904-e5knh2gn2hms3xbb
Tags: 2.6.24-14.11
[Ben Collins]

* iwlwifi: Update to iwlwifi-1.2.25 and mac80211-10.0.4
  - LP: #200950
* ubuntu: Slight cleanups to module hiearchy and Makefiles
* mac80211: Enable LED triggers
* iwlwifi: Add LED trigger support (rx and tx only)
  - LP: #176090

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
cat << EOF
 
2
README for external mac80211 subsystem package
 
3
Copyright (c) 2007, Intel Corporation
 
4
 
 
5
version: mac80211-${MAC80211_VERSION}
 
6
date   : $(date)
 
7
 
 
8
 
 
9
This archive provides a package for the mac80211 subsystem, 
 
10
installable into most kernels with a version of 2.6.18 or
 
11
later.  You can determine your kernel version by running:
 
12
 
 
13
        % uname -r
 
14
 
 
15
 
 
16
NOTE:  The mac80211 subsystem is being developed by a group of
 
17
community developers.  Intel put together this packaging system
 
18
in order to better facilitate the widespread availability and
 
19
adoption of the subsystem.
 
20
 
 
21
This file provides an overview of why the mac80211 package exists,
 
22
what it does, and how it does it.
 
23
 
 
24
Index
 
25
        Quick steps
 
26
        Why?
 
27
        What?
 
28
        How?
 
29
        What is in a release?
 
30
        Makefile targets
 
31
        Updating compatiblity
 
32
        Version numbering
 
33
 
 
34
Quick steps
 
35
 
 
36
If you're a user that just wants to try and get up and running
 
37
as quickly as possible, here are the simplest steps we have so
 
38
far:
 
39
 
 
40
        % make patch_kernel
 
41
 
 
42
The above, if it succeeds, should patch your current running 
 
43
kernel source tree to contain the mac80211 subsystem sources.  Now
 
44
you need to configure your kernel build to build the mac80211
 
45
modules:
 
46
 
 
47
        % cd /lib/modules/\$(uname -r)/build
 
48
        % make menuconfig
 
49
 
 
50
You will want to set the following to <M>:
 
51
 
 
52
CONFIG_MAC80211=m
 
53
 
 
54
        Networking --->
 
55
           Generic IEEE 802.11 Networking Stack (dscape)
 
56
 
 
57
You can turn on the sub-options for that subsystem if you want.
 
58
 
 
59
Select 'Exit' until it prompts to save your kernel configuration
 
60
and select 'Yes'.  Now you can build the module:
 
61
 
 
62
        % make modules
 
63
        % make modules_install
 
64
 
 
65
NOTE:  As of mac80211-2.0.0 you must also enable CONFIG_CFG80211 and 
 
66
rebuild your main kernel image.  This is because the latest mac80211 
 
67
changes re-implement the kernel built-in from net/core/wireless.c as 
 
68
part of the net/wireless/ sources.
 
69
 
 
70
        % make all
 
71
        % make install
 
72
 
 
73
You will then need to reboot into the new kernel (vs. just loading the 
 
74
new 80211 modules)
 
75
 
 
76
 
 
77
Why?
 
78
 
 
79
The network community for the Linux kernel typically has an 
 
80
approach of focusing purely on the 'tip'.  To the average 
 
81
user that means that bug fixes, patches, and enhancements will
 
82
only be available to you if you can upgrade to the latest
 
83
development kernel.  For some, this is acceptable.  For others,
 
84
it is not.
 
85
 
 
86
This package is created in order to try and provide the user (you)
 
87
with fixes and enhancements that affect *just* the wireless 
 
88
subsystem required for use with your hardware.  
 
89
 
 
90
As with any software, new changes may introduce new bugs.  
 
91
Upgrading from one version of the mac80211 subsystem to the 
 
92
next might regress a problem, or even introduce a new one -- 
 
93
if it does, and you find it, please file a bug at 
 
94
http://bughost.org under the project 'mac80211'.
 
95
 
 
96
 
 
97
What?
 
98
 
 
99
So what does this package contain?  It represents the latest
 
100
version of the mac80211 as available via the GIT repository 
 
101
hosted at:
 
102
 
 
103
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-dev.git
 
104
 
 
105
In addition to the above, any patches submitted by the mac80211 subsystem 
 
106
developers which are deemed to be bug fixes or improve existing 
 
107
functionality which have not been made available in the GIT repository.
 
108
 
 
109
When you run make on your system, the build scripts will examine your 
 
110
target kernel to determine which backward compatibility changes are 
 
111
required to compile on your system.  A side effect of the mac80211 
 
112
developers using the latest kernel tip as their baseline is that the 
 
113
subsystem itself emerges to use whichever new features or APIs may have 
 
114
been made available in the rest of the kernel.  This will typically 
 
115
break building and running on kernels released prior to those changes.  
 
116
The build system for this package attempts to correct that behavior.
 
117
 
 
118
 
 
119
How?
 
120
 
 
121
When you run the build, it runs a series of scripts against the 
 
122
target kernel. The target is specified via KSRC=/patch/to/kernel.
 
123
If no KSRC is provided, it will default to looking in:
 
124
 
 
125
        /lib/modules/\$(uname -r)/build
 
126
 
 
127
Each of the scripts attempts to determine if a given set of
 
128
kernel functionality is present.  In the good old days, a module
 
129
could do something simple like:
 
130
 
 
131
        #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
 
132
        /* some code */
 
133
        #else
 
134
        /* some other code */
 
135
        #endif
 
136
 
 
137
Over the last few years, however, this approach has broken due
 
138
to a number of reasons.  The two most prominent causes are:
 
139
 
 
140
        * Kernel API and structure changes occurring within
 
141
          an -rc update (which can not be checked with the 
 
142
          KERNEL_VERSION macro)
 
143
 
 
144
        * Distributions backporting new kernel features into
 
145
          older kernels such that the older vanilla kernel 
 
146
          (as originally provided by Linus) does not have the
 
147
          feature but the distributor does.
 
148
 
 
149
An example of what a script might do is perform a grep operation
 
150
on a particular header file to determine if the parameters
 
151
passed to a function have changed, or if a particular definition
 
152
exists.
 
153
 
 
154
 
 
155
What is in a release?
 
156
 
 
157
The details of how a typical release cycle is as follows:
 
158
 
 
159
1.  Latest files are obtained from Jiri's GIT
 
160
    repository into a local GIT tree (eg., /repos/jbenc)
 
161
 
 
162
2.  mac80211 subsystem files are copied from the GIT tree into
 
163
    the 'origin' directory via:
 
164
 
 
165
        % make BASE=/repos/jbenc origin
 
166
 
 
167
3.  The patches in the 'pending' directory are applied to the
 
168
    'origin' in numerical sequence to build a new tree stored
 
169
    in the 'modified' directory.
 
170
 
 
171
4.  Miscellaneous testing is performed (build iwlwifi, associate, 
 
172
    etc.)
 
173
 
 
174
5.  The files in 'stubs' are sourced with the following 
 
175
    environment variables defined:
 
176
        MAC80211_VERSION=versionstring
 
177
    with the output of that sourcing going into the base
 
178
    directory as a file with the same name (eg., stubs/README
 
179
    creates README).  This is used to update the documentation
 
180
    to contain the latest version fields.
 
181
 
 
182
6.  The package is tarballed up with a version stamp named:
 
183
        mac80211-\${MAC80211_VERSION}.tgz
 
184
 
 
185
7*. A test system performs a tinderbox build of the package 
 
186
    against:
 
187
        * Linus' vanilla kernels > 2.6.18
 
188
        * Latest kernel sources version available as a 'stable' 
 
189
          package from the following distributions (alphabetical):
 
190
 
 
191
                Fedora Core
 
192
                Gentoo
 
193
                OpenSuse
 
194
                Ubuntu
 
195
 
 
196
  * This is not yet done.  Currently I have to do the smoke test
 
197
    build by hand, which means I'm only building against the latest
 
198
    Gentoo kernel and a couple other random kernel images I have on
 
199
    my system.
 
200
 
 
201
 
 
202
Makefile targets
 
203
 
 
204
The build supports multiple targets depending on what you 
 
205
are trying to do.  This section provides an overview of each
 
206
of those targets.
 
207
 
 
208
clean
 
209
        Removes *.ko, *.o, and *.mod.c from the tree.  This
 
210
        also deletes the compat directory (built with the 
 
211
        source target)
 
212
 
 
213
        See Makefile
 
214
 
 
215
 
 
216
origin
 
217
        Updates the tip sources.  Specify the source repository
 
218
        via BASE= on the make command line.  
 
219
 
 
220
        NOTE:  The script will not perform any GIT fetching 
 
221
        from the Internet and will only copy the mac80211 related 
 
222
        files from the directory specified.  If you want to 
 
223
        update to the latest GIT version you would need to 
 
224
        first obtain Jiri Benc's GIT repository and then direct
 
225
        the make to that directory via BASE.  By default,
 
226
        the script will look in /home/repos/mac80211/
 
227
 
 
228
        Once the tip files are copied, the patches in 'pending'
 
229
        are applied in sequential order.
 
230
 
 
231
        See scripts/generate_origin
 
232
 
 
233
 
 
234
modified
 
235
        Creates a modified 'tip' applying all of the patches
 
236
        from the 'pending' directory.
 
237
 
 
238
        See scripts/generate_modified
 
239
 
 
240
 
 
241
source
 
242
        Examines if the target kernel can be used without
 
243
        any changes to the modified mac80211 sources provided in the
 
244
        tip directory and creates a compatible version of the
 
245
        sources from 'modified' in the 'compatitble' directory.
 
246
 
 
247
        See scripts/generate_source
 
248
 
 
249
 
 
250
unmodified
 
251
        Examines if the target kernel can be used without
 
252
        any changes to the modified mac80211 sources provided in the
 
253
        tip directory and creates a compatible version of the
 
254
        sources from 'origin' in the 'compatitble' directory.
 
255
 
 
256
        You would typically use this if you want a "pure" version
 
257
        of mac80211 compatible with your kernel.
 
258
 
 
259
        See scripts/generate_source
 
260
 
 
261
 
 
262
patch_kernel
 
263
        Transfers the generated or tip sources into the target
 
264
        kernel.  This will also patch the required kernel
 
265
        build files (Makefile, Kconfig, etc.) as needed in order
 
266
        to add the mac80211 subsystem to the build.
 
267
 
 
268
        See scripts/patch_kernel
 
269
 
 
270
 
 
271
dist
 
272
        Builds a distribution tarball and places it in the
 
273
        distros directory.  The filename for the tarball is
 
274
        mac80211-\${MAC80211_VERSION}.tgz.
 
275
        
 
276
        NOTE:  MAC80211_VERSION defaults to 'test'.
 
277
 
 
278
        See Makefile
 
279
 
 
280
Updating compatibility
 
281
 
 
282
Ok -- you're developing, or you just moved to a new kernel and
 
283
*WHAM* the kernel build breaks.  Once the root cause of the
 
284
build failure is determined, a patch is required in order
 
285
to support making that kernel 'just work' for everyone else.
 
286
 
 
287
The following are the typical steps performed:
 
288
 
 
289
        % make source
 
290
        % mv compatible old
 
291
        % make source
 
292
        
 
293
Now, edit the sources in the compatible/ directory.  You can test
 
294
your sources by running:
 
295
 
 
296
        % make patch_kernel
 
297
        % cd /lib/modules/\$(uname -r)/build
 
298
        % make menuconfig <-- If you haven't already enabled mac80211
 
299
        % make modules 
 
300
 
 
301
Once you are satisfied the build problems are fixed, create 
 
302
the patch:
 
303
 
 
304
        % diff -Nupr old compatible > compatible-\$(uname -r).patch
 
305
 
 
306
The work to this point is a huge help to others in the community
 
307
so go ahead and send the patch to the mac80211-devel mailing list.
 
308
 
 
309
If you want to figure out how to modify the mac80211 package so
 
310
that it will automatically apply your patch if needed, look
 
311
in the following scripts:
 
312
 
 
313
        scripts/determine_compat
 
314
        scripts/generate_compatible
 
315
 
 
316
 
 
317
Version numbering
 
318
 
 
319
The mac80211 package uses a three field versioning scheme:
 
320
 
 
321
        mac80211-x.y.z.tgz
 
322
 
 
323
X will increase whenever a new base/tip is taken from the kernel.
 
324
You can see tip/GIT for the commit ID head cached when the
 
325
'make update' target was used.
 
326
 
 
327
Y will increase as snapshots are made available in the external
 
328
package that may contain code which has not yet been merged into
 
329
the kernel itself.
 
330
 
 
331
Z will increase only as bug or compatibility patches are made
 
332
available against a given snapshot.  Z increases will not contain
 
333
new functionality and are intended to only provide stability
 
334
fixes.
 
335
 
 
336
EOF
 
337
 
 
338