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