summaryrefslogtreecommitdiff
path: root/package/mac80211/patches/050-compat_firmware.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-08-01 17:52:07 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-08-01 17:52:07 +0000
commit9f3aea65fcf3410c3c472ea72b94b56aebd4aabe (patch)
tree057ce3f8d1b9a647eb0c9bc00c370653d5bf34da /package/mac80211/patches/050-compat_firmware.patch
parent21dd9478d76fe4fb9fd98208bbfa6aae72642420 (diff)
downloadmtk-20170518-9f3aea65fcf3410c3c472ea72b94b56aebd4aabe.zip
mtk-20170518-9f3aea65fcf3410c3c472ea72b94b56aebd4aabe.tar.gz
mtk-20170518-9f3aea65fcf3410c3c472ea72b94b56aebd4aabe.tar.bz2
mac80211: add missing chunks to the compat_firmware_class change
SVN-Revision: 27864
Diffstat (limited to 'package/mac80211/patches/050-compat_firmware.patch')
-rw-r--r--package/mac80211/patches/050-compat_firmware.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/package/mac80211/patches/050-compat_firmware.patch b/package/mac80211/patches/050-compat_firmware.patch
index 4d96ca9..0fcee76 100644
--- a/package/mac80211/patches/050-compat_firmware.patch
+++ b/package/mac80211/patches/050-compat_firmware.patch
@@ -15,3 +15,63 @@
# Compat kernel compatibility code
compat-$(CONFIG_COMPAT_KERNEL_2_6_14) += compat-2.6.14.o
compat-$(CONFIG_COMPAT_KERNEL_2_6_18) += compat-2.6.18.o
+--- a/compat/compat_firmware_class.c
++++ b/compat/compat_firmware_class.c
+@@ -729,19 +729,16 @@ request_firmware_nowait(
+ return 0;
+ }
+
+-static int __init firmware_class_init(void)
++int __init firmware_class_init(void)
+ {
+ return class_register(&firmware_class);
+ }
+
+-static void __exit firmware_class_exit(void)
++void __exit firmware_class_exit(void)
+ {
+ class_unregister(&firmware_class);
+ }
+
+-fs_initcall(firmware_class_init);
+-module_exit(firmware_class_exit);
+-
+ EXPORT_SYMBOL(release_firmware);
+ EXPORT_SYMBOL(request_firmware);
+ EXPORT_SYMBOL(request_firmware_nowait);
+--- a/compat/main.c
++++ b/compat/main.c
+@@ -32,6 +32,14 @@ module_param(compat_version, charp, 0400
+ MODULE_PARM_DESC(compat_version,
+ "Version of the kernel compat backport work");
+
++#if defined(CONFIG_FW_LOADER) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
++int __init firmware_class_init(void);
++void __exit firmware_class_exit(void);
++#else
++static inline int firmware_class_init(void) {}
++static inline void firmware_class_exit(void) {}
++#endif
++
+ static int __init compat_init(void)
+ {
+ /* pm-qos for kernels <= 2.6.24, this is a no-op on newer kernels */
+@@ -45,15 +53,15 @@ static int __init compat_init(void)
+ COMPAT_BASE_TREE " " COMPAT_BASE_TREE_VERSION
+ "\n");
+
+- return 0;
++ firmware_class_init();
++ return 0;
+ }
+ module_init(compat_init);
+
+ static void __exit compat_exit(void)
+ {
+ compat_pm_qos_power_deinit();
+-
+- return;
++ firmware_class_exit();
+ }
+ module_exit(compat_exit);
+