mac80211: fix firmware compat stuff for 2.6.32
[openwrt.git] / package / mac80211 / patches / 100-compat_firmware.patch
1 --- a/include/linux/compat-2.6.32.h
2 +++ b/include/linux/compat-2.6.32.h
3 @@ -9,40 +9,6 @@
4 #include <linux/compat.h>
5 #include <net/iw_handler.h>
6 #include <linux/workqueue.h>
7 -#include <linux/firmware.h>
8 -
9 -#define release_firmware compat_release_firmware
10 -#define request_firmware compat_request_firmware
11 -#define request_firmware_nowait compat_request_firmware_nowait
12 -
13 -#if defined(CONFIG_FW_LOADER) || (defined(CONFIG_FW_LOADER_MODULE) && defined(MODULE))
14 -int compat_request_firmware(const struct firmware **fw, const char *name,
15 - struct device *device);
16 -int compat_request_firmware_nowait(
17 - struct module *module, int uevent,
18 - const char *name, struct device *device, gfp_t gfp, void *context,
19 - void (*cont)(const struct firmware *fw, void *context));
20 -
21 -void compat_release_firmware(const struct firmware *fw);
22 -#else
23 -static inline int compat_request_firmware(const struct firmware **fw,
24 - const char *name,
25 - struct device *device)
26 -{
27 - return -EINVAL;
28 -}
29 -static inline int request_firmware_nowait(
30 - struct module *module, int uevent,
31 - const char *name, struct device *device, gfp_t gfp, void *context,
32 - void (*cont)(const struct firmware *fw, void *context))
33 -{
34 - return -EINVAL;
35 -}
36 -
37 -static inline void compat_release_firmware(const struct firmware *fw)
38 -{
39 -}
40 -#endif
41
42 #define SDIO_VENDOR_ID_INTEL 0x0089
43 #define SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX 0x1402
44 --- a/include/linux/compat-2.6.33.h
45 +++ b/include/linux/compat-2.6.33.h
46 @@ -10,6 +10,40 @@
47 #include <pcmcia/cistpl.h>
48 #include <pcmcia/ds.h>
49 #include <linux/kfifo.h>
50 +#include <linux/firmware.h>
51 +
52 +#define release_firmware compat_release_firmware
53 +#define request_firmware compat_request_firmware
54 +#define request_firmware_nowait compat_request_firmware_nowait
55 +
56 +#if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
57 +int compat_request_firmware(const struct firmware **fw, const char *name,
58 + struct device *device);
59 +int compat_request_firmware_nowait(
60 + struct module *module, int uevent,
61 + const char *name, struct device *device, gfp_t gfp, void *context,
62 + void (*cont)(const struct firmware *fw, void *context));
63 +
64 +void compat_release_firmware(const struct firmware *fw);
65 +#else
66 +static inline int compat_request_firmware(const struct firmware **fw,
67 + const char *name,
68 + struct device *device)
69 +{
70 + return -EINVAL;
71 +}
72 +static inline int request_firmware_nowait(
73 + struct module *module, int uevent,
74 + const char *name, struct device *device, gfp_t gfp, void *context,
75 + void (*cont)(const struct firmware *fw, void *context))
76 +{
77 + return -EINVAL;
78 +}
79 +
80 +static inline void compat_release_firmware(const struct firmware *fw)
81 +{
82 +}
83 +#endif
84
85 #define IFF_DONT_BRIDGE 0x800 /* disallow bridging this ether dev */
86 /* source: include/linux/if.h */
87 --- a/compat/compat_firmware_class.c
88 +++ b/compat/compat_firmware_class.c
89 @@ -20,6 +20,8 @@
90 #include <linux/highmem.h>
91 #include <linux/firmware.h>
92
93 +#if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
94 +
95 #define to_dev(obj) container_of(obj, struct device, kobj)
96
97 MODULE_AUTHOR("Manuel Estrada Sainz");
98 @@ -724,3 +726,5 @@ module_exit(firmware_class_exit);
99 EXPORT_SYMBOL(release_firmware);
100 EXPORT_SYMBOL(request_firmware);
101 EXPORT_SYMBOL(request_firmware_nowait);
102 +
103 +#endif
This page took 0.052456 seconds and 5 git commands to generate.