madwifi: remove my maintainer line from the package
[openwrt.git] / package / madwifi / patches / 459-2.6.33_compile.patch
1 --- a/kernelversion.c
2 +++ b/kernelversion.c
3 @@ -10,7 +10,11 @@
4
5 /* Linux 2.6.18+ uses <linux/utsrelease.h> */
6 #ifndef UTS_RELEASE
7 -#include <linux/utsrelease.h>
8 + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
9 + #include <generated/utsrelease.h>
10 + #else
11 + #include <linux/utsrelease.h>
12 + #endif
13 #endif
14
15 char *uts_release = UTS_RELEASE;
16 --- a/ath/if_ath.c
17 +++ b/ath/if_ath.c
18 @@ -11580,227 +11580,231 @@ static int mincalibrate = 1; /* once a
19 static int maxint = 0x7fffffff; /* 32-bit big */
20
21 static const ctl_table ath_sysctl_template[] = {
22 - { .ctl_name = CTL_AUTO,
23 + { CTLNAME(CTL_AUTO)
24 .procname = "dev_vendor",
25 .mode = 0644,
26 .proc_handler = ath_sysctl_hwinfo,
27 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
28 .strategy = &sysctl_string,
29 +#endif
30 .data = "N/A",
31 .maxlen = 1,
32 .extra2 = (void *)ATH_CARD_VENDOR,
33 },
34 - { .ctl_name = CTL_AUTO,
35 + { CTLNAME(CTL_AUTO)
36 .procname = "dev_name",
37 .mode = 0644,
38 .proc_handler = ath_sysctl_hwinfo,
39 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
40 .strategy = &sysctl_string,
41 +#endif
42 .data = "N/A",
43 .maxlen = 1,
44 .extra2 = (void *)ATH_CARD_NAME,
45 },
46 - { .ctl_name = CTL_AUTO,
47 + { CTLNAME(CTL_AUTO)
48 .procname = "slottime",
49 .mode = 0644,
50 .proc_handler = ath_sysctl_halparam,
51 .extra2 = (void *)ATH_SLOTTIME,
52 },
53 - { .ctl_name = CTL_AUTO,
54 + { CTLNAME(CTL_AUTO)
55 .procname = "acktimeout",
56 .mode = 0644,
57 .proc_handler = ath_sysctl_halparam,
58 .extra2 = (void *)ATH_ACKTIMEOUT,
59 },
60 - { .ctl_name = CTL_AUTO,
61 + { CTLNAME(CTL_AUTO)
62 .procname = "ctstimeout",
63 .mode = 0644,
64 .proc_handler = ath_sysctl_halparam,
65 .extra2 = (void *)ATH_CTSTIMEOUT,
66 },
67 - { .ctl_name = CTL_AUTO,
68 + { CTLNAME(CTL_AUTO)
69 .procname = "distance",
70 .mode = 0644,
71 .proc_handler = ath_sysctl_halparam,
72 .extra2 = (void *)ATH_DISTANCE,
73 },
74 - { .ctl_name = CTL_AUTO,
75 + { CTLNAME(CTL_AUTO)
76 .procname = "silent",
77 .mode = 0644,
78 .proc_handler = ath_sysctl_halparam,
79 .extra2 = (void *)ATH_SILENT,
80 },
81 - { .ctl_name = CTL_AUTO,
82 + { CTLNAME(CTL_AUTO)
83 .procname = "softled",
84 .mode = 0644,
85 .proc_handler = ath_sysctl_halparam,
86 .extra2 = (void *)ATH_SOFTLED,
87 },
88 - { .ctl_name = CTL_AUTO,
89 + { CTLNAME(CTL_AUTO)
90 .procname = "ledpin",
91 .mode = 0644,
92 .proc_handler = ath_sysctl_halparam,
93 .extra2 = (void *)ATH_LEDPIN,
94 },
95 - { .ctl_name = CTL_AUTO,
96 + { CTLNAME(CTL_AUTO)
97 .procname = "countrycode",
98 .mode = 0644,
99 .proc_handler = ath_sysctl_halparam,
100 .extra2 = (void *)ATH_COUNTRYCODE,
101 },
102 - { .ctl_name = CTL_AUTO,
103 + { CTLNAME(CTL_AUTO)
104 .procname = "outdoor",
105 .mode = 0644,
106 .proc_handler = ath_sysctl_halparam,
107 .extra2 = (void *)ATH_OUTDOOR,
108 },
109 - { .ctl_name = CTL_AUTO,
110 + { CTLNAME(CTL_AUTO)
111 .procname = "regdomain",
112 .mode = 0644,
113 .proc_handler = ath_sysctl_halparam,
114 .extra2 = (void *)ATH_REGDOMAIN,
115 },
116 #ifdef AR_DEBUG
117 - { .ctl_name = CTL_AUTO,
118 + { CTLNAME(CTL_AUTO)
119 .procname = "debug",
120 .mode = 0644,
121 .proc_handler = ath_sysctl_halparam,
122 .extra2 = (void *)ATH_DEBUG,
123 },
124 #endif
125 - { .ctl_name = CTL_AUTO,
126 + { CTLNAME(CTL_AUTO)
127 .procname = "poweroffset",
128 .mode = 0644,
129 .proc_handler = ath_sysctl_halparam,
130 .extra2 = (void *)ATH_POWEROFFSET,
131 },
132 - { .ctl_name = CTL_AUTO,
133 + { CTLNAME(CTL_AUTO)
134 .procname = "txantenna",
135 .mode = 0644,
136 .proc_handler = ath_sysctl_halparam,
137 .extra2 = (void *)ATH_TXANTENNA,
138 },
139 - { .ctl_name = CTL_AUTO,
140 + { CTLNAME(CTL_AUTO)
141 .procname = "rxantenna",
142 .mode = 0644,
143 .proc_handler = ath_sysctl_halparam,
144 .extra2 = (void *)ATH_RXANTENNA,
145 },
146 - { .ctl_name = CTL_AUTO,
147 + { CTLNAME(CTL_AUTO)
148 .procname = "diversity",
149 .mode = 0644,
150 .proc_handler = ath_sysctl_halparam,
151 .extra2 = (void *)ATH_DIVERSITY,
152 },
153 - { .ctl_name = CTL_AUTO,
154 + { CTLNAME(CTL_AUTO)
155 .procname = "txintrperiod",
156 .mode = 0644,
157 .proc_handler = ath_sysctl_halparam,
158 .extra2 = (void *)ATH_TXINTRPERIOD,
159 },
160 - { .ctl_name = CTL_AUTO,
161 + { CTLNAME(CTL_AUTO)
162 .procname = "fftxqmin",
163 .mode = 0644,
164 .proc_handler = ath_sysctl_halparam,
165 .extra2 = (void *)ATH_FFTXQMIN,
166 },
167 #ifdef ATH_SUPERG_XR
168 - { .ctl_name = CTL_AUTO,
169 + { CTLNAME(CTL_AUTO)
170 .procname = "xrpollperiod",
171 .mode = 0644,
172 .proc_handler = ath_sysctl_halparam,
173 .extra2 = (void *)ATH_XR_POLL_PERIOD,
174 },
175 - { .ctl_name = CTL_AUTO,
176 + { CTLNAME(CTL_AUTO)
177 .procname = "xrpollcount",
178 .mode = 0644,
179 .proc_handler = ath_sysctl_halparam,
180 .extra2 = (void *)ATH_XR_POLL_COUNT,
181 },
182 #endif
183 - { .ctl_name = CTL_AUTO,
184 + { CTLNAME(CTL_AUTO)
185 .procname = "ackrate",
186 .mode = 0644,
187 .proc_handler = ath_sysctl_halparam,
188 .extra2 = (void *)ATH_ACKRATE,
189 },
190 - { .ctl_name = CTL_AUTO,
191 + { CTLNAME(CTL_AUTO)
192 .procname = "channelbw",
193 .mode = 0644,
194 .proc_handler = ath_sysctl_halparam,
195 .extra2 = (void *)ATH_CHANBW,
196 },
197 - { .ctl_name = CTL_AUTO,
198 + { CTLNAME(CTL_AUTO)
199 .procname = "rp",
200 .mode = 0200,
201 .proc_handler = ath_sysctl_halparam,
202 .extra2 = (void *)ATH_RP,
203 },
204 - { .ctl_name = CTL_AUTO,
205 + { CTLNAME(CTL_AUTO)
206 .procname = "radar_print",
207 .mode = 0200,
208 .proc_handler = ath_sysctl_halparam,
209 .extra2 = (void *)ATH_RP_PRINT,
210 },
211 - { .ctl_name = CTL_AUTO,
212 + { CTLNAME(CTL_AUTO)
213 .procname = "radar_print_all",
214 .mode = 0200,
215 .proc_handler = ath_sysctl_halparam,
216 .extra2 = (void *)ATH_RP_PRINT_ALL,
217 },
218 - { .ctl_name = CTL_AUTO,
219 + { CTLNAME(CTL_AUTO)
220 .procname = "radar_dump",
221 .mode = 0200,
222 .proc_handler = ath_sysctl_halparam,
223 .extra2 = (void *)ATH_RP_PRINT_MEM,
224 },
225 - { .ctl_name = CTL_AUTO,
226 + { CTLNAME(CTL_AUTO)
227 .procname = "radar_dump_all",
228 .mode = 0200,
229 .proc_handler = ath_sysctl_halparam,
230 .extra2 = (void *)ATH_RP_PRINT_MEM_ALL,
231 },
232 - { .ctl_name = CTL_AUTO,
233 + { CTLNAME(CTL_AUTO)
234 .procname = "rp_flush",
235 .mode = 0200,
236 .proc_handler = ath_sysctl_halparam,
237 .extra2 = (void *)ATH_RP_FLUSH,
238 },
239 - { .ctl_name = CTL_AUTO,
240 + { CTLNAME(CTL_AUTO)
241 .procname = "panic",
242 .mode = 0200,
243 .proc_handler = ath_sysctl_halparam,
244 .extra2 = (void *)ATH_PANIC,
245 },
246 - { .ctl_name = CTL_AUTO,
247 + { CTLNAME(CTL_AUTO)
248 .procname = "rp_ignored",
249 .mode = 0644,
250 .proc_handler = ath_sysctl_halparam,
251 .extra2 = (void *)ATH_RP_IGNORED,
252 },
253 - { .ctl_name = CTL_AUTO,
254 + { CTLNAME(CTL_AUTO)
255 .procname = "radar_ignored",
256 .mode = 0644,
257 .proc_handler = ath_sysctl_halparam,
258 .extra2 = (void *)ATH_RADAR_IGNORED,
259 },
260 - { .ctl_name = CTL_AUTO,
261 + { CTLNAME(CTL_AUTO)
262 .procname = "intmit",
263 .mode = 0644,
264 .proc_handler = ath_sysctl_halparam,
265 .extra2 = (void *)ATH_INTMIT,
266 },
267 - { .ctl_name = CTL_AUTO,
268 + { CTLNAME(CTL_AUTO)
269 .procname = "noise_immunity",
270 .mode = 0644,
271 .proc_handler = ath_sysctl_halparam,
272 .extra2 = (void *)ATH_NOISE_IMMUNITY,
273 },
274 - { .ctl_name = CTL_AUTO,
275 + { CTLNAME(CTL_AUTO)
276 .procname = "ofdm_weak_det",
277 .mode = 0644,
278 .proc_handler = ath_sysctl_halparam,
279 .extra2 = (void *)ATH_OFDM_WEAK_DET,
280 },
281 - { .ctl_name = CTL_AUTO,
282 + { CTLNAME(CTL_AUTO)
283 .procname = "cca_thresh",
284 .mode = 0644,
285 .proc_handler = ath_sysctl_halparam,
286 @@ -11838,12 +11842,16 @@ ath_dynamic_sysctl_register(struct ath_s
287
288 /* setup the table */
289 memset(sc->sc_sysctls, 0, space);
290 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
291 sc->sc_sysctls[0].ctl_name = CTL_DEV;
292 +#endif
293 sc->sc_sysctls[0].procname = "dev";
294 sc->sc_sysctls[0].mode = 0555;
295 sc->sc_sysctls[0].child = &sc->sc_sysctls[2];
296 /* [1] is NULL terminator */
297 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
298 sc->sc_sysctls[2].ctl_name = CTL_AUTO;
299 +#endif
300 sc->sc_sysctls[2].procname = dev_name;
301 sc->sc_sysctls[2].mode = 0555;
302 sc->sc_sysctls[2].child = &sc->sc_sysctls[4];
303 @@ -11966,7 +11974,7 @@ ath_announce(struct net_device *dev)
304 */
305 static ctl_table ath_static_sysctls[] = {
306 #ifdef AR_DEBUG
307 - { .ctl_name = CTL_AUTO,
308 + { CTLNAME(CTL_AUTO)
309 .procname = "debug",
310 .mode = 0644,
311 .data = &ath_debug,
312 @@ -11974,14 +11982,14 @@ static ctl_table ath_static_sysctls[] =
313 .proc_handler = proc_dointvec
314 },
315 #endif
316 - { .ctl_name = CTL_AUTO,
317 + { CTLNAME(CTL_AUTO)
318 .procname = "xchanmode",
319 .mode = 0444,
320 .data = &ath_xchanmode,
321 .maxlen = sizeof(ath_xchanmode),
322 .proc_handler = proc_dointvec
323 },
324 - { .ctl_name = CTL_AUTO,
325 + { CTLNAME(CTL_AUTO)
326 .procname = "calibrate",
327 .mode = 0644,
328 .data = &ath_calinterval,
329 @@ -11993,14 +12001,14 @@ static ctl_table ath_static_sysctls[] =
330 { 0 }
331 };
332 static ctl_table ath_ath_table[] = {
333 - { .ctl_name = DEV_ATH,
334 + { CTLNAME(DEV_ATH)
335 .procname = "ath",
336 .mode = 0555,
337 .child = ath_static_sysctls
338 }, { 0 }
339 };
340 static ctl_table ath_root_table[] = {
341 - { .ctl_name = CTL_DEV,
342 + { CTLNAME(CTL_DEV)
343 .procname = "dev",
344 .mode = 0555,
345 .child = ath_ath_table
346 --- a/ath/if_ath_ahb.h
347 +++ b/ath/if_ath_ahb.h
348 @@ -112,7 +112,11 @@
349 do { (void) (start); (void) (size); } while (0)
350 #endif
351
352 +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9)
353 +#define bus_dma_sync_single dma_sync_single_for_cpu
354 +#else
355 #define bus_dma_sync_single dma_sync_single
356 +#endif
357 #define bus_map_single dma_map_single
358 #define bus_unmap_single dma_unmap_single
359 #define bus_alloc_consistent(_hwdev, _sz, _hdma) \
360 --- a/ath_hal/ah_os.c
361 +++ b/ath_hal/ah_os.c
362 @@ -518,7 +518,7 @@ EXPORT_SYMBOL(ath_hal_memcmp);
363
364 static ctl_table ath_hal_sysctls[] = {
365 #ifdef AH_DEBUG
366 - { .ctl_name = CTL_AUTO,
367 + { CTLNAME(CTL_AUTO)
368 .procname = "debug",
369 .mode = 0644,
370 .data = &ath_hal_debug,
371 @@ -526,21 +526,21 @@ static ctl_table ath_hal_sysctls[] = {
372 .proc_handler = proc_dointvec
373 },
374 #endif
375 - { .ctl_name = CTL_AUTO,
376 + { CTLNAME(CTL_AUTO)
377 .procname = "dma_beacon_response_time",
378 .data = &ath_hal_dma_beacon_response_time,
379 .maxlen = sizeof(ath_hal_dma_beacon_response_time),
380 .mode = 0644,
381 .proc_handler = proc_dointvec
382 },
383 - { .ctl_name = CTL_AUTO,
384 + { CTLNAME(CTL_AUTO)
385 .procname = "sw_beacon_response_time",
386 .mode = 0644,
387 .data = &ath_hal_sw_beacon_response_time,
388 .maxlen = sizeof(ath_hal_sw_beacon_response_time),
389 .proc_handler = proc_dointvec
390 },
391 - { .ctl_name = CTL_AUTO,
392 + { CTLNAME(CTL_AUTO)
393 .procname = "swba_backoff",
394 .mode = 0644,
395 .data = &ath_hal_additional_swba_backoff,
396 @@ -548,19 +548,19 @@ static ctl_table ath_hal_sysctls[] = {
397 .proc_handler = proc_dointvec
398 },
399 #ifdef AH_DEBUG_ALQ
400 - { .ctl_name = CTL_AUTO,
401 + { CTLNAME(CTL_AUTO)
402 .procname = "alq",
403 .mode = 0644,
404 .proc_handler = sysctl_hw_ath_hal_log
405 },
406 - { .ctl_name = CTL_AUTO,
407 + { CTLNAME(CTL_AUTO)
408 .procname = "alq_size",
409 .mode = 0644,
410 .data = &ath_hal_alq_qsize,
411 .maxlen = sizeof(ath_hal_alq_qsize),
412 .proc_handler = proc_dointvec
413 },
414 - { .ctl_name = CTL_AUTO,
415 + { CTLNAME(CTL_AUTO)
416 .procname = "alq_lost",
417 .mode = 0644,
418 .data = &ath_hal_alq_lost,
419 @@ -571,21 +571,21 @@ static ctl_table ath_hal_sysctls[] = {
420 { 0 }
421 };
422 static ctl_table ath_hal_table[] = {
423 - { .ctl_name = CTL_AUTO,
424 + { CTLNAME(CTL_AUTO)
425 .procname = "hal",
426 .mode = 0555,
427 .child = ath_hal_sysctls
428 }, { 0 }
429 };
430 static ctl_table ath_ath_table[] = {
431 - { .ctl_name = DEV_ATH,
432 + { CTLNAME(DEV_ATH)
433 .procname = "ath",
434 .mode = 0555,
435 .child = ath_hal_table
436 }, { 0 }
437 };
438 static ctl_table ath_root_table[] = {
439 - { .ctl_name = CTL_DEV,
440 + { CTLNAME(CTL_DEV)
441 .procname = "dev",
442 .mode = 0555,
443 .child = ath_ath_table
444 --- a/include/compat.h
445 +++ b/include/compat.h
446 @@ -193,6 +193,12 @@ static inline int timeval_compare(struct
447 #define __skb_queue_after(_list, _old, _new) __skb_append(_old, _new, _list)
448 #endif
449
450 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
451 +#define CTLNAME(x) .ctl_name = x,
452 +#else
453 +#define CTLNAME(x)
454 +#endif
455 +
456 #endif /* __KERNEL__ */
457
458 #endif /* _ATH_COMPAT_H_ */
459 --- a/net80211/ieee80211_linux.c
460 +++ b/net80211/ieee80211_linux.c
461 @@ -699,39 +699,39 @@ IEEE80211_SYSCTL_DECL(ieee80211_sysctl_m
462
463 static const ctl_table ieee80211_sysctl_template[] = {
464 #ifdef IEEE80211_DEBUG
465 - { .ctl_name = CTL_AUTO,
466 + { CTLNAME(CTL_AUTO)
467 .procname = "debug",
468 .mode = 0644,
469 .proc_handler = ieee80211_sysctl_debug
470 },
471 #endif
472 - { .ctl_name = CTL_AUTO,
473 + { CTLNAME(CTL_AUTO)
474 .procname = "dev_type",
475 .mode = 0644,
476 .proc_handler = ieee80211_sysctl_dev_type
477 },
478 - { .ctl_name = CTL_AUTO,
479 + { CTLNAME(CTL_AUTO)
480 .procname = "monitor_nods_only",
481 .mode = 0644,
482 .proc_handler = ieee80211_sysctl_monitor_nods_only
483 },
484 - { .ctl_name = CTL_AUTO,
485 + { CTLNAME(CTL_AUTO)
486 .procname = "monitor_txf_len",
487 .mode = 0644,
488 .proc_handler = ieee80211_sysctl_monitor_txf_len
489 },
490 - { .ctl_name = CTL_AUTO,
491 + { CTLNAME(CTL_AUTO)
492 .procname = "monitor_phy_errors",
493 .mode = 0644,
494 .proc_handler = ieee80211_sysctl_monitor_phy_errors
495 },
496 - { .ctl_name = CTL_AUTO,
497 + { CTLNAME(CTL_AUTO)
498 .procname = "monitor_crc_errors",
499 .mode = 0644,
500 .proc_handler = ieee80211_sysctl_monitor_crc_errors
501 },
502 /* NB: must be last entry before NULL */
503 - { .ctl_name = CTL_AUTO,
504 + { CTLNAME(CTL_AUTO)
505 .procname = "%parent",
506 .maxlen = IFNAMSIZ,
507 .mode = 0444,
508 @@ -786,12 +786,16 @@ ieee80211_virtfs_latevattach(struct ieee
509
510 /* setup the table */
511 memset(vap->iv_sysctls, 0, space);
512 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
513 vap->iv_sysctls[0].ctl_name = CTL_NET;
514 +#endif
515 vap->iv_sysctls[0].procname = "net";
516 vap->iv_sysctls[0].mode = 0555;
517 vap->iv_sysctls[0].child = &vap->iv_sysctls[2];
518 /* [1] is NULL terminator */
519 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
520 vap->iv_sysctls[2].ctl_name = CTL_AUTO;
521 +#endif
522 vap->iv_sysctls[2].procname = devname; /* XXX bad idea? */
523 vap->iv_sysctls[2].mode = 0555;
524 vap->iv_sysctls[2].child = &vap->iv_sysctls[4];
This page took 0.086344 seconds and 5 git commands to generate.