5 #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
8 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
10 #define INIT_TQUEUE(_tq, _routine, _data) \
14 PREPARE_TQUEUE((_tq), (_routine), (_data)); \
16 #define PREPARE_TQUEUE(_tq, _routine, _data) \
18 (_tq)->routine = _routine; \
19 (_tq)->data = _data; \
24 #define work_struct tq_struct
26 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0))
27 #define schedule_work(a) queue_task(a, &tq_scheduler)
29 #define schedule_work(a) schedule_task(a)
32 #define flush_scheduled_work flush_scheduled_tasks
33 #define INIT_WORK(_wq, _routine, _data) INIT_TQUEUE(_wq, _routine, _data)
34 #define PREPARE_WORK(_wq, _routine, _data) PREPARE_TQUEUE(_wq, _routine, _data)
36 #endif // < 2.5 kernel
39 #ifndef DECLARE_TASKLET
40 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0))
41 #define tasklet_schedule(a) queue_task(a, &tq_scheduler)
43 #define tasklet_schedule(a) schedule_task(a)
48 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,38))
49 typedef struct device netdevice_t
;
50 #elif (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,4))
51 typedef struct net_device netdevice_t
;
54 typedef struct net_device netdevice_t
;
58 #if (WIRELESS_EXT < 13)
59 struct iw_request_info
61 __u16 cmd
; /* Wireless Extension command */
62 __u16 flags
; /* More to come ;-) */
69 typedef void irqreturn_t
;
79 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) // fixme
80 #define URB_ASYNC_UNLINK USB_ASYNC_UNLINK
82 #define USB_QUEUE_BULK 0
85 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
86 #define free_netdev(x) kfree(x)