ath9k: optimize waking tx queues, slightly improves performance under load
[openwrt.git] / package / mac80211 / patches / 050-compat_firmware.patch
1 --- a/compat/Makefile
2 +++ b/compat/Makefile
3 @@ -1,10 +1,13 @@
4 obj-m += compat.o
5 #compat-objs :=
6
7 -obj-$(CONFIG_COMPAT_FIRMWARE_CLASS) += compat_firmware_class.o
8
9 compat-y += main.o
10
11 +ifdef CONFIG_COMPAT_FIRMWARE_CLASS
12 + compat-y += compat_firmware_class.o
13 +endif
14 +
15 # Compat kernel compatibility code
16 compat-$(CONFIG_COMPAT_KERNEL_2_6_14) += compat-2.6.14.o
17 compat-$(CONFIG_COMPAT_KERNEL_2_6_18) += compat-2.6.18.o
18 --- a/compat/compat_firmware_class.c
19 +++ b/compat/compat_firmware_class.c
20 @@ -741,19 +741,16 @@ request_firmware_nowait(
21 return 0;
22 }
23
24 -static int __init firmware_class_init(void)
25 +int __init firmware_class_init(void)
26 {
27 return class_register(&firmware_class);
28 }
29
30 -static void __exit firmware_class_exit(void)
31 +void __exit firmware_class_exit(void)
32 {
33 class_unregister(&firmware_class);
34 }
35
36 -fs_initcall(firmware_class_init);
37 -module_exit(firmware_class_exit);
38 -
39 EXPORT_SYMBOL(release_firmware);
40 EXPORT_SYMBOL(request_firmware);
41 EXPORT_SYMBOL(request_firmware_nowait);
42 --- a/compat/main.c
43 +++ b/compat/main.c
44 @@ -32,6 +32,17 @@ module_param(compat_version, charp, 0400
45 MODULE_PARM_DESC(compat_version,
46 "Version of the kernel compat backport work");
47
48 +#if defined(CONFIG_FW_LOADER) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
49 +int __init firmware_class_init(void);
50 +void __exit firmware_class_exit(void);
51 +#else
52 +static inline int firmware_class_init(void)
53 +{
54 + return 0;
55 +}
56 +static inline void firmware_class_exit(void) {}
57 +#endif
58 +
59 static int __init compat_init(void)
60 {
61 /* pm-qos for kernels <= 2.6.24, this is a no-op on newer kernels */
62 @@ -46,7 +57,8 @@ static int __init compat_init(void)
63 COMPAT_BASE_TREE " " COMPAT_BASE_TREE_VERSION
64 "\n");
65
66 - return 0;
67 + firmware_class_init();
68 + return 0;
69 }
70 module_init(compat_init);
71
72 @@ -55,7 +67,8 @@ static void __exit compat_exit(void)
73 compat_pm_qos_power_deinit();
74 compat_system_workqueue_destroy();
75
76 - return;
77 + firmware_class_exit();
78 + return;
79 }
80 module_exit(compat_exit);
81
This page took 0.070248 seconds and 5 git commands to generate.