#ifndef _ORINOCO_FIRMWARE_H #define _ORINOCO_FIRMWARE_H #include #include #if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE) #include #elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) #ifndef _LINUX_FIRMWARE_H #define _LINUX_FIRMWARE_H #define FIRMWARE_NAME_MAX 30 struct firmware { size_t size; u8 *data; }; int request_firmware (const struct firmware **fw, const char *name, const char *device); int request_firmware_nowait ( struct module *module, const char *name, const char *device, void *context, void (*cont)(const struct firmware *fw, void *context)); /* On 2.5 'device' is 'struct device *' */ void release_firmware (const struct firmware *fw); void register_firmware (const char *name, const u8 *data, size_t size); #endif /* !_LINUX_FIRMWARE_H */ #else /* fw loader is not available, provide a useless placeholder */ #warning request_firmware() not available. #ifndef _LINUX_FIRMWARE_H #define _LINUX_FIRMWARE_H #define FIRMWARE_NAME_MAX 30 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 0) #include #endif struct firmware { size_t size; u8 *data; }; #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 0) static int request_firmware (const struct firmware **fw, const char *name, struct device *device) { #else static int request_firmware (const struct firmware **fw, const char *name, const char *device) { #endif if(fw) *fw = NULL; return -ENOSYS; } /* For 2.5 'device' should be 'struct device *' */ static void release_firmware (const struct firmware *fw) {}; static void register_firmware (const char *name, const u8 *data, size_t size) {}; #endif /* !_LINUX_FIRMWARE_H */ #endif /* defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE) */ #endif /* _ORINOCO_FIRMWARE_H */